@@ -475,6 +475,7 @@ SYSTEMD_ROOTFS_PRE_CMD_HOOKS += SYSTEMD_RM_SOURCE_CATALOGS_HOOK
endif
define SYSTEMD_INSTALL_INIT_HOOK
+ $(if $(SYSTEMD_TIMESYNCD_USER),mkdir -p $(TARGET_DIR)/var/lib/systemd/timesync)
ln -fs multi-user.target \
$(TARGET_DIR)/usr/lib/systemd/system/default.target
endef
@@ -522,6 +523,10 @@ define SYSTEMD_USERS
$(SYSTEMD_TIMESYNCD_USER)
endef
+define SYSTEMD_PERMISSIONS
+ $(if $(SYSTEMD_TIMESYNCD_USER),/var/lib/systemd/timesync d 755 systemd-timesync systemd-timesync - - - - -)
+endef
+
ifneq ($(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)),)
# systemd provides multiple units to autospawn getty as neede
# * getty@.service to start a getty on normal TTY
On an read-only filesystem the timesync service will not start as the state directory cant be created. If the directory exists, then the service can start, obviously wont safe its state, but will otherwise work. Signed-off-by: Norbert Lange <nolange79@gmail.com> --- package/systemd/systemd.mk | 5 +++++ 1 file changed, 5 insertions(+)