From 7dc5c3d908cf19038ce0166e5c3dea93a0f28b64 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 41445bb368..53545b5b99 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