dracut/0032-instmods-sanity-for-_mpargs.patch

39 lines
1.7 KiB
Diff
Raw Normal View History

2011-10-19 13:30:00 +00:00
From 0024702fe7551e0de8180a5b514b31f57b4fc213 Mon Sep 17 00:00:00 2001
From: John Reiser <jreiser@BitWagon.com>
Date: Mon, 29 Aug 2011 14:46:25 -0700
Subject: [PATCH] instmods: sanity for _mpargs
---
dracut-functions | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/dracut-functions b/dracut-functions
index 556d309..6c16cae 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -892,17 +892,20 @@ instmods() {
# This introduces 2 incompatible meanings for =* arguments
# to instmods. We need to decide which one to keep.
if [[ $_mod = =ata && -f $srcmods/modules.block ]]; then
- ( echo -n "$_mpargs"; egrep 'ata|ahci' "${srcmods}/modules.block" ) \
+ ( [[ "$_mpargs" ]] && echo $_mpargs
+ egrep 'ata|ahci' "${srcmods}/modules.block" ) \
| instmods
elif [ -f $srcmods/modules.${_mod#=} ]; then
- ( echo -n "$_mpargs"; cat "${srcmods}/modules.${_mod#=}" ) \
+ ( [[ "$_mpargs" ]] && echo $_mpargs
+ cat "${srcmods}/modules.${_mod#=}" ) \
| instmods
else
- ( echo -n "$_mpargs"; find "$srcmods" -path "*/${_mod#=}/*" ) \
+ ( [[ "$_mpargs" ]] && echo $_mpargs
+ find "$srcmods" -path "*/${_mod#=}/*" ) \
| instmods
fi
;;
- --*) _mpargs+="${_mod##*/}"$'\n' ;; # one _mod per line; lops '--'
+ --*) _mpargs+=" $_mod" ;;
i2o_scsi) return ;; # Do not load this diagnostic-only module
*) _mod=${_mod##*/}