> Op 24 mrt. 2016, om 20:04 heeft Max Krummenacher <max.oss...@gmail.com> het 
> volgende geschreven:
> 
> The following commit changed the format of /etc/timestamp to include
> additionally seconds when initially created. e.g. the file now contains
> 20160223174913
> 
> https://github.com/Angstrom-distribution/meta-angstrom/commit/8228b2d56ef2415c8b96d1463fb38816279d4c74
> 
> Follow that change for the systemd implementation of the poor man's RTC.
> 
> Signed-off-by: Max Krummenacher <max.krummenac...@toradex.com>
> ---
> The change in oe-core is present since the fido release.
> Thus it makes sense to apply the fix for fido/jethro/master

Applied to all three branches, thanks!


> 
> Cheers
> Max
> 
> recipes-core/systemd/timestamp-service/load-timestamp.sh | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/recipes-core/systemd/timestamp-service/load-timestamp.sh 
> b/recipes-core/systemd/timestamp-service/load-timestamp.sh
> index 9ad0e94..6902d1d 100644
> --- a/recipes-core/systemd/timestamp-service/load-timestamp.sh
> +++ b/recipes-core/systemd/timestamp-service/load-timestamp.sh
> @@ -3,19 +3,19 @@
> if [ "$1" != "--save" ] ; then
> 
> # Set the system clock from timestamp file
> -# if the timestamp is 1 minute or more recent
> +# if the timestamp is 1 second or more recent
> # than the current systemtime.
> 
> -SYSTEMDATE=$(/bin/date -u "+%4Y%2m%2d%2H%2M")
> +SYSTEMDATE=$(/bin/date -u "+%4Y%2m%2d%2H%2M%2S")
> 
> TIMESTAMP=$(/bin/cat /etc/timestamp 2>/dev/null)
> 
> if [ $SYSTEMDATE -lt $TIMESTAMP ] 2>/dev/null ; then
>       echo "Update systemtime from /etc/timestamp"
> -     /bin/date -u ${TIMESTAMP#????}${TIMESTAMP%????????}
> +     /bin/date -u ${TIMESTAMP:4:8}${TIMESTAMP:0:4}.${TIMESTAMP:(-2)}
> fi
> 
> else
> # Store the current systemtime in /etc/timestamp
> -     /bin/date -u +%4Y%2m%2d%2H%2M > /etc/timestamp
> +     /bin/date -u +%4Y%2m%2d%2H%2M%2S > /etc/timestamp
> fi
> -- 
> 1.9.3
> 
> 
> _______________________________________________
> Angstrom-distro-devel mailing list
> Angstrom-distro-devel@linuxtogo.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel


_______________________________________________
Angstrom-distro-devel mailing list
Angstrom-distro-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel

Reply via email to