dracut/0115-Handle-module-alias-properly.patch
Thomas Renninger 375fc509c5 Accepting request 240885 from home:hreinecke:branches:Base:System
- Mark all scripts as executable (bnc#887010)
  * Remove: 0116-81cio_ignore-Mark-scripts-as-executable
  * Add: 0116-Mark-scripts-as-executable.patch
- 95dasd_rules: Enable device before checking type
  * Add: 0117-95dasd_rules-Enable-the-device-before-checking-devic.patch
- 95zfcp_rules: Enable device before checking type
  * Add: 0118-95zfcp_rules-Enable-the-device-before-checking-devic.patch
- Reset IFS variable
  * Add: 0119-Reset-IFS-variable.patch

- Handle module alias properly (bnc#886839)
  * Add: 0115-Handle-module-alias-properly.patch
- 81cio_ignore: Mark scripts as executable (bnc#887010)
  * Add: 0116-81cio_ignore-Mark-scripts-as-executable.patch

- 91zipl: Translate 'ext2' into 'ext4' module
  * Add: 0114-91zipl-Translate-ext2-3-into-ext4.patch

- Enable converting of directory /var/run /var/lock to symlinks
  (bnc#877680)
  * Add: 0106-dracut-Enable-converting-of-directory-var-run-var-lo.patch
- Fixup typo 'firmare' instead of 'firmware'
  * Add: 0107-Fixup-typo-firmare-instead-of-firmware.patch
- 91zipl: Store commandline correctly
  * Add: 0108-91zipl-Store-commandline-correctly.patch
- 95dasd_rules: Store all devices in commandline
  * 0109-95dasd_rules-Store-all-devices-in-commandline.patch
- 95zfcp_rules: Store all devices in commandline
  * Add: 0110-95zfcp_rules-Store-all-devices-in-commandline.patch
- 90mdraid: Remove line for 'offroot' detection

OBS-URL: https://build.opensuse.org/request/show/240885
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=171
2014-07-14 16:09:29 +00:00

39 lines
1.3 KiB
Diff

From 40556c48da1f7f15ad0eb727013589f6f45596f8 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Sat, 12 Jul 2014 14:53:00 +0200
Subject: 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 <hare@suse.de>
---
dracut-functions.sh | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index b6247f5..22e16ff 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -1666,6 +1666,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.4.5