]> code.ossystems Code Review - openembedded-core.git/commitdiff
initscripts: test whether /etc/init.d/hwclock.sh exists
authorAndreas Oberritter <obi@opendreambox.org>
Tue, 13 Mar 2012 19:14:40 +0000 (20:14 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 13 Mar 2012 23:16:05 +0000 (23:16 +0000)
* bootmisc.sh executes /etc/init.d/hwclock.sh, which
  is optional (depends on CONFIG_HWCLOCK in busybox).

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
meta/recipes-core/initscripts/initscripts_1.0.bb

index 5b86e798b6e6852f8cf58d1fd95b33d9eea3282d..4f76cb4b28816d1db26fac6066e3403af4c18325 100755 (executable)
@@ -65,14 +65,14 @@ fi
 # Set the system clock from hardware clock
 # If the timestamp is more recent than the current time,
 # use the timestamp instead.
-/etc/init.d/hwclock.sh start
+test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh start
 if test -e /etc/timestamp
 then
        SYSTEMDATE=`date -u +%4Y%2m%2d%2H%2M`
        read TIMESTAMP < /etc/timestamp
        if [ ${TIMESTAMP} -gt $SYSTEMDATE ]; then
                date -u ${TIMESTAMP#????}${TIMESTAMP%????????}
-               /etc/init.d/hwclock.sh stop
+               test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh stop
        fi
 fi
 : exit 0
index f3dc8526245dd833a032a71a050eb0ff5b1a0d4b..829694b462ea7d6194d273ae2bdc1c70b17baf50 100644 (file)
@@ -3,7 +3,7 @@ DESCRIPTION = "Initscripts provide the basic system startup initialization scrip
 SECTION = "base"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-PR = "r133"
+PR = "r134"
 
 INHIBIT_DEFAULT_DEPS = "1"