mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 00:59:48 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
d074b8ad6f
commit
d90cfa776f
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user