summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2012-03-13 20:14:40 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-13 23:18:47 +0000
commitd90cfa776f245e73229364b6b8bb9f449afe059a (patch)
tree17f9a1b21cff6e7589e653081dddc308a6d94b86 /meta
parentd074b8ad6f1c6b10af79b6ed8db3b08298255a72 (diff)
downloadpoky-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-xmeta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh4
-rw-r--r--meta/recipes-core/initscripts/initscripts_1.0.bb2
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 68test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh start
69if test -e /etc/timestamp 69if test -e /etc/timestamp
70then 70then
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
77fi 77fi
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
3SECTION = "base" 3SECTION = "base"
4LICENSE = "GPLv2" 4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" 5LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
6PR = "r133" 6PR = "r134"
7 7
8INHIBIT_DEFAULT_DEPS = "1" 8INHIBIT_DEFAULT_DEPS = "1"
9 9