> On Jun 16, 2016, at 7:17 AM, Jan Remmet <j.rem...@phytec.de> wrote: > > On Wed, Jun 15, 2016 at 12:14:17PM -0700, Khem Raj wrote: >> >>> On Jun 15, 2016, at 6:36 AM, Jan Remmet <j.rem...@phytec.de> 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. >>> >>> Signed-off-by: Jan Remmet <j.rem...@phytec.de> >>> --- >>> 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 >>> } >> >> i wonder if this will work with read only rootfs. > I found no special handling for systemd and /var/lib if IMAGE_FEATURES > read-only-rootfs is used. > If timesyncd didn't find /var/lib/systemd/clock it defaults to the configure > time value und try to write /var/lib/systemd/clock. On read-only it will > silently fail. > So I don't see a problem here.
It fixes one case when rootfs is r/w but create another behavior when its r/o in r/o case /var/lib/systemd must be mounted r/w during boot. So the timesyncd service should check for that directory to exist I have a hunch if thats checked then this patch may not be needed > > Jan >> >>> >>> # Prevent X from being started >>> -- >>> 1.9.1 >>> >>> -- >>> _______________________________________________ >>> Openembedded-core mailing list >>> Openembedded-core@lists.openembedded.org >>> http://lists.openembedded.org/mailman/listinfo/openembedded-core >> > >
signature.asc
Description: Message signed with OpenPGP using GPGMail
-- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core