hwclock.sh: check for the existence of /etc/default/rcS
authorChen Qi <Qi.Chen@windriver.com>
Tue, 19 Feb 2013 07:59:40 +0000 (15:59 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 22 Feb 2013 14:09:22 +0000 (06:09 -0800)
/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>
meta/recipes-core/busybox/files/hwclock.sh

index cc6d286..be5f94d 100644 (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