7df327
From a7eaedb1679d871c213753fad872d65b23070240 Mon Sep 17 00:00:00 2001
7df327
From: Pavel Valena <pvalena@redhat.com>
7df327
Date: Thu, 19 Jan 2023 16:04:19 +0100
7df327
Subject: [PATCH] fix(dracut-init.sh): backport common paths
7df327
7df327
While backporting, some paths might be expected to be defined.
7df327
Backporting these paths as a preemptive measure (there's no test)
7df327
to avoid possible regressions when they're undefined.
7df327
7df327
(Cherry-picked from a01204202b3014c0c761c93bc7de8bf35e6dc5ef
7df327
and 18d36fabf5ab20404e63ae56f166a5a53a874ba9)
7df327
7df327
RHEL-only
7df327
Resolves: #2141480
7df327
---
7df327
 dracut-init.sh | 4 ++++
7df327
 dracut.sh      | 2 ++
7df327
 2 files changed, 6 insertions(+)
7df327
7df327
diff --git a/dracut-init.sh b/dracut-init.sh
7df327
index b6708288..50f9cf98 100644
7df327
--- a/dracut-init.sh
7df327
+++ b/dracut-init.sh
7df327
@@ -79,6 +79,10 @@ export srcmods
7df327
     export hookdirs
7df327
 }
7df327
 
7df327
+DRACUT_LDD=${DRACUT_LDD:-ldd}
7df327
+DRACUT_TESTBIN=${DRACUT_TESTBIN:-/bin/sh}
7df327
+DRACUT_LDCONFIG=${DRACUT_LDCONFIG:-ldconfig}
7df327
+
7df327
 . $dracutbasedir/dracut-functions.sh
7df327
 
7df327
 # Detect lib paths
7df327
diff --git a/dracut.sh b/dracut.sh
7df327
index 57f51e91..f58559e8 100755
7df327
--- a/dracut.sh
7df327
+++ b/dracut.sh
7df327
@@ -730,6 +730,8 @@ done
7df327
 export PATH="${NPATH#:}"
7df327
 unset NPATH
7df327
 
7df327
+export SYSTEMCTL=${SYSTEMCTL:-systemctl}
7df327
+
7df327
 # these options add to the stuff in the config file
7df327
 (( ${#add_dracutmodules_l[@]} )) && add_dracutmodules+=" ${add_dracutmodules_l[@]} "
7df327
 (( ${#force_add_dracutmodules_l[@]} )) && force_add_dracutmodules+=" ${force_add_dracutmodules_l[@]} "