]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut.sh: add $tmpfilesdir to install files to /usr/lib/tmpfiles.d
authorHarald Hoyer <harald@redhat.com>
Mon, 1 Dec 2014 11:34:54 +0000 (12:34 +0100)
committerHarald Hoyer <harald@redhat.com>
Thu, 2 Apr 2015 14:13:24 +0000 (16:13 +0200)
(cherry picked from commit 3a04bddeed15c810865aa49a2575bf13e651272d)

dracut.sh

index 27c2bf45f5083cf68726419deaf7c4c2fd9bc9fe..6e56af50a2d381c7ae6287b0bb0796e2918653d0 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -1152,6 +1152,14 @@ fi
 
 [[ -d "$systemdsystemconfdir" ]] || systemdsystemconfdir=/etc/systemd/system
 
+[[ -d $tmpfilesdir ]] \
+    || tmpfilesdir=$(pkg-config systemd --variable=tmpfilesdir 2>/dev/null)
+
+if ! [[ -d "$tmpfilesdir" ]]; then
+    [[ -f /lib/tmpfiles.d ]] && tmpfilesdir=/lib/tmpfiles.d
+    [[ -f /usr/lib/tmpfiles.d ]] && tmpfilesdir=/usr/lib/tmpfiles.d
+fi
+
 export initdir dracutbasedir \
     dracutmodules force_add_dracutmodules add_dracutmodules omit_dracutmodules \
     mods_to_load \
@@ -1162,7 +1170,8 @@ export initdir dracutbasedir \
     debug host_fs_types host_devs sshkey add_fstab \
     DRACUT_VERSION udevdir prefix filesystems drivers \
     systemdutildir systemdsystemunitdir systemdsystemconfdir \
-    host_modalias host_modules hostonly_cmdline
+    host_modalias host_modules hostonly_cmdline loginstall \
+    tmpfilesdir
 
 mods_to_load=""
 # check all our modules to see if they should be sourced.