dracut/0022-build-initramfs-unclear-_mpargs-in-instmods.patch

44 lines
1.6 KiB
Diff
Raw Normal View History

2011-10-19 13:30:00 +00:00
From f4ca564ba67d5821b756727689664604e76d1cdf Mon Sep 17 00:00:00 2001
From: John Reiser <jreiser@bitwagon.com>
Date: Mon, 29 Aug 2011 14:42:15 -0700
Subject: [PATCH] build initramfs: unclear _mpargs in instmods()
The local variable _mpargs in function instmods() in file dracut-functions
looks peculiar. The documentation is non-existent, but still ...
First, $_mpargs is not passed to modprobe via for_each_kmod_dep.
This is strange because my guess is that "_mpargs" means
"extra arguments for modprobe".
Second, the leading "--" will be lopped when a leading pathname
is stripped via
_mod=${_mod##*/}
It seems to me that a leading "--" should inhibit modification.
Here's the corresponding patch to current HEAD (from dracut-013.)
---
dracut-functions | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/dracut-functions b/dracut-functions
index a3340e4..c28766e 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -919,7 +919,6 @@ instmods() {
fi
;;
--*)
- _mod=${_mod##*/}
_mpargs+=" $_mod";;
i2o_scsi) shift; continue;; # Do not load this diagnostic-only module
*) _mod=${_mod##*/}
@@ -942,7 +941,7 @@ instmods() {
# ok, load the module, all its dependencies, and any firmware
# it may require
for_each_kmod_dep install_kmod_with_fw $_mod \
- --set-version $kernel ${_moddirname}
+ --set-version $kernel ${_moddirname} $_mpargs
((_ret+=$?))
;;
esac