Add support for Finit specific tmpfiles.d/

The tmpfilesd() glob sorts files according to name, we could name our
.conf as 00finit.conf to prevent ordering issues with, e.g. dnsmasq,
but this is more elegant and allows for multi-level override.

NOTE: bootmisc depends on the pidfile plugins since the latter need
      to set up its iwatches of /run before bootmisc creates /run.
      Depending on if it's a system with /var/run or /run we need to
      drop /var/run before recreating it.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2023-02-28 00:49:55 +01:00
1 parent 28a90a793d
commit 11da93b759
5 files changed
+30 -10

No files matched your search

+3
View File
@@ -1,3 +1,6 @@
finitdir = $(finit_tmpfiles)
dist_finit_DATA = finit.conf
tmpfilesdir = $(tmpfiles_path)
dist_tmpfiles_DATA = etc.conf legacy.conf var.conf x11.conf
dist_tmpfiles_DATA += dnsmasq.conf frr.conf lldpd.conf openswan.conf \
+14
View File
@@ -0,0 +1,14 @@
# Finit expects to run on a Linux FHS compatible system.
# Preferably one where /run is used and is a RAM disk.
# This should be set up but OS/dist but is sometimes missing
# Note: l+ == only if ../run exists, if so, rm -rf /var/run
l+ /var/run - - - - ../run
# Finit directories
d /run/finit 0755 - - -
d /run/finit/cond 0755 - - -
d /run/finit/cond/pid 0755 - - -
d /run/finit/cond/sys 0755 - - -
d /run/finit/cond/usr 0755 - - -