From d4a5c5ef402ca7315e5429eaccb0748e38b964af Mon Sep 17 00:00:00 2001 From: Judd Vinet Date: Thu, 19 Feb 2004 18:50:09 +0000 Subject: added cleanups by Leif Askeland --- rc.shutdown | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) (limited to 'rc.shutdown') diff --git a/rc.shutdown b/rc.shutdown index 4f6b6d6..9bf8c2d 100755 --- a/rc.shutdown +++ b/rc.shutdown @@ -9,13 +9,9 @@ # avoid staircase effect /bin/stty onlcr -if [ "$USECOLOR" = "YES" -o "$USECOLOR" = "yes" ]; then - echo -e "\033[1;32m| \033[1;37mInitiating Shutdown...\033[1;0m" - echo -e "\033[1;32m|\033[1;0m" -else - echo "| Initiating Shutdown..." - echo "|" -fi +echo " " +printhl "Initiating Shutdown..." +echo " " if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then # Shutdown daemons @@ -74,22 +70,12 @@ stat_done # Power off or reboot if [ "$RUNLEVEL" = "0" ]; then - if [ "$USECOLOR" = "YES" -o "$USECOLOR" = "yes" ]; then - echo -e "\033[1;32m|\033[1;0m" - echo -e "\033[1;31m| \033[1;33mPOWER OFF\033[1;0m" - else - echo "|" - echo "| POWER OFF" - fi + printsep + printhl "${C_H2}POWER OFF" /sbin/poweroff -d -f -i else - if [ "$USECOLOR" = "YES" -o "$USECOLOR" = "yes" ]; then - echo -e "\033[1;32m|\033[1;0m" - echo -e "\033[1;31m| \033[1;33mREBOOTING\033[1;0m" - else - echo "|" - echo "| REBOOTING" - fi + printsep + printhl "${C_H2}REBOOTING.." /sbin/reboot -d -f -i fi -- cgit v1.2.3