summaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-01-26 03:09:19 +0100
committerDave Reisner <dreisner@archlinux.org>2012-01-28 23:35:01 +0100
commitd08fdeaf1df8e8b5ea379d311e8703c4c630ecb1 (patch)
treec711ccf6b3bba07cd9f616ca2af6875ff2d996a1 /functions
parent772943680052f28fdbea9d79479e6003f7b48673 (diff)
downloadmkinitcpio-d08fdeaf1df8e8b5ea379d311e8703c4c630ecb1.tar.gz
mkinitcpio-d08fdeaf1df8e8b5ea379d311e8703c4c630ecb1.tar.xz
function: avoid applying --try to all modules
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@archlinux.org>
Diffstat (limited to 'functions')
-rw-r--r--functions6
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