clean:
dh_testdir
dh_testroot
- dh_clean
+ dh_clean
install: build
dh_testdir
dh_testroot
- dh_clean -k
+ dh_clean -k
dh_installdirs usr/sbin/ etc
- install -m 755 grml-policy-rc.d debian/grml-policyrcd/usr/sbin/grml-policy-rc.d
- install -m 644 policy-rc.d.conf debian/grml-policyrcd/etc/policy-rc.d.conf
- install -m 644 zg-policy-rc.d.conf debian/grml-policyrcd/etc/zg-policy-rc.d.conf
+ install -m 755 policy-rc.d debian/grml-policyrcd/usr/sbin/policy-rc.d
+ install -m 644 policy-rc.d.conf debian/grml-policyrcd/etc/policy-rc.d.conf
# Build architecture-dependent files here.
binary-arch: build install
binary-indep: build install
dh_testdir
dh_testroot
- dh_installchangelogs
+ dh_installchangelogs
dh_installdocs
dh_installexamples
- dh_installman grml-policy-rc.d.8
- dh_link
+ dh_installman policy-rc.d.8
+ # for backwards compatibility:
+ dh_link /usr/sbin/policy-rc.d /usr/sbin/grml-policy-rc.d
+ dh_link /usr/share/man/man8/policy-rc.d.8.gz /usr/share/man/man8/grml-policy-rc.d.8.gz
dh_strip
dh_compress
dh_fixperms
+++ /dev/null
-.\" Filename: grml-policy-rc.d.1
-.\" Purpose: man page for grml-policy-rc.d
-.\" Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
-.\" Bug-Reports: see http://grml.org/bugs/
-.\" License: This file is licensed under the GPL v2.
-.\" Latest change: Die Jul 18 00:38:45 CEST 2006 [mika]
-.\"###############################################################################
-
-.\"###############################################################
-.TH grml\-policy-rc.d 8 "2006-07-18" "grml-policy-rc.d"
-.SH "NAME"
-grml\-policy\-rc.d \- wrapper for invoke-rc.d
-.\"#######################################################
-
-.P
-This is a wrapper script for invoke-rc.d to avoid automatical
-startup of init scripts via invoke-rc.d. It is designed to be
-used e.g. with policyrcd-script-zg2. To configure it take a look
-at /etc/policy-rc.d.conf and /etc/zg-policy-rc.d.conf.
-
-First of all make sure the package policyrcd-script-zg2
-(which provides the /usr/sbin/policy-rc.d interface) is
-installed.
-
-In policyrcd-script-zg2's configuration file named
-/etc/zg-policy-rc.d.conf the script /usr/sbin/grml-policy-rc.d is
-defined as the interface for handling invoke-rc.d's startup
-policy. grml-policy-rc.d can be configure via
-/etc/policy-rc.d.conf.
-
-By default you won't notice any differences to Debian's default
-behaviour, except that invoke-rc.d won't be executed if a chroot
-has been detected (detection: /proc is missing). If you want to
-disable automatical startup of newly installed packages (done via
-the invoke-rc.d mechanism) just set EXITSTATUS to '101' in
-/etc/policy-rc.d.conf. To restore the default behaviour set
-EXITSTATUS back to '0' in /etc/policy-rc.d.conf.
-
-.SH "BUGS"
-Probably. Please report any bugs you find and report feedback and
-suggestions to the grml-team. See http://grml.org/bugs/ for
-further information. Thank you!
-
-.SH "COPYRIGHT"
-Copyright \(co 2006 by the grml-team.
-.\"###### END OF FILE ##########################################################
-.\" vim:tw=60
#!/bin/sh
-# Filename: grml-policy-rc.d
+# Filename: policy-rc.d
# Purpose: interface script for invoke-rc.d (see /etc/policy-rc.d.conf)
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
-# Latest change: Mit Okt 18 20:43:22 UTC 2006 [mika]
################################################################################
# test for chroot
fi
# read configuration file
-if [ -r /etc/policy-rc.d.conf ] ; then
- . /etc/policy-rc.d.conf
+if [ -z "$POLICYRCD" ] ; then
+ if [ -r /etc/policy-rc.d.conf ] ; then
+ . /etc/policy-rc.d.conf
+ fi
fi
-if [ -n "$EXITSTATUS" ]; then
- exit "$EXITSTATUS"
+if [ -z "$POLICYRCD" ]; then
+ for file in /usr/local/sbin/policy-rc.d /etc/policy-rc.d; do
+ if [ -x "$file" ]; then
+ POLICYRCD="$file"
+ break
+ fi
+ done
+fi
+
+# if $POLICYRCD is set or either /usr/local/sbin/policy-rc.d
+# or /etc/policy-rc.d are present execute them:
+if [ -n "$POLICYRCD" ]; then
+ $POLICYRCD "$@"
+ exit $?
else
- # allow it
- exit 0
+ # otherwise exit with $EXITSTATUS,
+ # being '0' by default
+ if [ -n "$EXITSTATUS" ]; then
+ exit "$EXITSTATUS"
+ else
+ # or if $EXITSTATUS isn't set just allow it
+ exit 0
+ fi
fi
## END OF FILE #################################################################
--- /dev/null
+.\" Filename: policy-rc.d.8
+.\" Purpose: man page for policy-rc.d
+.\" Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
+.\" Bug-Reports: see http://grml.org/bugs/
+.\" License: This file is licensed under the GPL v2.
+.\"###############################################################################
+
+.\"###############################################################
+.TH policy-rc.d 8 "2010-12-23" "policy-rc.d"
+.SH "NAME"
+policy\-rc.d \- wrapper for invoke-rc.d
+.\"#######################################################
+
+.P
+This is a wrapper script for invoke-rc.d to avoid automatical
+startup of init scripts via invoke-rc.d. To configure it
+edit /etc/policy-rc.d.conf.
+
+By default you won't notice any differences to Debian's
+default behaviour, except that invoke-rc.d won't be executed
+if a chroot has been detected (detection using /proc). If
+you want to disable automatical startup of newly installed
+packages (done via the invoke-rc.d mechanism) just set
+EXITSTATUS to '101' in /etc/policy-rc.d.conf. To restore the
+default behaviour set EXITSTATUS back to '0' in
+/etc/policy-rc.d.conf.
+
+.SH "BUGS"
+Please report any problems you find and report feedback and
+suggestions to the grml-team. See http://grml.org/bugs/ for
+further information. Thank you!
+
+.SH "COPYRIGHT"
+Copyright \(co 2006-2010 by the grml-team.
+.\"###### END OF FILE ##########################################################
+.\" vim:tw=60
# 106 - action not allowed. Use the returned fallback actions
# (which are implied to be "allowed") instead.
+# Do you want to execute another script?
+# POLICYRCD=/usr/local/sbin/policy-rc.d
+
# More information:
# http://people.debian.org/~hmh/invokerc.d-policyrc.d-specification.txt
+++ /dev/null
-# Filename: /etc/zg-policy-rc.d.conf
-# Purpose: configuration file for policyrcd-script-zg2
-# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
-# Bug-Reports: see http://grml.org/bugs/
-# License: This file is licensed under the GPL v2.
-# Latest change: Sam Jul 08 01:27:21 CEST 2006 [mika]
-################################################################################
-
-# We want to run /usr/sbin/grml-policy-rc.d as invoke-rc.d interface:
-POLICYRCD=/usr/sbin/grml-policy-rc.d
-
-## END OF FILE #################################################################