initial checkin
[grml-policyrcd.git] / grml-policy-rc.d
1 #!/bin/sh
2 # Filename:      grml-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 # Latest change: Mit Okt 18 20:43:22 UTC 2006 [mika]
8 ################################################################################
9
10 # test for chroot
11 if test "$(/usr/bin/stat -c "%d/%i" /)" != "$(/usr/bin/stat -Lc "%d/%i" /proc/1/root 2>/dev/null)" ; then
12    # notify invoke-rc.d that nothing should be done -- we are in a chroot
13    exit 101
14 fi
15
16 # read configuration file
17 if [ -r /etc/policy-rc.d.conf ] ; then
18    . /etc/policy-rc.d.conf
19 fi
20
21 if [ -n "$EXITSTATUS" ]; then
22    exit "$EXITSTATUS"
23 else
24    # allow it
25    exit 0
26 fi
27
28 ## END OF FILE #################################################################