diff options
| author | Chen Qi <Qi.Chen@windriver.com> | 2012-11-01 14:47:46 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-11-02 16:18:30 +0000 |
| commit | 7f6edde6af6451b811c1c45139f6eede525798ae (patch) | |
| tree | a9eae514e8157a57351bb54ec1da2434b9af054b | |
| parent | aea2d8c02c7abd7ecbabae8b3932ceb7a01cb20d (diff) | |
| download | poky-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>
| -rw-r--r-- | meta/recipes-core/busybox/busybox_1.20.2.bb | 2 | ||||
| -rw-r--r-- | meta/recipes-core/busybox/files/hwclock.sh | 9 | ||||
| -rw-r--r-- | meta/recipes-core/sysvinit/sysvinit/rcS-default | 4 | ||||
| -rw-r--r-- | meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb | 2 |
4 files changed, 9 insertions, 8 deletions
diff --git a/meta/recipes-core/busybox/busybox_1.20.2.bb b/meta/recipes-core/busybox/busybox_1.20.2.bb index 4c0946af1f..3e628d239e 100644 --- a/meta/recipes-core/busybox/busybox_1.20.2.bb +++ b/meta/recipes-core/busybox/busybox_1.20.2.bb | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | require busybox.inc | 1 | require busybox.inc |
| 2 | PR = "r3" | 2 | PR = "r4" |
| 3 | 3 | ||
| 4 | SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ | 4 | SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ |
| 5 | file://B921600.patch \ | 5 | file://B921600.patch \ |
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 @@ | |||
| 22 | 22 | ||
| 23 | . /etc/default/rcS | 23 | . /etc/default/rcS |
| 24 | 24 | ||
| 25 | [ "$UTC" = "yes" ] && tz="--utc" || tz="--localtime" | ||
| 25 | case "$1" in | 26 | case "$1" in |
| 26 | start) | 27 | start) |
| 27 | if [ "$VERBOSE" != no ] | 28 | if [ "$VERBOSE" != no ] |
| @@ -34,9 +35,9 @@ case "$1" in | |||
| 34 | then | 35 | then |
| 35 | if [ -z "$TZ" ] | 36 | if [ -z "$TZ" ] |
| 36 | then | 37 | then |
| 37 | hwclock --hctosys | 38 | hwclock $tz --hctosys |
| 38 | else | 39 | else |
| 39 | TZ="$TZ" hwclock --hctosys | 40 | TZ="$TZ" hwclock $tz --hctosys |
| 40 | fi | 41 | fi |
| 41 | fi | 42 | fi |
| 42 | 43 | ||
| @@ -59,7 +60,7 @@ case "$1" in | |||
| 59 | fi | 60 | fi |
| 60 | if [ "$HWCLOCKACCESS" != no ] | 61 | if [ "$HWCLOCKACCESS" != no ] |
| 61 | then | 62 | then |
| 62 | hwclock --systohc | 63 | hwclock $tz --systohc |
| 63 | fi | 64 | fi |
| 64 | if [ "$VERBOSE" != no ] | 65 | if [ "$VERBOSE" != no ] |
| 65 | then | 66 | then |
| @@ -70,7 +71,7 @@ case "$1" in | |||
| 70 | show) | 71 | show) |
| 71 | if [ "$HWCLOCKACCESS" != no ] | 72 | if [ "$HWCLOCKACCESS" != no ] |
| 72 | then | 73 | then |
| 73 | hwclock --show | 74 | hwclock $tz --show |
| 74 | fi | 75 | fi |
| 75 | ;; | 76 | ;; |
| 76 | *) | 77 | *) |
diff --git a/meta/recipes-core/sysvinit/sysvinit/rcS-default b/meta/recipes-core/sysvinit/sysvinit/rcS-default index fc6d41522e..3c9dea90c4 100644 --- a/meta/recipes-core/sysvinit/sysvinit/rcS-default +++ b/meta/recipes-core/sysvinit/sysvinit/rcS-default | |||
| @@ -9,8 +9,8 @@ SULOGIN=no | |||
| 9 | # Set to no if you want to be able to login over telnet/rlogin | 9 | # Set to no if you want to be able to login over telnet/rlogin |
| 10 | # before system startup is complete (as soon as inetd is started) | 10 | # before system startup is complete (as soon as inetd is started) |
| 11 | DELAYLOGIN=no | 11 | DELAYLOGIN=no |
| 12 | # Set UTC=yes if your system clock is set to UTC (GMT), and UTC=no if not. | 12 | # Assume that the BIOS clock is set to UTC time (recommended) |
| 13 | # UTC=yes | 13 | UTC=yes |
| 14 | # Set VERBOSE to "no" if you would like a more quiet bootup. | 14 | # Set VERBOSE to "no" if you would like a more quiet bootup. |
| 15 | VERBOSE=no | 15 | VERBOSE=no |
| 16 | # Set EDITMOTD to "no" if you don't want /etc/motd to be edited automatically | 16 | # Set EDITMOTD to "no" if you don't want /etc/motd to be edited automatically |
diff --git a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb index 63333b06f4..1647a0fc3a 100644 --- a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb +++ b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb | |||
| @@ -5,7 +5,7 @@ SECTION = "base" | |||
| 5 | LICENSE = "GPLv2+" | 5 | LICENSE = "GPLv2+" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ |
| 7 | file://COPYRIGHT;endline=15;md5=349c872e0066155e1818b786938876a4" | 7 | file://COPYRIGHT;endline=15;md5=349c872e0066155e1818b786938876a4" |
| 8 | PR = "r7" | 8 | PR = "r8" |
| 9 | 9 | ||
| 10 | RDEPENDS_${PN} = "${PN}-inittab" | 10 | RDEPENDS_${PN} = "${PN}-inittab" |
| 11 | 11 | ||
