From: Harald Hoyer Date: Wed, 26 May 2010 15:42:57 +0000 (+0200) Subject: dracut-functions: check if specific dracut module is missing X-Git-Tag: 006~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70503db41662f4d0005a5fc06f8d25d03588157e;p=thirdparty%2Fdracut-ng.git dracut-functions: check if specific dracut module is missing --- diff --git a/dracut-functions b/dracut-functions index 7181d3f4c..fce5abbd9 100755 --- a/dracut-functions +++ b/dracut-functions @@ -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.