Skip to content

Commit

Permalink
package/skeleton-init-systemd: support /var/lock again
Browse files Browse the repository at this point in the history
systemd's own configuration file is not installed anymore,
as side effect of disabling sysv support in commit
96f0d99.

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

Create our own legacy.conf instead of using the one from upstream,
because:

- upstream has legacy.conf.in which has to be preprocessed;
- we don't want to enable upstream's full sysv support as explained in
  commit 96f0d99;
- we would probably need to post-process upstream's legacy.conf anyway
  since it doesn't fully match with buildroot expectations.

Signed-off-by: Norbert Lange <[email protected]>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
  • Loading branch information
nolange authored and arnout committed Jan 9, 2022
1 parent 85aab41 commit 97eb7d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions package/skeleton-init-systemd/legacy.conf
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions package/skeleton-init-systemd/skeleton-init-systemd.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 97eb7d0

Please sign in to comment.