]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-functions: check for missing dracut modules
authorHarald Hoyer <harald@redhat.com>
Mon, 7 Mar 2011 12:08:13 +0000 (13:08 +0100)
committerHarald Hoyer <harald@redhat.com>
Mon, 7 Mar 2011 12:37:18 +0000 (13:37 +0100)
If the user explicitly specified "-a <modules>" or "-m <modules>",
   warn him about possible missing modules.

dracut-functions

index 64fe0f31bf85a247334a12b84e0c0d51c6c5ac9c..d8827fcc2e2ad84d4f1748e9c76f0659f39ec3b5 100755 (executable)
@@ -651,6 +651,15 @@ check_module_dir() {
         local mod=${moddir##*/}; mod=${mod#[0-9][0-9]}
         check_module $mod 1
     done
+
+    # Report any missing dracut modules, the user has specified
+    modcheck=$add_dracutmodules
+    [[ $dracutmodules != all ]] && modcheck="$m $dracutmodules"
+    for mod in $modcheck; do
+        strstr "$mods_to_load" "$mod" && continue
+        strstr "$omit_dracutmodules" "$mod" && continue
+        dwarning "Dracut module \"$mod\" cannot be found."
+    done
 }
 
 # Install a single kernel module along with any firmware it may require.