FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux General Discussion

 
 
LinkBack Thread Tools
 
Old 06-30-2010, 09:47 PM
Victor Lowther
 
Default Bashify poweroff or reboot code in rc.shutdown.

---
rc.shutdown | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/rc.shutdown b/rc.shutdown
index b7b7d45..7d5ec26 100755
--- a/rc.shutdown
+++ b/rc.shutdown
@@ -108,15 +108,14 @@ stat_done
run_hook shutdown_poweroff

# Power off or reboot
-if [ "$RUNLEVEL" = "0" ]; then
- printsep
+printsep
+if [[ $RUNLEVEL = 0 ]]; then
printhl "${C_H2}POWER OFF"
/sbin/poweroff -d -f -h -i
else
- printsep
printhl "${C_H2}REBOOTING"
# if kexec is installed and a kernel is loaded, use it
- [ -x /sbin/kexec ] && /sbin/kexec -e > /dev/null 2>&1
+ [[ -x /sbin/kexec ]] && /sbin/kexec -e > /dev/null 2>&1
/sbin/reboot -d -f -i
fi

--
1.7.1
 

Thread Tools




All times are GMT. The time now is 09:24 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org