diff options
author | Andreas Oberritter <obi@opendreambox.org> | 2012-03-13 20:14:40 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-13 23:18:47 +0000 |
commit | d90cfa776f245e73229364b6b8bb9f449afe059a (patch) | |
tree | 17f9a1b21cff6e7589e653081dddc308a6d94b86 /meta | |
parent | d074b8ad6f1c6b10af79b6ed8db3b08298255a72 (diff) | |
download | poky-d90cfa776f245e73229364b6b8bb9f449afe059a.tar.gz |
initscripts: test whether /etc/init.d/hwclock.sh exists
* bootmisc.sh executes /etc/init.d/hwclock.sh, which
is optional (depends on CONFIG_HWCLOCK in busybox).
(From OE-Core rev: 9c8300f030b69652ad39e1bc2979f5d9a03adf1e)
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rwxr-xr-x | meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh | 4 | ||||
-rw-r--r-- | meta/recipes-core/initscripts/initscripts_1.0.bb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh index 5b86e798b6..4f76cb4b28 100755 --- a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh +++ b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh | |||
@@ -65,14 +65,14 @@ fi | |||
65 | # Set the system clock from hardware clock | 65 | # Set the system clock from hardware clock |
66 | # If the timestamp is more recent than the current time, | 66 | # If the timestamp is more recent than the current time, |
67 | # use the timestamp instead. | 67 | # use the timestamp instead. |
68 | /etc/init.d/hwclock.sh start | 68 | test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh start |
69 | if test -e /etc/timestamp | 69 | if test -e /etc/timestamp |
70 | then | 70 | then |
71 | SYSTEMDATE=`date -u +%4Y%2m%2d%2H%2M` | 71 | SYSTEMDATE=`date -u +%4Y%2m%2d%2H%2M` |
72 | read TIMESTAMP < /etc/timestamp | 72 | read TIMESTAMP < /etc/timestamp |
73 | if [ ${TIMESTAMP} -gt $SYSTEMDATE ]; then | 73 | if [ ${TIMESTAMP} -gt $SYSTEMDATE ]; then |
74 | date -u ${TIMESTAMP#????}${TIMESTAMP%????????} | 74 | date -u ${TIMESTAMP#????}${TIMESTAMP%????????} |
75 | /etc/init.d/hwclock.sh stop | 75 | test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh stop |
76 | fi | 76 | fi |
77 | fi | 77 | fi |
78 | : exit 0 | 78 | : exit 0 |
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb index f3dc852624..829694b462 100644 --- a/meta/recipes-core/initscripts/initscripts_1.0.bb +++ b/meta/recipes-core/initscripts/initscripts_1.0.bb | |||
@@ -3,7 +3,7 @@ DESCRIPTION = "Initscripts provide the basic system startup initialization scrip | |||
3 | SECTION = "base" | 3 | SECTION = "base" |
4 | LICENSE = "GPLv2" | 4 | LICENSE = "GPLv2" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" |
6 | PR = "r133" | 6 | PR = "r134" |
7 | 7 | ||
8 | INHIBIT_DEFAULT_DEPS = "1" | 8 | INHIBIT_DEFAULT_DEPS = "1" |
9 | 9 | ||