[Buildroot] [PATCH] system/skeleton: make /var/run a symlink to /run

Norbert Lange nolange79 at gmail.com
Mon Jun 29 10:47:49 UTC 2020


both systemd and FHS3 denote /var/run as a compatibility directory,
new systems should use /run.

There seems to be little reason to not switch to the new FHS layout
with buildroot, and adding the compatibility symlink.

[1] - https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s13.html

Signed-off-by: Norbert Lange <nolange79 at gmail.com>
---
 package/skeleton-init-systemd/skeleton-init-systemd.mk | 2 --
 system/skeleton/var/run                                | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)
 create mode 120000 system/skeleton/var/run

diff --git a/package/skeleton-init-systemd/skeleton-init-systemd.mk b/package/skeleton-init-systemd/skeleton-init-systemd.mk
index 5d6b716f7a..528cf43e61 100644
--- a/package/skeleton-init-systemd/skeleton-init-systemd.mk
+++ b/package/skeleton-init-systemd/skeleton-init-systemd.mk
@@ -60,8 +60,6 @@ endif
 define SKELETON_INIT_SYSTEMD_INSTALL_TARGET_CMDS
 	mkdir -p $(TARGET_DIR)/home
 	mkdir -p $(TARGET_DIR)/srv
-	mkdir -p $(TARGET_DIR)/var
-	ln -s ../run $(TARGET_DIR)/var/run
 	$(SKELETON_INIT_SYSTEMD_ROOT_RO_OR_RW)
 endef
 
diff --git a/system/skeleton/var/run b/system/skeleton/var/run
new file mode 120000
index 0000000000..84ba55b912
--- /dev/null
+++ b/system/skeleton/var/run
@@ -0,0 +1 @@
+../run
\ No newline at end of file
-- 
2.27.0



More information about the buildroot mailing list