From 0e71f5111988fe57531d1c84bdf631f1932b14bc Mon Sep 17 00:00:00 2001 From: Joseph Kogut Date: Mon, 24 Aug 2020 17:02:46 -0700 Subject: [PATCH] systemd: ensure tmpfiles.d/legacy.conf is installed Systemd doesn't install tmpfiles.d/legacy.conf when sysv compatiblity isn't enabled. This config sets up /var/lock, which many programs such as uboot's fw_printenv/setenv still depend on by default. Signed-off-by: Joseph Kogut Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/systemd/systemd.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk index 17bb922f51..b3b5ed600d 100644 --- a/package/systemd/systemd.mk +++ b/package/systemd/systemd.mk @@ -563,9 +563,17 @@ define SYSTEMD_INSTALL_MACHINEID_HOOK touch $(TARGET_DIR)/etc/machine-id endef +# systemd doesn't install legacy.conf without sysv-compat +# This config ensures /var/lock is created +define SYSTEMD_INSTALL_LEGACY_CONF_HOOK + $(INSTALL) -D -m 0644 $(@D)/tmpfiles.d/legacy.conf \ + $(TARGET_DIR)/usr/lib/tmpfiles.d +endef + SYSTEMD_POST_INSTALL_TARGET_HOOKS += \ SYSTEMD_INSTALL_INIT_HOOK \ - SYSTEMD_INSTALL_MACHINEID_HOOK + SYSTEMD_INSTALL_MACHINEID_HOOK \ + SYSTEMD_INSTALL_LEGACY_CONF_HOOK define SYSTEMD_INSTALL_IMAGES_CMDS $(SYSTEMD_INSTALL_BOOT_FILES)