mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 00:59:48 +00:00
initscripts: Remove pointless forks from timestamp code
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5079 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
+5
-5
@@ -65,13 +65,13 @@ fi
|
|||||||
# If the timestamp is 1 day or more recent than the current time,
|
# If the timestamp is 1 day or more recent than the current time,
|
||||||
# use the timestamp instead.
|
# use the timestamp instead.
|
||||||
/etc/init.d/hwclock.sh start
|
/etc/init.d/hwclock.sh start
|
||||||
if test -e /etc/timestamp
|
if test -e /etc/timestamp2
|
||||||
then
|
then
|
||||||
SYSTEMDATE=`date "+%Y%m%d"`
|
SYSTEMDATE=`date "+%Y%m%d%2H%2M"`
|
||||||
TIMESTAMP=`cat /etc/timestamp | awk '{ print substr($0,9,4) substr($0,1,4);}'`
|
read TIMESTAMP < /etc/timestamp2
|
||||||
NEEDUPDATE=`expr \( $TIMESTAMP \> $SYSTEMDATE \)`
|
NEEDUPDATE=`expr \( $TIMESTAMP \> $SYSTEMDATE + 10000 \)`
|
||||||
if [ $NEEDUPDATE -eq 1 ]; then
|
if [ $NEEDUPDATE -eq 1 ]; then
|
||||||
date `cat /etc/timestamp`
|
date $TIMESTAMP
|
||||||
/etc/init.d/hwclock.sh stop
|
/etc/init.d/hwclock.sh stop
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
+1
-1
@@ -10,4 +10,4 @@
|
|||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
# Update the timestamp
|
# Update the timestamp
|
||||||
date +%2m%2d%2H%2M%Y > /etc/timestamp
|
date +%Y%m%d%2H%2M > /etc/timestamp2
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ PRIORITY = "required"
|
|||||||
DEPENDS = "makedevs"
|
DEPENDS = "makedevs"
|
||||||
RDEPENDS = "makedevs"
|
RDEPENDS = "makedevs"
|
||||||
LICENSE = "GPL"
|
LICENSE = "GPL"
|
||||||
PR = "r117"
|
PR = "r118"
|
||||||
|
|
||||||
SRC_URI = "file://functions \
|
SRC_URI = "file://functions \
|
||||||
file://halt \
|
file://halt \
|
||||||
|
|||||||
Reference in New Issue
Block a user