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


 
 
LinkBack Thread Tools
 
Old 06-30-2010, 09:47 PM
Victor Lowther
 
Default Bashify adjtime.cron

---
adjtime.cron | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/adjtime.cron b/adjtime.cron
index b1c8950..a876506 100755
--- a/adjtime.cron
+++ b/adjtime.cron
@@ -4,14 +4,12 @@
. /etc/rc.conf

HWCLOCK_PARAMS="--adjust"
-if [ "$HARDWARECLOCK" = "UTC" ]; then
- HWCLOCK_PARAMS="$HWCLOCK_PARAMS --utc"
-elif [ "$HARDWARECLOCK" = "localtime" ]; then
- HWCLOCK_PARAMS="$HWCLOCK_PARAMS --localtime"
-else
- HWCLOCK_PARAMS=""
-fi
+case $HARDWARECLOCK in
+ UTC) HWCLOCK_PARAMS+=" --utc";;
+ localtime) HWCLOCK_PARAMS+=" --localtime";;
+ *) HWCLOCK_PARAMS="";;
+esac

-if [ -n "$HWCLOCK_PARAMS" ]; then
- /sbin/hwclock $HWCLOCK_PARAMS
+if [[ $HWCLOCK_PARAMS ]]; then
+ /sbin/hwclock $HWCLOCK_PARAMS
fi
--
1.7.1
 

Thread Tools




All times are GMT. The time now is 01:45 PM.

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