summaryrefslogtreecommitdiff
path: root/source/a/sysvinit-scripts/scripts/rc.K
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/sysvinit-scripts/scripts/rc.K')
-rw-r--r--source/a/sysvinit-scripts/scripts/rc.K13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/a/sysvinit-scripts/scripts/rc.K b/source/a/sysvinit-scripts/scripts/rc.K
index 8fc63fdf..794c82ac 100644
--- a/source/a/sysvinit-scripts/scripts/rc.K
+++ b/source/a/sysvinit-scripts/scripts/rc.K
@@ -60,7 +60,7 @@ fi
# Kill any processes (typically gam) that would otherwise prevent
# unmounting NFS volumes:
unset FUSER_DELAY
-for dir in $(/bin/mount | grep 'type nfs' | cut -d ' ' -f 3 ) ; do
+for dir in $(/bin/mount | grep 'type nfs ' | cut -d ' ' -f 3 ) ; do
echo "Killing processes holding NFS mount $dir open..."
# Background this to prevent fuser from also blocking shutdown:
/usr/bin/fuser -k -m $dir &
@@ -72,8 +72,8 @@ if [ ! -z "$FUSER_DELAY" ]; then
fi
# Unmount any NFS, SMB, or CIFS filesystems:
-echo "Unmounting remote filesystems."
-/bin/umount -v -a -l -f -r -t nfs,smbfs,cifs
+echo "Unmounting remote filesystems:"
+/bin/umount -v -a -l -f -r -t nfs,smbfs,cifs | tr -d ' ' | grep successfully | sed "s/:successfullyunmounted/ has been successfully unmounted./g"
# Shut down PCMCIA devices:
if [ -x /etc/rc.d/rc.pcmcia ] ; then
@@ -88,9 +88,10 @@ if [ -x /etc/rc.d/rc.acpid -a -r /var/run/acpid.pid ]; then # quit
fi
# Kill all processes.
+OMITPIDS="$(for p in $(pgrep mdmon); do echo -o $p; done)" # Don't kill mdmon
echo
echo "Sending all processes the SIGHUP signal."
-killall5 -1
+killall5 -1 $OMITPIDS
echo -n "Waiting for processes to hang up"
for loop in 0 1 2 3 4 5 ; do
sleep 1
@@ -98,7 +99,7 @@ for loop in 0 1 2 3 4 5 ; do
done
echo
echo "Sending all processes the SIGTERM signal."
-killall5 -15
+killall5 -15 $OMITPIDS
echo -n "Waiting for processes to terminate"
for loop in 0 1 2 3 4 5 ; do
sleep 1
@@ -106,7 +107,7 @@ for loop in 0 1 2 3 4 5 ; do
done
echo
echo "Sending all processes the SIGKILL signal."
-killall5 -9
+killall5 -9 $OMITPIDS
echo -n "Waiting for processes to exit"
for loop in 0 1 2 3 4 5 ; do
sleep 1