[Pkg-sysvinit-commits] r916 - in sysvinit/trunk/debian: .
initscripts initscripts/etc/init.d
Petter Reinholdtsen
pere at costa.debian.org
Tue Sep 12 08:07:26 UTC 2006
Author: pere
Date: 2006-09-12 08:07:25 +0000 (Tue, 12 Sep 2006)
New Revision: 916
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/control
sysvinit/trunk/debian/initscripts/etc/init.d/sendsigs
sysvinit/trunk/debian/initscripts/etc/init.d/umountnfs.sh
sysvinit/trunk/debian/initscripts/postinst
Log:
* Only kill processes using remote file systems before trying to
umount them, if fuser from the psmisc package is available, and
move sendsigs to a point between where remote and local file systems
are umounted. Recommend psmisc for package initscripts.
(Closes: #258420, #367944)
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2006-09-12 07:20:57 UTC (rev 915)
+++ sysvinit/trunk/debian/changelog 2006-09-12 08:07:25 UTC (rev 916)
@@ -20,6 +20,11 @@
* Now that mtab is properly updated by mtab.sh before mountall.sh,
there is no need to have special handling of proc file systems.
Remove the code from mountall.sh. (Closes: #359651)
+ * Only kill processes using remote file systems before trying to
+ umount them, if fuser from the psmisc package is available, and
+ move sendsigs to a point between where remote and local file systems
+ are umounted. Recommend psmisc for package initscripts.
+ (Closes: #258420, #367944)
-- Petter Reinholdtsen <pere at debian.org> Mon, 11 Sep 2006 00:44:44 +0200
Modified: sysvinit/trunk/debian/control
===================================================================
--- sysvinit/trunk/debian/control 2006-09-12 07:20:57 UTC (rev 915)
+++ sysvinit/trunk/debian/control 2006-09-12 08:07:25 UTC (rev 916)
@@ -36,6 +36,7 @@
Package: initscripts
Architecture: any
Depends: ${shlibs:Depends}, ${glibc:Depends}, ${mount:Depends}, e2fsprogs (>= 1.32+1.33-WIP-2003.04.14-1), debianutils (>= 2.13.1), lsb-base (>= 3.0-6)
+Recommends: psmisc
Conflicts: mdutils, sysv-rc (<< 2.86.ds1-1.2), sysvinit (<< 2.86.ds1-12)
Replaces: mdutils, sysvinit (<< 2.85-12), libc6, libc6.1, libc0.1, libc0.3
Description: Scripts for initializing and shutting down the system
Modified: sysvinit/trunk/debian/initscripts/etc/init.d/sendsigs
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/sendsigs 2006-09-12 07:20:57 UTC (rev 915)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/sendsigs 2006-09-12 08:07:25 UTC (rev 916)
@@ -2,7 +2,7 @@
### BEGIN INIT INFO
# Provides: sendsigs
# Required-Start:
-# Required-Stop: umountnfs
+# Required-Stop: umountfs
# Default-Start:
# Default-Stop: 0 6
# Short-Description: Kill all remaining processes.
Modified: sysvinit/trunk/debian/initscripts/etc/init.d/umountnfs.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/umountnfs.sh 2006-09-12 07:20:57 UTC (rev 915)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/umountnfs.sh 2006-09-12 08:07:25 UTC (rev 916)
@@ -2,7 +2,7 @@
### BEGIN INIT INFO
# Provides: umountnfs
# Required-Start:
-# Required-Stop: umountfs
+# Required-Stop: umountfs sendsigs
# Should-Stop: portmap $network
# Default-Start:
# Default-Stop: 0 6
@@ -71,6 +71,25 @@
if [ "$DIRS" ]
then
+ # Kill all processes using the directories we try to umount
+ if [ -x /bin/fuser ] ; then
+ [ "$VERBOSE" = no ] || log_action_begin_msg "Asking non-system processes to terminate"
+ fuser -k INT -m $DIRS
+ [ "$VERBOSE" = no ] || log_action_end_msg 0
+
+ for count in 1 2 3 4 5; do # Wait up to 5 seconds
+ sleep 1
+ [ -z "`fuser -m $DIRS 2> /dev/null`" ] && break
+ done
+
+ pidsleft=`fuser -m $DIRS 2>/dev/null`
+ if [ "$pidsleft" ] ; then
+ [ "$VERBOSE" = no ] || log_action_begin_msg "Killing non-system processes"
+ fuser -k TERM -m $DIRS
+ [ "$VERBOSE" = no ] || log_action_end_msg 0
+ fi
+ fi
+
[ "$VERBOSE" = no ] || log_action_begin_msg "Unmounting remote and non-toplevel virtual filesystems"
umount $FLAGS $DIRS
ES=$?
Modified: sysvinit/trunk/debian/initscripts/postinst
===================================================================
--- sysvinit/trunk/debian/initscripts/postinst 2006-09-12 07:20:57 UTC (rev 915)
+++ sysvinit/trunk/debian/initscripts/postinst 2006-09-12 08:07:25 UTC (rev 916)
@@ -93,6 +93,12 @@
update-rc.d -f hostname.sh remove >/dev/null 2>&1 || :
fi
+# In 2.86.ds1-21, the sendsigs script were moved.
+if dpkg --compare-versions "$PREV_VER" lt "2.86.ds1-21"
+then
+ update-rc.d -f sendsigs remove >/dev/null 2>&1 || :
+fi
+
#
# Okay, we could do this with update-rc.d, but that would probably
# be pretty slow. This way we win some speed.
@@ -122,8 +128,8 @@
updatercd reboot start 90 6 .
updatercd umountroot start 60 0 6 .
updatercd umountfs start 40 0 6 .
+updatercd sendsigs start 37 0 6 .
updatercd umountnfs.sh start 31 0 6 .
-updatercd sendsigs start 20 0 6 .
updatercd killprocs start 30 1 .
updatercd single start 90 1 .
More information about the Pkg-sysvinit-commits
mailing list