diff mbox

[4/5] busybox-hwclock: Add placeholder for using hwclock utc

Message ID 0e14921e4a90ff550bd90ea907280b03a02110ab.1406533543.git.christian.braunersorensen@prevas.dk
State Under Review
Delegated to: Kim
Headers show

Commit Message

christian.braunersorensen@prevas.dk July 28, 2014, 7:50 a.m. UTC
From: Christian Sørensen <christian.braunersorensen@prevas.dk>

Signed-off-by: Christian Sørensen <christian.braunersorensen@prevas.dk>
---
 recipes/busybox/files/busybox-hwclock | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/recipes/busybox/files/busybox-hwclock b/recipes/busybox/files/busybox-hwclock
index 84619ff..114ee5c 100755
--- a/recipes/busybox/files/busybox-hwclock
+++ b/recipes/busybox/files/busybox-hwclock
@@ -18,6 +18,8 @@ 
 #               partition! The workaround is to define TZ either
 #               in /etc/default/rcS, or in the proper place below.
 
+UTC="HWCLOCK_UTC"
+
 [ ! -x /sbin/hwclock ] && exit 0
 
 . /etc/default/rcS
@@ -35,9 +37,9 @@  case "$1" in
 		then
 			if [ -z "$TZ" ]
 			then
-	                   hwclock --hctosys
+	                   hwclock $UTC --hctosys
 			else
-			   TZ="$TZ" hwclock --hctosys
+			   TZ="$TZ" hwclock $UTC --hctosys
 			fi
 		fi
 
@@ -60,7 +62,7 @@  case "$1" in
 		fi
 		if [ "$HWCLOCKACCESS" != no ]
 		then
-			hwclock --systohc
+			hwclock $UTC --systohc
 		fi
 		if [ "$VERBOSE" != no ]
 		then
@@ -71,7 +73,7 @@  case "$1" in
 	show)
 		if [ "$HWCLOCKACCESS" != no ]
 		then
-			hwclock --show
+			hwclock $UTC --show
 		fi
 		;;
         *)