summaryrefslogtreecommitdiffstats
path: root/meta
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
parent85bd3d644a5b8711f5ebee9c71ceaf278a02dbb5 (diff)
downloadpoky-2078af333d704fd894a2dedbc19cef5775cdadbb.tar.gz
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')
-rw-r--r--meta/classes/image.bbclass10
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh8
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh2
3 files changed, 8 insertions, 12 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 3db34ac193..9fa0155c8a 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -182,10 +182,6 @@ zap_root_password () {
182 mv ${IMAGE_ROOTFS}/etc/passwd.new ${IMAGE_ROOTFS}/etc/passwd 182 mv ${IMAGE_ROOTFS}/etc/passwd.new ${IMAGE_ROOTFS}/etc/passwd
183} 183}
184 184
185create_etc_timestamp() {
186 date +%2m%2d%2H%2M%Y >${IMAGE_ROOTFS}/etc/timestamp
187}
188
189# Turn any symbolic /sbin/init link into a file 185# Turn any symbolic /sbin/init link into a file
190remove_init_link () { 186remove_init_link () {
191 if [ -h ${IMAGE_ROOTFS}/sbin/init ]; then 187 if [ -h ${IMAGE_ROOTFS}/sbin/init ]; then
@@ -217,7 +213,7 @@ set_image_autologin () {
217# Can be use to create /etc/timestamp during image construction to give a reasonably 213# Can be use to create /etc/timestamp during image construction to give a reasonably
218# sane default time setting 214# sane default time setting
219rootfs_update_timestamp () { 215rootfs_update_timestamp () {
220 date "+%m%d%H%M%Y" >${IMAGE_ROOTFS}/etc/timestamp 216 date -u +%2m%2d%2H%2M%4Y >${IMAGE_ROOTFS}/etc/timestamp
221} 217}
222 218
223# Prevent X from being started 219# Prevent X from being started
@@ -239,7 +235,7 @@ rootfs_trim_schemas () {
239} 235}
240 236
241 237
242# export the zap_root_password, create_etc_timestamp and remote_init_link 238# export the zap_root_password, and remote_init_link
243EXPORT_FUNCTIONS zap_root_password create_etc_timestamp remove_init_link do_rootfs make_zimage_symlink_relative set_image_autologin rootfs_update_timestamp rootfs_no_x_startup 239EXPORT_FUNCTIONS zap_root_password remove_init_link do_rootfs make_zimage_symlink_relative set_image_autologin rootfs_update_timestamp rootfs_no_x_startup
244 240
245addtask rootfs before do_build after do_install 241addtask rootfs before do_build after do_install
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
index 162df2b87e..03fd67c67e 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
65# If the timestamp is 1 day or more recent than the current time, 65# If the timestamp is 1 day or more recent than the current time,
66# use the timestamp instead. 66# use the timestamp instead.
67/etc/init.d/hwclock.sh start 67/etc/init.d/hwclock.sh start
68if test -e /etc/timestamp2 68if test -e /etc/timestamp
69then 69then
70 SYSTEMDATE=`date "+%Y%m%d%2H%2M"` 70 SYSTEMDATE=`date -u +%2m%2d%2H%2M%4Y`
71 read TIMESTAMP < /etc/timestamp2 71 read TIMESTAMP < /etc/timestamp
72 NEEDUPDATE=`expr \( $TIMESTAMP \> $SYSTEMDATE + 10000 \)` 72 NEEDUPDATE=`expr \( $TIMESTAMP \> $SYSTEMDATE + 10000 \)`
73 if [ $NEEDUPDATE -eq 1 ]; then 73 if [ $NEEDUPDATE -eq 1 ]; then
74 date -s $TIMESTAMP 74 date -u $TIMESTAMP
75 /etc/init.d/hwclock.sh stop 75 /etc/init.d/hwclock.sh stop
76 fi 76 fi
77fi 77fi
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 75e43001b8..77aa11c36c 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 @@
10### END INIT INFO 10### END INIT INFO
11 11
12# Update the timestamp 12# Update the timestamp
13date +%Y%m%d%2H%2M > /etc/timestamp2 13date -u +%2m%2d%2H%2M%4Y > /etc/timestamp