From: Antonio Alvarez Feijoo Date: Fri, 14 Jul 2023 09:48:34 +0000 (+0200) Subject: fix(dracut-init.sh): `module_check` method ignores `forced` option X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c9f403f1c219b8e2ff62011bfcc1b5e254b411a;p=thirdparty%2Fdracut.git fix(dracut-init.sh): `module_check` method ignores `forced` option When the `module_check` method is called passing 3 arguments (all calls right now), the `forced` option is ignored, so the `hostonly` variable is never unset before the module's `check` method is called. --- diff --git a/dracut-init.sh b/dracut-init.sh index 7294eabb7..ff1d4e3bd 100755 --- a/dracut-init.sh +++ b/dracut-init.sh @@ -764,7 +764,7 @@ module_check() { local _forced=0 local _hostonly=$hostonly [[ -z $_moddir ]] && _moddir=$(dracut_module_path "$1") - [ $# -eq 2 ] && _forced=$2 + [ $# -ge 2 ] && _forced=$2 [[ -d $_moddir ]] || return 1 if [[ ! -f $_moddir/module-setup.sh ]]; then # if we do not have a check script, we are unconditionally included