diff options
Diffstat (limited to 'rc.d')
-rwxr-xr-x | rc.d/init.d/functions | 2 | ||||
-rwxr-xr-x | rc.d/init.d/halt | 20 | ||||
-rwxr-xr-x | rc.d/rc.sysinit | 14 |
3 files changed, 18 insertions, 18 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index d9611b5c..e6ee9b81 100755 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -332,7 +332,7 @@ action() { STRING=$1 echo -n "$STRING " shift - initlog $INITLOG_ARGS -c "$*" && action $"$STRING" || action $"$STRING" + initlog $INITLOG_ARGS -c "$*" && success $"$STRING" || failure $"$STRING" rc=$? echo return $rc diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt index f54d69d1..96cf2a46 100755 --- a/rc.d/init.d/halt +++ b/rc.d/init.d/halt @@ -43,9 +43,9 @@ esac # Kill all processes. [ "${BASH+bash}" = bash ] && enable kill -action $"Sending all processes the TERM signal..." /sbin/killall5 -15 +runcmd $"Sending all processes the TERM signal..." /sbin/killall5 -15 sleep 5 -action $"Sending all processes the KILL signal..." /sbin/killall5 -9 +runcmd $"Sending all processes the KILL signal..." /sbin/killall5 -9 # Write to wtmp file before unmounting /var halt -w @@ -53,19 +53,19 @@ halt -w # Save mixer settings, here for lack of a better place. grep -q "\(sparcaudio\|sound\)" /proc/devices if [ $? = 0 -a -x /bin/aumix-minimal ]; then - action $"Saving mixer settings" /bin/aumix-minimal -f /etc/.aumixrc -S + runcmd $"Saving mixer settings" /bin/aumix-minimal -f /etc/.aumixrc -S fi # Sync clock -action $"Syncing hardware clock to system time" /sbin/hwclock --systohc +runcmd $"Syncing hardware clock to system time" /sbin/hwclock --systohc # Turn off swap, then unmount file systems. SWAPS=`awk '! /^Filename/ { print $1 }' /proc/swaps` -[ -n "$SWAPS" ] && action $"Turning off swap: " swapoff $SWAPS +[ -n "$SWAPS" ] && runcmd $"Turning off swap: " swapoff $SWAPS -[ -x /sbin/accton ] && action $"Turning off accounting: " /sbin/accton +[ -x /sbin/accton ] && runcmd $"Turning off accounting: " /sbin/accton -[ -x /sbin/quotaoff ] && action $"Turning off quotas: " /sbin/quotaoff -a +[ -x /sbin/quotaoff ] && runcmd $"Turning off quotas: " /sbin/quotaoff -a # Unmount file systems, killing processes if we have to. sig= @@ -74,9 +74,9 @@ remaining=`awk '!/(^#|proc|loopfs|^none|^\/dev\/root| \/ )/ {print $2}' /proc/mo while [ -n "$remaining" -a "$retry" -gt 0 ] do if [ "$retry" -lt 3 ]; then - action $"Unmounting file systems (retry): " umount -a -f -t noproc + runcmd $"Unmounting file systems (retry): " umount -a -f -t noproc else - action $"Unmounting file systems: " umount -a -f -t noproc + runcmd $"Unmounting file systems: " umount -a -f -t noproc fi sleep 2 remaining=`awk '!/(^#|proc|loopfs|^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts` @@ -95,7 +95,7 @@ mount | awk '/ext2/ { print $3 }' | while read line; do mount -n -o ro,remount $line done -action $"Unmounting proc file system: " umount /proc +runcmd $"Unmounting proc file system: " umount /proc # Now halt or reboot. echo $"$message" diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 65d3d4fe..480f2cfb 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -126,7 +126,7 @@ if [ "`/sbin/consoletype`" == "vt" ]; then echo -n $"Loading default keymap: " fi loadkeys $KEYMAP < /dev/tty0 > /dev/tty0 2>/dev/null && \ - action $"Loading default keymap" || action $"Loading default keymap" + success $"Loading default keymap" || failure $"Loading default keymap" echo fi fi @@ -211,16 +211,16 @@ if [ -z "$fastboot" -a "$ROOTFSTYPE" != "nfs" ]; then rc=$? if [ "$rc" = "0" ]; then - action $"$STRING" + success "$STRING" echo elif [ "$rc" = "1" ]; then - action $"$STRING" + passed $"$STRING" echo fi # A return of 2 or higher means there were serious problems. if [ $rc -gt 1 ]; then - action $"$STRING" + failure "$STRING" echo echo echo $"*** An error occurred during the file system check." @@ -456,16 +456,16 @@ if [ -z "$fastboot" ]; then initlog -c "fsck -T -R -A -a $fsckoptions" rc=$? if [ "$rc" = "0" ]; then - action $"$STRING" + success "$STRING" echo elif [ "$rc" = "1" ]; then - action $"$STRING" + passed "$STRING" echo fi # A return of 2 or higher means there were serious problems. if [ $rc -gt 1 ]; then - action $"$STRING" + failure "$STRING" echo echo echo $"*** An error occurred during the file system check." |