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

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