]> git.pld-linux.org Git - projects/rc-scripts.git/blobdiff - rc.d/rc.shutdown
- merge from TOTALNEW branch (see NEWS for more info)
[projects/rc-scripts.git] / rc.d / rc.shutdown
index 073924cb62c052164207f6bf5c5021f9d6acc411..c27324109e3632f93360ec91a1c057879db0ce02 100755 (executable)
@@ -3,10 +3,10 @@
 # shutdwn       Common script for system halt/reboot.
 #
 # Author:       Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
-#               Modified for PLD Linux by Grzegorz Stanislawski
-# Changes:      Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
+# Changes:     Grzegorz Stanislawski <stangrze@open.net.pl>
+#              Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
 #
-# $Id: rc.shutdown,v 1.14 2001/05/13 17:10:16 baggins Exp $
+# $Id: rc.shutdown,v 1.15 2001/05/15 16:03:36 baggins Exp $
 
 # Set the path.
 PATH=/sbin:/bin:/usr/bin:/usr/sbin
@@ -31,7 +31,7 @@ halt -w
 
 # Turn off swap, then unmount file systems.
 run_cmd "Turning off swap and accounting" swapoff -a
-[ -x /sbin/accton ] && /sbin/accton
+[ -x /sbin/accton ] && LC_ALL=C /sbin/accton 2>&1 | grep -v "not implemented"
 
 if [ -x /sbin/quotaoff ]; then
        run_cmd "Turning off quotas for local filesystems" /sbin/quotaoff -a
@@ -41,11 +41,11 @@ fi
 sig=-15
 retry=3
 force=
-remaining=`awk '!/(^#| proc | loopfs | devfs | devpts | shm |^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts`
+remaining=$(awk '!/(^#| proc | loopfs | devfs | devpts | shm |^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts)
 while [ -n "$remaining" -a "$retry" -gt 0 ]
 do     
        show "Unmounting file systems" ; busy
-       if ERRORS=`LC_ALL=C exec umount -a $FORCE -t noproc 2>&1` ; then
+       if ERRORS=$(LC_ALL=C exec umount -a $FORCE -t noproc 2>&1) ; then
                ok
        else
                fail
@@ -53,7 +53,7 @@ do
        fi
        
        sleep 2
-       remaining=`awk '!/(^#| proc | loopfs | devfs | devpts | shm |^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts`
+       remaining=$(awk '!/(^#| proc | loopfs | devfs | devpts | shm |^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts)
        [ -z "$remaining" ] && break
        /sbin/fuser -k -m $sig $remaining > /dev/null
        sleep 5
@@ -72,7 +72,7 @@ if [ -x /sbin/raidstop -a -f /etc/raidtab ]; then
        if [ -f /proc/mdstat ] ; then
                mddevs=$(awk '/^md.* active/ {print $1}' /proc/mdstat)
                for mddev in $mddevs ; do
-                       MESSAGE="`nls 'Turning off RAID for %s' "$mddev"`"
+                       MESSAGE="$(nls 'Turning off RAID for %s' "$mddev")"
                        run_cmd "$MESSAGE" raidstop /dev/$mddev
                done
                unset mddev mddevs
@@ -81,7 +81,7 @@ if [ -x /sbin/raidstop -a -f /etc/raidtab ]; then
 fi
 
 show "Remounting remaining filesystems ro mode"; busy
-if ( mount | awk '/ext2/ { print $3 }' | \
+if ( mount | awk '/ext2|ext3|reiserfs|xfs|jfs/ { print $3 }' | \
        while read line; do 
        mount -n -o ro,remount $line; done ); then
        ok
This page took 0.044536 seconds and 4 git commands to generate.