summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core')
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh7
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh6
2 files changed, 10 insertions, 3 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
index df553bc079..591591f87f 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
@@ -8,7 +8,10 @@
8# Short-Description: Misc and other. 8# Short-Description: Misc and other.
9### END INIT INFO 9### END INIT INFO
10 10
11TIMESTAMP_FILE=/etc/timestamp
12
11. /etc/default/rcS 13. /etc/default/rcS
14[ -f /etc/default/timestamp ] && . /etc/default/timestamp
12# 15#
13# Put a nologin file in /etc to prevent people from logging in before 16# Put a nologin file in /etc to prevent people from logging in before
14# system startup is complete. 17# system startup is complete.
@@ -64,10 +67,10 @@ fi
64# If the timestamp is more recent than the current time, 67# If the timestamp is more recent than the current time,
65# use the timestamp instead. 68# use the timestamp instead.
66test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh start 69test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh start
67if test -e /etc/timestamp 70if test -e "$TIMESTAMP_FILE"
68then 71then
69 SYSTEMDATE=`date -u +%4Y%2m%2d%2H%2M%2S` 72 SYSTEMDATE=`date -u +%4Y%2m%2d%2H%2M%2S`
70 read TIMESTAMP < /etc/timestamp 73 read TIMESTAMP < "$TIMESTAMP_FILE"
71 if [ ${TIMESTAMP} -gt $SYSTEMDATE ]; then 74 if [ ${TIMESTAMP} -gt $SYSTEMDATE ]; then
72 # format the timestamp as date expects it (2m2d2H2M4Y.2S) 75 # format the timestamp as date expects it (2m2d2H2M4Y.2S)
73 TS_YR=${TIMESTAMP%??????????} 76 TS_YR=${TIMESTAMP%??????????}
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh b/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh
index 1632a5f649..ffa1eee43d 100644
--- a/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh
@@ -9,5 +9,9 @@
9# Description: 9# Description:
10### END INIT INFO 10### END INIT INFO
11 11
12TIMESTAMP_FILE=/etc/timestamp
13
14[ -f /etc/default/timestamp ] && . /etc/default/timestamp
15
12# Update the timestamp 16# Update the timestamp
13date -u +%4Y%2m%2d%2H%2M%2S 2>/dev/null > /etc/timestamp 17date -u +%4Y%2m%2d%2H%2M%2S 2>/dev/null > "$TIMESTAMP_FILE"