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