Re: [oe] [PATCH] rootfs-postcommands: generate /var/lib/systemd/clock

2016-06-15 Thread Jan Remmet
On Wed, Jun 15, 2016 at 12:02:18PM +0200, Martin Jansa wrote:
> On Wed, Jun 15, 2016 at 11:23:32AM +0200, Jan Remmet wrote:
> > systemd timesyncd check /var/lib/systemd/clock instead of
> > /etc/timestamp.
> > If this file is missing it defaults to TIME_EPOCH. It's set while
> > configuring systemd.
> 
> Wrong ML, re-send to openembedded-core
Thanks,

Jan
> > 
> > Signed-off-by: Jan Remmet 
> > ---
> >  meta/classes/rootfs-postcommands.bbclass | 6 ++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/meta/classes/rootfs-postcommands.bbclass 
> > b/meta/classes/rootfs-postcommands.bbclass
> > index db8b551..0c7b764 100644
> > --- a/meta/classes/rootfs-postcommands.bbclass
> > +++ b/meta/classes/rootfs-postcommands.bbclass
> > @@ -234,6 +234,12 @@ python write_image_manifest () {
> >  # sane default time setting
> >  rootfs_update_timestamp () {
> > date -u +%4Y%2m%2d%2H%2M%2S >${IMAGE_ROOTFS}/etc/timestamp
> > +
> > +   if ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "true", "false", 
> > d)}; then
> > +   # touch needs timestamp as [[CC]YY]MMDDhhmm[.ss]
> > +   TS=$(sed 's/[.]*/&./13' ${IMAGE_ROOTFS}/etc/timestamp)
> > +   touch -t $TS ${IMAGE_ROOTFS}/var/lib/systemd/clock
> > +   fi
> >  }
> >  
> >  # Prevent X from being started
> > -- 
> > 1.9.1
> > 
> > -- 
> > ___
> > Openembedded-devel mailing list
> > Openembedded-devel@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> 
> -- 
> Martin 'JaMa' Jansa jabber: martin.ja...@gmail.com



> -- 
> ___
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


Re: [oe] [PATCH] rootfs-postcommands: generate /var/lib/systemd/clock

2016-06-15 Thread Martin Jansa
On Wed, Jun 15, 2016 at 11:23:32AM +0200, Jan Remmet wrote:
> systemd timesyncd check /var/lib/systemd/clock instead of
> /etc/timestamp.
> If this file is missing it defaults to TIME_EPOCH. It's set while
> configuring systemd.

Wrong ML, re-send to openembedded-core
> 
> Signed-off-by: Jan Remmet 
> ---
>  meta/classes/rootfs-postcommands.bbclass | 6 ++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/meta/classes/rootfs-postcommands.bbclass 
> b/meta/classes/rootfs-postcommands.bbclass
> index db8b551..0c7b764 100644
> --- a/meta/classes/rootfs-postcommands.bbclass
> +++ b/meta/classes/rootfs-postcommands.bbclass
> @@ -234,6 +234,12 @@ python write_image_manifest () {
>  # sane default time setting
>  rootfs_update_timestamp () {
>   date -u +%4Y%2m%2d%2H%2M%2S >${IMAGE_ROOTFS}/etc/timestamp
> +
> + if ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "true", "false", 
> d)}; then
> + # touch needs timestamp as [[CC]YY]MMDDhhmm[.ss]
> + TS=$(sed 's/[.]*/&./13' ${IMAGE_ROOTFS}/etc/timestamp)
> + touch -t $TS ${IMAGE_ROOTFS}/var/lib/systemd/clock
> + fi
>  }
>  
>  # Prevent X from being started
> -- 
> 1.9.1
> 
> -- 
> ___
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa jabber: martin.ja...@gmail.com


signature.asc
Description: Digital signature
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [PATCH] rootfs-postcommands: generate /var/lib/systemd/clock

2016-06-15 Thread Jan Remmet
systemd timesyncd check /var/lib/systemd/clock instead of
/etc/timestamp.
If this file is missing it defaults to TIME_EPOCH. It's set while
configuring systemd.

Signed-off-by: Jan Remmet 
---
 meta/classes/rootfs-postcommands.bbclass | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/meta/classes/rootfs-postcommands.bbclass 
b/meta/classes/rootfs-postcommands.bbclass
index db8b551..0c7b764 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -234,6 +234,12 @@ python write_image_manifest () {
 # sane default time setting
 rootfs_update_timestamp () {
date -u +%4Y%2m%2d%2H%2M%2S >${IMAGE_ROOTFS}/etc/timestamp
+
+   if ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "true", "false", 
d)}; then
+   # touch needs timestamp as [[CC]YY]MMDDhhmm[.ss]
+   TS=$(sed 's/[.]*/&./13' ${IMAGE_ROOTFS}/etc/timestamp)
+   touch -t $TS ${IMAGE_ROOTFS}/var/lib/systemd/clock
+   fi
 }
 
 # Prevent X from being started
-- 
1.9.1

-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel