summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox/files
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2012-11-01 14:47:46 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-11-02 16:18:30 +0000
commit7f6edde6af6451b811c1c45139f6eede525798ae (patch)
treea9eae514e8157a57351bb54ec1da2434b9af054b /meta/recipes-core/busybox/files
parentaea2d8c02c7abd7ecbabae8b3932ceb7a01cb20d (diff)
downloadopenembedded-core-contrib-7f6edde6af6451b811c1c45139f6eede525798ae.tar.gz
hwclock.sh: improve hwclock.sh script to use UTC variable
Make UTC variable in /etc/default/rcS has effect on hwclock.sh. This variable declares whether the Hardware Clock is kept in UTC or local time. Default its value to "yes" and change the comment. [YOCTO #3341] (From OE-Core rev: 2bda4bbda3f3033cfb324778ef88f2aedad4a83b) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/busybox/files')
-rw-r--r--meta/recipes-core/busybox/files/hwclock.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/recipes-core/busybox/files/hwclock.sh b/meta/recipes-core/busybox/files/hwclock.sh
index 2e50425ba8..cc6d2862ba 100644
--- a/meta/recipes-core/busybox/files/hwclock.sh
+++ b/meta/recipes-core/busybox/files/hwclock.sh
@@ -22,6 +22,7 @@
. /etc/default/rcS
+[ "$UTC" = "yes" ] && tz="--utc" || tz="--localtime"
case "$1" in
start)
if [ "$VERBOSE" != no ]
@@ -34,9 +35,9 @@ case "$1" in
then
if [ -z "$TZ" ]
then
- hwclock --hctosys
+ hwclock $tz --hctosys
else
- TZ="$TZ" hwclock --hctosys
+ TZ="$TZ" hwclock $tz --hctosys
fi
fi
@@ -59,7 +60,7 @@ case "$1" in
fi
if [ "$HWCLOCKACCESS" != no ]
then
- hwclock --systohc
+ hwclock $tz --systohc
fi
if [ "$VERBOSE" != no ]
then
@@ -70,7 +71,7 @@ case "$1" in
show)
if [ "$HWCLOCKACCESS" != no ]
then
- hwclock --show
+ hwclock $tz --show
fi
;;
*)