hwclock.sh: check for the existence of /etc/default/rcS

/etc/default/rcS might be missing if the init manager is not sysvinit.
So we have to check for the existence of this file before sourcing it.

[YOCTO #3697]

(From OE-Core rev: 416519ec595f59ebeafb95bed2546635cad41559)

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>
This commit is contained in:
Chen Qi 2013-02-19 15:59:40 +08:00 committed by Richard Purdie
parent c1aef57e20
commit b1c887277c
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@
[ ! -x /sbin/hwclock ] && exit 0
. /etc/default/rcS
[ -f /etc/default/rcS ] && . /etc/default/rcS
[ "$UTC" = "yes" ] && tz="--utc" || tz="--localtime"
case "$1" in