File: setup

package info (click to toggle)
freedombox-setup 0.10
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 212 kB
  • ctags: 10
  • sloc: sh: 274; makefile: 4
file content (29 lines) | stat: -rwxr-xr-x 549 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

set -e  # Exit on error

at_exit() {
    if $policyd ; then
       rm -f /usr/sbin/policy-rc.d
    fi
    policyd=false
}

# Make sure configuring packages do not start any services.  Also make
# sure we remove policy-rc.d only if we created it.
trap at_exit HUP INT TERM EXIT
if [ ! -e /usr/sbin/policy-rc.d ] ; then
    cat > /usr/sbin/policy-rc.d <<EOF
#!/bin/sh
exit 101
EOF
    chmod a+rx /usr/sbin/policy-rc.d
    policyd=true
else
    policyd=false
fi

for f in /usr/lib/freedombox/setup.d/* ; do
    echo "running $f"
    $f
done