From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com ([192.55.52.93]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1S103I-00080h-Tv for openembedded-core@lists.openembedded.org; Fri, 24 Feb 2012 19:39:33 +0100 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 24 Feb 2012 10:31:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.71,315,1320652800"; d="scan'208";a="121016848" Received: from unknown (HELO [10.255.15.58]) ([10.255.15.58]) by fmsmga001.fm.intel.com with ESMTP; 24 Feb 2012 10:31:09 -0800 Message-ID: <4F47D76D.50805@linux.intel.com> Date: Fri, 24 Feb 2012 10:31:09 -0800 From: Saul Wold User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 MIME-Version: 1.0 To: Patches and discussions about the oe-core layer References: <1328890565-8304-1-git-send-email-gary@mlbassoc.com> In-Reply-To: <1328890565-8304-1-git-send-email-gary@mlbassoc.com> Subject: Re: [PATCH] initscripts: Make /etc/timestamp consistent again. X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Patches and discussions about the oe-core layer List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 18:39:33 -0000 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 02/10/2012 08:16 AM, Gary Thomas wrote: > Commit cc8695 changed the way timestamps were handled > and added some extra munging to be able to compare them > reliably. This change makes the timestamp value the same > everywhere and simplifies how the check to set the system > clock based on the timestamp is done. > > Also, if the value stored in /etc/timestamp is newer > [at all] than the current system time, set the system clock > from the stored value, down to the minute, not just the day. > > Signed-off-by: Gary Thomas > --- > .../initscripts/initscripts-1.0/bootmisc.sh | 4 ++-- > .../initscripts/initscripts-1.0/save-rtc.sh | 2 +- > meta/recipes-core/initscripts/initscripts_1.0.bb | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh > index d9e8ffa..20ec0a0 100755 > --- a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh > +++ b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh > @@ -68,9 +68,9 @@ fi > /etc/init.d/hwclock.sh start > if test -e /etc/timestamp > then > - SYSTEMDATE=`date -u +%4Y%2m%2d` > + SYSTEMDATE=`date -u +%4Y%2m%2d%2H%2M` > read TIMESTAMP< /etc/timestamp > - if [ ${TIMESTAMP#????????}${TIMESTAMP%????????} -gt $SYSTEMDATE ]; then > + if [ ${TIMESTAMP} -gt $SYSTEMDATE ]; then > date -u $TIMESTAMP > /etc/init.d/hwclock.sh stop > 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 3d8e850..1f804e2 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 -u +%2m%2d%2H%2M%4Y> /etc/timestamp > +date -u +%4Y%2m%2d%2H%2M> /etc/timestamp > diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb > index 203c605..b56c55c 100644 > --- a/meta/recipes-core/initscripts/initscripts_1.0.bb > +++ b/meta/recipes-core/initscripts/initscripts_1.0.bb > @@ -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 = "r129" > +PR = "r130" > > INHIBIT_DEFAULT_DEPS = "1" > Merged into OE-core Thanks Sau!