From 7d349f0491187533c82fcce5d4b1cd14b2441fdd Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 13 Sep 1999 00:51:40 +0000 Subject: fix swapoff so it's not called with no args --- rc.d/init.d/halt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'rc.d/init.d/halt') diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt index 5c50bf66..9a368cbf 100755 --- a/rc.d/init.d/halt +++ b/rc.d/init.d/halt @@ -53,7 +53,8 @@ halt -w # 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 -swapoff `cut -f1 -d " " /proc/swaps | tail +2` +OTHERSWAP=`cut -f1 -d " " /proc/swaps | tail +2` +[ -n "$OTHERSWAP" ] && swapoff $OTHERSWAP [ -x /sbin/accton ] && /sbin/accton runcmd "Unmounting file systems" umount -a -f -- cgit v1.2.1