Blame 0023-dracut.sh-add-tmpfilesdir-to-install-files-to-usr-li.patch

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