From eff4f33b3db73782716eaccd2eed1af5f7f0fb5d Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 20 Sep 1999 18:42:10 +0000 Subject: just call swapoff once --- rc.d/init.d/halt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt index 7efea30b..7c7fbf70 100755 --- a/rc.d/init.d/halt +++ b/rc.d/init.d/halt @@ -57,12 +57,10 @@ if [ $? = 0 ]; then fi # Turn off swap, then unmount file systems. -runcmd "Turning off swap and accounting" swapoff -a -# Turn off other swap that isn't in /etc/fstab -OTHERSWAP=`awk '! /^Filename/ { print $1 }' /proc/swaps` -[ -n "$OTHERSWAP" ] && swapoff $OTHERSWAP +SWAPS=`awk '! /^Filename/ { print $1 }' /proc/swaps` +[ -n "$SWAPS" ] && runcmd "Turning off swap" swapoff $SWAPS -[ -x /sbin/accton ] && /sbin/accton +[ -x /sbin/accton ] && runcmd "Turning off accounting" /sbin/accton # Unmount file systems, killing processes if we have to. sig= -- cgit v1.2.1