From: Philipp Rudo Date: Mon, 26 Aug 2024 13:58:54 +0000 (+0200) Subject: revert(dracut-init.sh): add module to mods_to_load before checking dependencies X-Git-Tag: 104~115 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c7d8ffd0fc68a2c032e0fc23644dfdc5492dd0b;p=thirdparty%2Fdracut-ng.git 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 Signed-off-by: Philipp Rudo --- diff --git a/dracut-init.sh b/dracut-init.sh index e085eb3d4..44176442d 100755 --- a/dracut-init.sh +++ b/dracut-init.sh @@ -893,9 +893,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\ * ]] \ @@ -914,6 +911,9 @@ check_mount() { fi done + [[ " $mods_to_load " == *\ $_mod\ * ]] \ + || mods_to_load+=" $_mod " + return 0 } @@ -968,9 +968,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\ * ]] \ @@ -989,6 +986,9 @@ check_module() { fi done + [[ " $mods_to_load " == *\ $_mod\ * ]] \ + || mods_to_load+=" $_mod " + return 0 }