From: Harald Hoyer Date: Tue, 27 Jul 2010 09:51:27 +0000 (+0200) Subject: dracut-functions: fix "-m -a" handling X-Git-Tag: 007~61 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bb7645459ed17564efb5f8e079c111d3cf9439f0;p=thirdparty%2Fdracut.git dracut-functions: fix "-m -a" handling --- diff --git a/dracut-functions b/dracut-functions index 5e486bf70..40c4bef46 100755 --- a/dracut-functions +++ b/dracut-functions @@ -526,12 +526,20 @@ check_modules() { strstr "$mods_to_load" " $mod " && continue # This should never happen, but... [[ -d $moddir ]] || continue - [[ $dracutmodules != all ]] && ! strstr "$dracutmodules" "$mod" && \ - continue + strstr "$omit_dracutmodules" "$mod" && continue - if ! strstr "$add_dracutmodules" "$mod"; then - should_source_module "$moddir" || continue + + if ! strstr "$dracutmodules $add_dracutmodules" "$mod"; then + # module not in our list + if [[ $dracutmodules = all ]]; then + # check, if we can install this module + should_source_module "$moddir" || continue + else + # skip this module + continue + fi fi + mods_to_load+=" $mod " done