From: Hannes Reinecke Date: Thu, 11 Dec 2014 14:46:11 +0000 (+0100) Subject: Handle module alias properly X-Git-Tag: 041~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ae60e559f049ba41d5d198f27509721a245d6ea;p=thirdparty%2Fdracut.git Handle module alias properly Some modules (like ext4) provide aliases by which the modules can be accessed, too. But when using aliases directly dracut fails to include the correct module. So translate the alias into the correct module name before checking the module. References: bnc#886839 Signed-off-by: Hannes Reinecke Signed-off-by: Thomas Renninger --- diff --git a/dracut-functions.sh b/dracut-functions.sh index edd8ea9ef..7a12a7643 100755 --- a/dracut-functions.sh +++ b/dracut-functions.sh @@ -1689,6 +1689,13 @@ instmods() { --*) _mpargs+=" $_mod" ;; *) _mod=${_mod##*/} + # Check for aliased modules + _modalias=$(modinfo -k $kernel -F filename $_mod 2> /dev/null) + _modalias=${_modalias%.ko} + if [ "${_modalias##*/}" != "$_mod" ] ; then + _mod=${_modalias##*/} + fi + # if we are already installed, skip this module and go on # to the next one. if [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && \