]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix: add a missing tmpfilesconfdir global variable
authorJóhann B. Guðmundsson <johannbg@gmail.com>
Wed, 5 May 2021 09:41:02 +0000 (09:41 +0000)
committerHarald Hoyer <harald@hoyer.xyz>
Thu, 6 May 2021 13:49:18 +0000 (15:49 +0200)
Adding a missing tmpfilesconfdir global variable

dracut.sh
modules.d/01systemd-tmpfiles/module-setup.sh

index c19606ae5ec1d7a567a0424be76eec39d1b6c1fe..ff622dde1692ef2020f57a21158ccf1c66708dce 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -1768,6 +1768,11 @@ if ! [[ -d $dracutsysrootdir$tmpfilesdir ]]; then
     [[ -d $dracutsysrootdir/usr/lib/tmpfiles.d ]] && tmpfilesdir=/usr/lib/tmpfiles.d
 fi
 
+[[ -d $dracutsysrootdir$tmpfilesconfdir ]] \
+    || tmpfilesconfdir=$(pkg-config systemd --variable=tmpfilesconfdir 2> /dev/null)
+
+[[ -d $dracutsysrootdir$tmpfilesconfdir ]] || tmpfilesconfdir=/etc/tmpfiles.d
+
 [[ -d $dracutsysrootdir$depmodd ]] \
     || sysctld=$(pkg-config libkmod --variable=depmodd 2> /dev/null)
 
@@ -1794,7 +1799,8 @@ export initdir dracutbasedir \
     modulesloadconfdir sysctl sysctlconfdir sysusers sysusersconfdir \
     systemdutildir systemdutilconfdir systemdcatalog systemdntpunits \
     systemdntpunitsconfdir systemdsystemunitdir systemdsystemconfdir \
-    hostonly_cmdline loginstall tmpfilesdir depmodd depmodconfdir
+    hostonly_cmdline loginstall tmpfilesdir tmpfilesconfdir depmodd \
+    depmodconfdir
 
 mods_to_load=""
 # check all our modules to see if they should be sourced.
index 2bf97ec260c9de0820ab6d6f6652236a8082898f..6c3a37a80e659191905fef373a871ad2b13b3dc0 100755 (executable)
@@ -33,7 +33,6 @@ install() {
     # Excluding "$tmpfilesdir/systemd-pstore.conf", belongs in seperated pstore module
     # Excluding "$tmpfilesdir/x11.conf", belongs in seperated x11 module
 
-
     inst_multiple -o \
         /usr/lib/group \
         /usr/lib/passwd \