Blame SOURCES/0242-dracut.sh-add-tmpfilesdir-to-install-files-to-usr-li.patch

18971c
From cf3098064c490486e867c389509a11908661fe9a Mon Sep 17 00:00:00 2001
18971c
From: Harald Hoyer <harald@redhat.com>
18971c
Date: Mon, 1 Dec 2014 12:34:54 +0100
18971c
Subject: [PATCH] dracut.sh: add $tmpfilesdir to install files to
18971c
 /usr/lib/tmpfiles.d
18971c
18971c
(cherry picked from commit 3a04bddeed15c810865aa49a2575bf13e651272d)
18971c
---
18971c
 dracut.sh | 11 ++++++++++-
18971c
 1 file changed, 10 insertions(+), 1 deletion(-)
18971c
18971c
diff --git a/dracut.sh b/dracut.sh
18971c
index 27c2bf45..6e56af50 100755
18971c
--- a/dracut.sh
18971c
+++ b/dracut.sh
18971c
@@ -1152,6 +1152,14 @@ fi
18971c
 
18971c
 [[ -d "$systemdsystemconfdir" ]] || systemdsystemconfdir=/etc/systemd/system
18971c
 
18971c
+[[ -d $tmpfilesdir ]] \
18971c
+    || tmpfilesdir=$(pkg-config systemd --variable=tmpfilesdir 2>/dev/null)
18971c
+
18971c
+if ! [[ -d "$tmpfilesdir" ]]; then
18971c
+    [[ -f /lib/tmpfiles.d ]] && tmpfilesdir=/lib/tmpfiles.d
18971c
+    [[ -f /usr/lib/tmpfiles.d ]] && tmpfilesdir=/usr/lib/tmpfiles.d
18971c
+fi
18971c
+
18971c
 export initdir dracutbasedir \
18971c
     dracutmodules force_add_dracutmodules add_dracutmodules omit_dracutmodules \
18971c
     mods_to_load \
18971c
@@ -1162,7 +1170,8 @@ export initdir dracutbasedir \
18971c
     debug host_fs_types host_devs sshkey add_fstab \
18971c
     DRACUT_VERSION udevdir prefix filesystems drivers \
18971c
     systemdutildir systemdsystemunitdir systemdsystemconfdir \
18971c
-    host_modalias host_modules hostonly_cmdline
18971c
+    host_modalias host_modules hostonly_cmdline loginstall \
18971c
+    tmpfilesdir
18971c
 
18971c
 mods_to_load=""
18971c
 # check all our modules to see if they should be sourced.