Skip to contentSkip to conversation

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

PATCH In review [email protected] 2 participants 4 messages Feb 19, 2013 – Feb 20, 2013

lore
Share & tools
lore
#0 lore raw

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

From: Chen Qi <[email protected]>

The following changes since commit c7b23ab68aafc04d9830ef318015912e5d4f0672:

maintainers.inc: update ownership of recipes (2013-02-17 22:33:30 +0000)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib ChenQi/rcs-default
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/rcs-default

Chen Qi (1):
hwclock.sh: check for the existence of /etc/default/rcS

 meta/recipes-core/busybox/files/hwclock.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
1.7.9.5
#1 lore raw

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

From: Chen Qi <[email protected]>

/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]

---
 meta/recipes-core/busybox/files/hwclock.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/busybox/files/hwclock.sh +1 -1
index cc6d286..be5f94d 100644
@@ -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
Signature · 1 line
1.7.9.5
#2 lore raw
Quoted 17 lines · On 19 February 2013 08:59, <[email protected]> wrote:

From: Chen Qi <[email protected]>

/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]

---
 meta/recipes-core/busybox/files/hwclock.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/busybox/files/hwclock.sh +0 -0
index cc6d286..be5f94d 100644

meta/recipes-core/busybox/files/hwclock.sh line 23

Quoted 5 lines
meta/recipes-core/busybox/files/hwclock.sh +1 -1
@@ -20,7 +20,7 @@
 
 [ ! -x /sbin/hwclock ] && exit 0
 
-. /etc/default/rcS
+[ -f /etc/default/rcS ] && . /etc/default/rcS

I'd make that -r fwiw.

author
#3 lore raw
Quoted 19 lines · Bernhard Reutner-Fischer
Quoted 18 lines · On 19 February 2013 08:59, <[email protected]> wrote:

From: Chen Qi <[email protected]>

/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]

---
  meta/recipes-core/busybox/files/hwclock.sh |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/busybox/files/hwclock.sh +0 -0
index cc6d286..be5f94d 100644
@@ -20,7 +20,7 @@
 
Quoted 7 lines

meta/recipes-core/busybox/files/hwclock.sh line 23

Quoted 4 lines
meta/recipes-core/busybox/files/hwclock.sh +1 -1
  [ ! -x /sbin/hwclock ] && exit 0
 
-. /etc/default/rcS
+[ -f /etc/default/rcS ] && . /etc/default/rcS

I'd make that -r fwiw.

Thank you for your review.
In this case, I think they have the same effect.

Best Regards,
Chen Qi