]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-functions: fix "-m -a" handling
authorHarald Hoyer <harald@redhat.com>
Tue, 27 Jul 2010 09:51:27 +0000 (11:51 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 27 Jul 2010 09:51:27 +0000 (11:51 +0200)
dracut-functions

index 5e486bf70b76378392dbc43a0c26e2e03a66efb0..40c4bef4659c451edb576168db3a5ec4adc7aa5e 100755 (executable)
@@ -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