Skip to contentSkip to conversation

initscripts: test whether /etc/init.d/hwclock.sh exists

PATCH Applied Andreas Oberritter 2 participants 2 messages Mar 13, 2012 – Mar 14, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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).

---
 .../initscripts/initscripts-1.0/bootmisc.sh        |    4 ++--
 meta/recipes-core/initscripts/initscripts_1.0.bb   |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh +2 -2
index 5b86e79..4f76cb4 100755
@@ -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
meta/recipes-core/initscripts/initscripts_1.0.bb +1 -1
index f3dc852..829694b 100644
@@ -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"
 
Signature · 1 line
1.7.5.4
Applied
#1 lore raw
Quoted 35 lines · Andreas Oberritter

* bootmisc.sh executes /etc/init.d/hwclock.sh, which is optional (depends on CONFIG_HWCLOCK in busybox).

---
  .../initscripts/initscripts-1.0/bootmisc.sh        |    4 ++--
  meta/recipes-core/initscripts/initscripts_1.0.bb   |    2 +-
  2 files changed, 3 insertions(+), 3 deletions(-)
meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh +2 -2
index 5b86e79..4f76cb4 100755
@@ -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
meta/recipes-core/initscripts/initscripts_1.0.bb +0 -0
index f3dc852..829694b 100644

meta/recipes-core/initscripts/initscripts_1.0.bb DESCRIPTION = "Initscripts provide the basic system startup initialization scrip · line 9

Quoted 8 lines
meta/recipes-core/initscripts/initscripts_1.0.bb +1 -1
@@ -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"
 

Merged into OE-Core

Thanks
Sau!