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>
This commit is contained in:
parent
aea2d8c02c
commit
7f6edde6af
|
@ -1,5 +1,5 @@
|
||||||
require busybox.inc
|
require busybox.inc
|
||||||
PR = "r3"
|
PR = "r4"
|
||||||
|
|
||||||
SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
|
SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
|
||||||
file://B921600.patch \
|
file://B921600.patch \
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
. /etc/default/rcS
|
. /etc/default/rcS
|
||||||
|
|
||||||
|
[ "$UTC" = "yes" ] && tz="--utc" || tz="--localtime"
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
if [ "$VERBOSE" != no ]
|
if [ "$VERBOSE" != no ]
|
||||||
|
@ -34,9 +35,9 @@ case "$1" in
|
||||||
then
|
then
|
||||||
if [ -z "$TZ" ]
|
if [ -z "$TZ" ]
|
||||||
then
|
then
|
||||||
hwclock --hctosys
|
hwclock $tz --hctosys
|
||||||
else
|
else
|
||||||
TZ="$TZ" hwclock --hctosys
|
TZ="$TZ" hwclock $tz --hctosys
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -59,7 +60,7 @@ case "$1" in
|
||||||
fi
|
fi
|
||||||
if [ "$HWCLOCKACCESS" != no ]
|
if [ "$HWCLOCKACCESS" != no ]
|
||||||
then
|
then
|
||||||
hwclock --systohc
|
hwclock $tz --systohc
|
||||||
fi
|
fi
|
||||||
if [ "$VERBOSE" != no ]
|
if [ "$VERBOSE" != no ]
|
||||||
then
|
then
|
||||||
|
@ -70,7 +71,7 @@ case "$1" in
|
||||||
show)
|
show)
|
||||||
if [ "$HWCLOCKACCESS" != no ]
|
if [ "$HWCLOCKACCESS" != no ]
|
||||||
then
|
then
|
||||||
hwclock --show
|
hwclock $tz --show
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -9,8 +9,8 @@ SULOGIN=no
|
||||||
# Set to no if you want to be able to login over telnet/rlogin
|
# Set to no if you want to be able to login over telnet/rlogin
|
||||||
# before system startup is complete (as soon as inetd is started)
|
# before system startup is complete (as soon as inetd is started)
|
||||||
DELAYLOGIN=no
|
DELAYLOGIN=no
|
||||||
# Set UTC=yes if your system clock is set to UTC (GMT), and UTC=no if not.
|
# Assume that the BIOS clock is set to UTC time (recommended)
|
||||||
# UTC=yes
|
UTC=yes
|
||||||
# Set VERBOSE to "no" if you would like a more quiet bootup.
|
# Set VERBOSE to "no" if you would like a more quiet bootup.
|
||||||
VERBOSE=no
|
VERBOSE=no
|
||||||
# Set EDITMOTD to "no" if you don't want /etc/motd to be edited automatically
|
# Set EDITMOTD to "no" if you don't want /etc/motd to be edited automatically
|
||||||
|
|
|
@ -5,7 +5,7 @@ SECTION = "base"
|
||||||
LICENSE = "GPLv2+"
|
LICENSE = "GPLv2+"
|
||||||
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
|
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
|
||||||
file://COPYRIGHT;endline=15;md5=349c872e0066155e1818b786938876a4"
|
file://COPYRIGHT;endline=15;md5=349c872e0066155e1818b786938876a4"
|
||||||
PR = "r7"
|
PR = "r8"
|
||||||
|
|
||||||
RDEPENDS_${PN} = "${PN}-inittab"
|
RDEPENDS_${PN} = "${PN}-inittab"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue