summaryrefslogtreecommitdiff
path: root/meta/recipes-core/initscripts
diff options
context:
space:
mode:
authorGary Thomas <gary@mlbassoc.com>2010-11-04 05:34:12 -0600
committerSaul Wold <sgw@linux.intel.com>2010-11-14 21:08:22 -0800
commit2078af333d704fd894a2dedbc19cef5775cdadbb (patch)
tree263946bffe2aec49662ed1151cb3552b0834c913 /meta/recipes-core/initscripts
parent85bd3d644a5b8711f5ebee9c71ceaf278a02dbb5 (diff)
downloadopenembedded-core-2078af333d704fd894a2dedbc19cef5775cdadbb.tar.gz
openembedded-core-2078af333d704fd894a2dedbc19cef5775cdadbb.tar.bz2
openembedded-core-2078af333d704fd894a2dedbc19cef5775cdadbb.tar.xz
openembedded-core-2078af333d704fd894a2dedbc19cef5775cdadbb.zip
image.bbclass/initscripts: Make /etc/timestamp usage consistent.
Timestamp is kept in UTC Remove superfluous 'create_etc_timestamp()' function - seems to be a duplicate of 'rootfs_update_timestamp()' Remove External function reference [sgw@linux.intel.com: merged 2 patches and cleanup commit message] Signed-off-by: Gary Thomas <gary@mlbassoc.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-core/initscripts')
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh8
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh2
2 files changed, 5 insertions, 5 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
index 162df2b87..03fd67c67 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
@@ -65,13 +65,13 @@ fi
# If the timestamp is 1 day or more recent than the current time,
# use the timestamp instead.
/etc/init.d/hwclock.sh start
-if test -e /etc/timestamp2
+if test -e /etc/timestamp
then
- SYSTEMDATE=`date "+%Y%m%d%2H%2M"`
- read TIMESTAMP < /etc/timestamp2
+ SYSTEMDATE=`date -u +%2m%2d%2H%2M%4Y`
+ read TIMESTAMP < /etc/timestamp
NEEDUPDATE=`expr \( $TIMESTAMP \> $SYSTEMDATE + 10000 \)`
if [ $NEEDUPDATE -eq 1 ]; then
- date -s $TIMESTAMP
+ date -u $TIMESTAMP
/etc/init.d/hwclock.sh stop
fi
fi
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 75e43001b..77aa11c36 100644
--- a/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh
@@ -10,4 +10,4 @@
### END INIT INFO
# Update the timestamp
-date +%Y%m%d%2H%2M > /etc/timestamp2
+date -u +%2m%2d%2H%2M%4Y > /etc/timestamp