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

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