[Pkg-sysvinit-commits] r1064 - in sysvinit/trunk/debian: . initscripts/etc/init.d
pere at alioth.debian.org
pere at alioth.debian.org
Sun Nov 18 23:11:57 UTC 2007
Author: pere
Date: 2007-11-18 23:11:57 +0000 (Sun, 18 Nov 2007)
New Revision: 1064
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/initscripts/etc/init.d/sendsigs
Log:
* Use new killall5 -o option in init.d/sendsigs, reading pids to
omit from /var/run/sendsigs.omit. This make it possible to list
pids there if the process is required to umount the file systems
during shutdown. Based on patch from Ubuntu.
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2007-11-18 23:08:31 UTC (rev 1063)
+++ sysvinit/trunk/debian/changelog 2007-11-18 23:11:57 UTC (rev 1064)
@@ -12,6 +12,10 @@
* New patch 82_killall_exclude_pids.dpatch adding new option -o
to killall5, to omit killing the pid given on the command line.
Based on patch from Ubuntu.
+ * Use new killall5 -o option in init.d/sendsigs, reading pids to
+ omit from /var/run/sendsigs.omit. This make it possible to list
+ pids there if the process is required to umount the file systems
+ during shutdown. Based on patch from Ubuntu.
-- Petter Reinholdtsen <pere at debian.org> Tue, 30 Jan 2007 23:14:04 +0100
Modified: sysvinit/trunk/debian/initscripts/etc/init.d/sendsigs
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/sendsigs 2007-11-18 23:08:31 UTC (rev 1063)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/sendsigs 2007-11-18 23:11:57 UTC (rev 1064)
@@ -14,9 +14,16 @@
. /lib/lsb/init-functions
do_stop () {
+ OMITPIDS=
+ if [ -e /var/run/sendsigs.omit ]; then
+ for pid in $(cat /var/run/sendsigs.omit); do
+ OMITPIDS="${OMITPIDS:+$OMITPIDS }-o $pid"
+ done
+ fi
+
# Kill all processes.
log_action_begin_msg "Asking all remaining processes to terminate"
- killall5 -15 # SIGTERM
+ killall5 -15 $OMITPIDS # SIGTERM
log_action_end_msg 0
for seq in 1 2 3 4 5 ; do
# use SIGCONT/signal 18 to check if there are
@@ -24,12 +31,12 @@
# value, because either killall5 work and it make
# sense to wait for processes to die, or it fail and
# there is nothing to wait for.
- killall5 -18 || break
+ killall5 -18 $OMITPIDS || break
sleep 1
done
log_action_begin_msg "Killing all remaining processes"
- killall5 -9 # SIGKILL
+ killall5 -9 $OMITPIDS # SIGKILL
log_action_end_msg 0
}
More information about the Pkg-sysvinit-commits
mailing list