dracut/0027-revert-dracut-init.sh-add-module-to-mods_to_load-bef.patch
Pavel Valena a3b408b277 Upgrade to dracut 103
- enable dracut-cpio binary
- feat(fips-crypto-policies): make c-p follow FIPS mode automatically
- fix(fips-crypto-policies): make it depend on fips dracut module

Resolves: RHEL-59678,RHEL-65204

From-source-git-commit: ff3186be9d5871c6ec216019463199bb78cc1b32
2024-11-01 18:42:50 +01:00

74 lines
2.1 KiB
Diff

From f26573ec709c7703863e8affdec990b100c25598 Mon Sep 17 00:00:00 2001
From: Philipp Rudo <prudo@redhat.com>
Date: Mon, 26 Aug 2024 15:58:54 +0200
Subject: [PATCH 27/32] revert(dracut-init.sh): add module to mods_to_load
before checking dependencies
Commit d0f8fde5 ("fix(dracut-init.sh): add module to mods_to_load before
checking dependencies") introduced a regression. When dracut is in
"auto" mode, i.e. '--modules auto' or no --modules is provided, the
expected behavior is that all modules that return 0 in their check()
function are included. Except for the ones where the dependencies cannot
be installed. The commit however, caused those modules to be included
without their dependencies. Thus revert the commit.
This reverts commit d0f8fde5668cfd7fda1d15824e268b4949b4fd04.
Reported-by: Jo Zzsi <jozzsicsataban@gmail.com>
Signed-off-by: Philipp Rudo <prudo@redhat.com>
(cherry picked from commit bddbb11bbbfc405317a6fbd53bb189b575d46da2)
Resolves: RHEL-43460
---
dracut-init.sh | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dracut-init.sh b/dracut-init.sh
index 3917bb0d..644825c9 100755
--- a/dracut-init.sh
+++ b/dracut-init.sh
@@ -924,9 +924,6 @@ check_mount() {
fi
fi
- [[ " $mods_to_load " == *\ $_mod\ * ]] \
- || mods_to_load+=" $_mod "
-
for _moddep in $(module_depends "$_mod" "$_moddir"); do
# handle deps as if they were manually added
[[ " $dracutmodules " == *\ $_mod\ * ]] \
@@ -945,6 +942,9 @@ check_mount() {
fi
done
+ [[ " $mods_to_load " == *\ $_mod\ * ]] \
+ || mods_to_load+=" $_mod "
+
return 0
}
@@ -1001,9 +1001,6 @@ check_module() {
fi
fi
- [[ " $mods_to_load " == *\ $_mod\ * ]] \
- || mods_to_load+=" $_mod "
-
for _moddep in $(module_depends "$_mod" "$_moddir"); do
# handle deps as if they were manually added
[[ " $dracutmodules " == *\ $_mod\ * ]] \
@@ -1022,6 +1019,9 @@ check_module() {
fi
done
+ [[ " $mods_to_load " == *\ $_mod\ * ]] \
+ || mods_to_load+=" $_mod "
+
return 0
}
--
2.42.0