[Pkg-sysvinit-commits] r1192 - in sysvinit/trunk/debian: . initscripts/etc/init.d
pere at alioth.debian.org
pere at alioth.debian.org
Fri Jan 4 16:30:48 UTC 2008
Author: pere
Date: 2008-01-04 16:30:48 +0000 (Fri, 04 Jan 2008)
New Revision: 1192
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/initscripts/etc/init.d/mountkernfs.sh
sysvinit/trunk/debian/initscripts/etc/init.d/sendsigs
Log:
* Extend sendsigs code to omit some pids during shutdown to also
load pids from /lib/init/rw/sendsigs.omit and
/lib/init/rw/sendsigs.omit.d/packagename, to make it easier for
systems starting very early in the boot, or systems that need to
modify the pid list at run time, to update their pid list (Closes:
#459146). Based on patch from Kel Modderman
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2008-01-04 00:50:18 UTC (rev 1191)
+++ sysvinit/trunk/debian/changelog 2008-01-04 16:30:48 UTC (rev 1192)
@@ -36,6 +36,12 @@
* Drop kexec as optional depend for umountroot, as it is better for
kexec to list this as a reverse depend to let the kexec-tools
package control its boot sequence location completely.
+ * Extend sendsigs code to omit some pids during shutdown to also
+ load pids from /lib/init/rw/sendsigs.omit and
+ /lib/init/rw/sendsigs.omit.d/packagename, to make it easier for
+ systems starting very early in the boot, or systems that need to
+ modify the pid list at run time, to update their pid list (Closes:
+ #459146). Based on patch from Kel Modderman
-- Petter Reinholdtsen <pere at debian.org> Mon, 31 Dec 2007 12:18:42 +0100
Modified: sysvinit/trunk/debian/initscripts/etc/init.d/mountkernfs.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/mountkernfs.sh 2008-01-04 00:50:18 UTC (rev 1191)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/mountkernfs.sh 2008-01-04 16:30:48 UTC (rev 1192)
@@ -29,6 +29,9 @@
domount tmpfs "" /lib/init/rw tmpfs -omode=0755,nosuid$RW_OPT
touch /lib/init/rw/.ramfs
+ # Make pidfile omit directory for sendsigs
+ mkdir /lib/init/rw/sendsigs.omit.d/
+
#
# Mount proc filesystem on /proc
#
Modified: sysvinit/trunk/debian/initscripts/etc/init.d/sendsigs
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/sendsigs 2008-01-04 00:50:18 UTC (rev 1191)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/sendsigs 2008-01-04 16:30:48 UTC (rev 1192)
@@ -16,9 +16,26 @@
do_stop () {
OMITPIDS=
- if [ -e /var/run/sendsigs.omit ]; then
- for pid in $(cat /var/run/sendsigs.omit); do
- OMITPIDS="${OMITPIDS:+$OMITPIDS }-o $pid"
+
+ # The /var/run/sendsigs.omit file is used to be compatible
+ # with Ubuntu.
+ for omitfile in /var/run/sendsigs.omit /lib/init/rw/sendsigs.omit; do
+ if [ -e $omitfile ]; then
+ for pid in $(cat omitfile); do
+ OMITPIDS="${OMITPIDS:+$OMITPIDS }-o $pid"
+ done
+ fi
+ done
+
+ # Load sendsigs.omit.d/packagename files too, to make it
+ # possible for scripts that need to modify the list of pids at
+ # run time without race conditions.
+ if [ -d /lib/init/rw/sendsigs.omit.d/ ]; then
+ for pidfile in /lib/init/rw/sendsigs.omit.d/*; do
+ [ -f "$pidfile" ] || continue
+ for pid in $(cat $pidfile); do
+ OMITPIDS="${OMITPIDS:+$OMITPIDS }-o $pid"
+ done
done
fi
More information about the Pkg-sysvinit-commits
mailing list