2 # Filename: policy-rc.d
3 # Purpose: interface script for invoke-rc.d (see /etc/policy-rc.d.conf)
4 # Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports: see http://grml.org/bugs/
6 # License: This file is licensed under the GPL v2.
7 ################################################################################
10 if test "$(/usr/bin/stat -c "%d/%i" /)" != "$(/usr/bin/stat -Lc "%d/%i" /proc/1/root 2>/dev/null)" ; then
11 # notify invoke-rc.d that nothing should be done -- we are in a chroot
15 # read configuration file
16 if [ -z "$POLICYRCD" ] ; then
17 if [ -r /etc/policy-rc.d.conf ] ; then
18 . /etc/policy-rc.d.conf
22 if [ -z "$POLICYRCD" ]; then
23 for file in /usr/local/sbin/policy-rc.d /etc/policy-rc.d; do
24 if [ -x "$file" ]; then
31 # if $POLICYRCD is set or either /usr/local/sbin/policy-rc.d
32 # or /etc/policy-rc.d are present execute them:
33 if [ -n "$POLICYRCD" ]; then
37 # otherwise exit with $EXITSTATUS,
38 # being '0' by default
39 if [ -n "$EXITSTATUS" ]; then
42 # or if $EXITSTATUS isn't set just allow it
47 ## END OF FILE #################################################################