From 6c9f403f1c219b8e2ff62011bfcc1b5e254b411a Mon Sep 17 00:00:00 2001 From: Antonio Alvarez Feijoo Date: Fri, 14 Jul 2023 11:48:34 +0200 Subject: [PATCH] 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. --- dracut-init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.47.3