From 38c1df36c067ac74109f3f8c8ad7d76d8c238a35 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Sun, 8 Jul 2018 00:43:46 +0200 Subject: [PATCH] Fix time on overlay (#88) * Fix time on overlay * Fix rights * Fix timesync --- buildroot-external/misc/rauc-hook | 11 +++++++++++ .../system/systemd-timesyncd.service.d/hassos.conf | 2 ++ .../system/systemd-timesyncd.service.d/ro.conf | 2 ++ 3 files changed, 15 insertions(+) create mode 100644 buildroot-external/rootfs-overlay/etc/systemd/system/systemd-timesyncd.service.d/hassos.conf create mode 100644 buildroot-external/rootfs-overlay/etc/systemd/system/systemd-timesyncd.service.d/ro.conf diff --git a/buildroot-external/misc/rauc-hook b/buildroot-external/misc/rauc-hook index 815a6c5fb..ca2503fa6 100755 --- a/buildroot-external/misc/rauc-hook +++ b/buildroot-external/misc/rauc-hook @@ -1,5 +1,8 @@ #!/bin/sh +## +# Hooks + # Handle boot hocks if [ "${RAUC_SLOT_CLASS}" = "boot" ]; then if [ "${1}" = "slot-post-install" ]; then @@ -9,4 +12,12 @@ if [ "${RAUC_SLOT_CLASS}" = "boot" ]; then fi fi +## +# Fixups + +# timesyncd +if [ ! -d /var/lib/systemd/timesync ]; then + rm /var/lib/systemd/timesync +fi + exit 0 diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/systemd-timesyncd.service.d/hassos.conf b/buildroot-external/rootfs-overlay/etc/systemd/system/systemd-timesyncd.service.d/hassos.conf new file mode 100644 index 000000000..deca0bec3 --- /dev/null +++ b/buildroot-external/rootfs-overlay/etc/systemd/system/systemd-timesyncd.service.d/hassos.conf @@ -0,0 +1,2 @@ +[Unit] +RequiresMountsFor=/var/lib/systemd diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/systemd-timesyncd.service.d/ro.conf b/buildroot-external/rootfs-overlay/etc/systemd/system/systemd-timesyncd.service.d/ro.conf new file mode 100644 index 000000000..b288b102f --- /dev/null +++ b/buildroot-external/rootfs-overlay/etc/systemd/system/systemd-timesyncd.service.d/ro.conf @@ -0,0 +1,2 @@ +[Service] +DynamicUser=no