]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
dracut-functions: check if specific dracut module is missing
authorHarald Hoyer <harald@redhat.com>
Wed, 26 May 2010 15:42:57 +0000 (17:42 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 26 May 2010 15:42:57 +0000 (17:42 +0200)
dracut-functions

index 7181d3f4c4b98724ba9e87aa8752fd85af7bf9f6..fce5abbd9bc282b4d2894d7fc5ceade9359a1c2d 100755 (executable)
@@ -393,6 +393,8 @@ should_source_module() {
 }
 
 check_modules() {
+    local modcheck;
+    local mod;
     for moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do
        local mod=${moddir##*/}; mod=${mod#[0-9][0-9]}
        # If we are already scheduled to be loaded, no need to check again.
@@ -407,6 +409,14 @@ check_modules() {
         fi
        mods_to_load+=" $mod "
     done
+
+    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.