# Modified for PLD Linux by Grzegorz Stanislawski
# Changes: Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
#
-# $Id: rc.shutdown,v 1.2 2000/02/03 11:48:30 misiek Exp $
+# $Id: rc.shutdown,v 1.3 2000/02/18 10:37:06 wiget Exp $
# Set the path.
PATH=/sbin:/bin:/usr/bin:/usr/sbin
# Unmount file systems, killing processes if we have to.
sig=
retry=3
-remaining=`awk '!/(^#|proc|^none|^\/dev\/root)/ {print $2}' /proc/mounts`
+remaining=`awk '!/(^#| (proc|devfs|devpts|\/) |^none|^\/dev\/root)/ {print $2}' /proc/mounts`
while [ -n "$remaining" -a "$retry" -gt 0 ]
do
- run_cmd "Unmounting file systems" umount -a -f -t noproc
- sleep 2
+ _ERRORS=""
+ show "Unmounting file systems"; busy
+ if _ERRORS="`LANG_OLD=$LANG;LANG=C;initlog -c \"umount -a -f -t noproc\" 2>&1;LANG=$LANG_OLD`"; the
+ n
+ deltext; ok
+ else
+ deltext; fail; echo $_ERRORS
+ fi
+ unset _ERRORS
+
+ sleep 2
remaining=`awk '!/(^#|proc|^none|^\/dev\/root)/ {print $2}' /proc/mounts`
[ -z "$remaining" ] && break
[ -x /sbin/fuser ] && /sbin/fuser -k -m $sig $remaining >/dev/null