busybox: some more !getopt_long fixes in hwclock.sh
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Wed, 10 Feb 2010 20:12:53 +0000 (21:12 +0100)
committerPhil Blundell <philb@gnu.org>
Sun, 14 Feb 2010 21:34:14 +0000 (21:34 +0000)
busybox' hwclock can be built without support for getopt_long.
Flags of the big hwclock are compatible with the busybox version.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
recipes/busybox/files/hwclock.sh

index 6c0af34..f9c9f9f 100644 (file)
@@ -14,7 +14,7 @@
 
 . /etc/default/rcS
 
-[ "$UTC" = yes ] && UTC=--utc || UTC=--localtime
+[ "$UTC" = yes ] && UTC=-u || UTC=-l
 
 case "$1" in
         start)
@@ -28,9 +28,9 @@ case "$1" in
                then
                        if [ -z "$TZ" ]
                        then
-                          hwclock -s $UTC;# --hctosys
+                          hwclock -s $UTC
                        else
-                          TZ="$TZ" hwclock -s $UTC;# --hctosys
+                          TZ="$TZ" hwclock -s $UTC
                        fi
                fi
 
@@ -53,7 +53,7 @@ case "$1" in
                fi
                if [ "$HWCLOCKACCESS" != no ]
                then
-                       hwclock -w $UTC;# --systohc
+                       hwclock -w $UTC
                fi
                if [ "$VERBOSE" != no ]
                then
@@ -64,7 +64,7 @@ case "$1" in
        show)
                if [ "$HWCLOCKACCESS" != no ]
                then
-                       hwclock -r $UTC;# --show
+                       hwclock -r $UTC
                fi
                ;;
         *)