Skip to contentSkip to conversation

package/skeleton-init-systemd: support /var/lock again

PATCH Applied Norbert Lange 2 participants 2 messages Jan 9, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/skeleton-init-systemd: support /var/lock again

systemd's own configuration file is not installed anymore, as side effect of disabling sysv support.

the funtionality is added back in skeleton-init-systemd, since this is a buildroot feature to support software expecting this directories to exist, as well as trying to be similar to other init systems.

---
 package/skeleton-init-systemd/legacy.conf              | 7 +++++++
 package/skeleton-init-systemd/skeleton-init-systemd.mk | 1 +
 2 files changed, 8 insertions(+)
 create mode 100644 package/skeleton-init-systemd/legacy.conf
package/skeleton-init-systemd/legacy.conf new file +7 -0
new file mode 100644
index 0000000000..0a5393408c
@@ -0,0 +1,7 @@
+# Create legacy directories for buildroot
+# This is a subset of systemd's legacy.conf
+
+d /run/lock 0755 root root -
+d /run/lock/subsys 0755 root root -
+
+L /var/lock - - - - ../run/lock
package/skeleton-init-systemd/skeleton-init-systemd.mk +1 -0
index 5d6b716f7a..1e212cc2f7 100644
@@ -62,6 +62,7 @@ define SKELETON_INIT_SYSTEMD_INSTALL_TARGET_CMDS
 	mkdir -p $(TARGET_DIR)/srv
 	mkdir -p $(TARGET_DIR)/var
 	ln -s ../run $(TARGET_DIR)/var/run
+	install -D -m644 $(SKELETON_INIT_SYSTEMD_PKGDIR)/legacy.conf $(TARGET_DIR)/usr/lib/tmpfiles.d/legacy.conf
 	$(SKELETON_INIT_SYSTEMD_ROOT_RO_OR_RW)
 endef
 
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 9 lines · Norbert Lange

systemd's own configuration file is not installed anymore, as side effect of disabling sysv support.

the funtionality is added back in skeleton-init-systemd, since this is a buildroot feature to support software expecting this directories to exist, as well as trying to be similar to other init systems.

Applied to master, thanks.

Regards,
Arnout

Quoted 25 lines
---
  package/skeleton-init-systemd/legacy.conf              | 7 +++++++
  package/skeleton-init-systemd/skeleton-init-systemd.mk | 1 +
  2 files changed, 8 insertions(+)

create mode 100644 package/skeleton-init-systemd/legacy.conf

package/skeleton-init-systemd/legacy.conf new file +7 -0
new file mode 100644
index 0000000000..0a5393408c
@@ -0,0 +1,7 @@
+# Create legacy directories for buildroot
+# This is a subset of systemd's legacy.conf
+
+d /run/lock 0755 root root -
+d /run/lock/subsys 0755 root root -
+
+L /var/lock - - - - ../run/lock
package/skeleton-init-systemd/skeleton-init-systemd.mk +0 -0
index 5d6b716f7a..1e212cc2f7 100644

package/skeleton-init-systemd/skeleton-init-systemd.mk define SKELETON_INIT_SYSTEMD_INSTALL_TARGET_CMDS · line 68

Quoted 7 lines
package/skeleton-init-systemd/skeleton-init-systemd.mk +1 -0
@@ -62,6 +62,7 @@ define SKELETON_INIT_SYSTEMD_INSTALL_TARGET_CMDS
  	mkdir -p $(TARGET_DIR)/srv
  	mkdir -p $(TARGET_DIR)/var
  	ln -s ../run $(TARGET_DIR)/var/run
+	install -D -m644 $(SKELETON_INIT_SYSTEMD_PKGDIR)/legacy.conf $(TARGET_DIR)/usr/lib/tmpfiles.d/legacy.conf
  	$(SKELETON_INIT_SYSTEMD_ROOT_RO_OR_RW)
  endef
 

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot