[PATCH 26/33] Handle module alias properly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Hannes Reinecke <hare@xxxxxxx>

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 <hare@xxxxxxx>
Signed-off-by: Thomas Renninger <trenn@xxxxxxx>
---
 dracut-functions.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/dracut-functions.sh b/dracut-functions.sh
index 02aba04..d85c639 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 ]] && \
-- 
1.8.5.2

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux