[arch-projects] [mkinitcpio][PATCH 10/10] function: avoid applying --try to all modules

Dave Reisner d at falconindy.com
Sat Jan 28 15:39:46 EST 2012


An error in logic here would cause the --try flag to be passed to all
modules after the first, if a hook added modules ending with a '?'.

Signed-off-by: Dave Reisner <dreisner at archlinux.org>
---
 functions |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/functions b/functions
index e5b4195..c85806a 100644
--- a/functions
+++ b/functions
@@ -341,10 +341,10 @@ parse_hook() {
 
     for item in $MODULES; do
         if [[ ${item:(-1)} = '?' ]]; then
-            try=--try
-            item=${item%\?}
+            add_module --try "${item%\?}"
+        else
+            add_module "$item"
         fi
-        add_module $try "$item"
     done
 
     for item in $BINARIES; do
-- 
1.7.8.4



More information about the arch-projects mailing list