summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-05-12 04:41:13 +0200
committerDave Reisner <dreisner@archlinux.org>2012-05-18 15:39:04 +0200
commit87c55e67d063bed6b1e2fa296779280182d79c40 (patch)
treee3d3495b275798df134d3ade906736577c92c65c /init
parentb7c1887306c1067984b5e5b564f25a12631b8162 (diff)
downloadmkinitcpio-87c55e67d063bed6b1e2fa296779280182d79c40.tar.gz
mkinitcpio-87c55e67d063bed6b1e2fa296779280182d79c40.tar.xz
init: correct trimming of earlymodules and MODULES
This never worked properly and only "fixed" the stupid bug that found an edge case when either of these vars contains nothing more than a single space. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'init')
-rw-r--r--init7
1 files changed, 2 insertions, 5 deletions
diff --git a/init b/init
index 8e9ad90..7cd812f 100644
--- a/init
+++ b/init
@@ -26,14 +26,11 @@ for d in ${disablehooks//,/ }; do
eval "hook_${d}=disabled"
done
-earlymodules=${earlymodules//,/ }
-if [ -n "${earlymodules## }" ]; then
- modprobe -qab ${earlymodules}
-fi
+[ -n "${earlymodules//[[:space:]]}" ] && modprobe -qab ${earlymodules//,/ }
. /config
-[ -n "${MODULES## }" ] && modprobe -qab $MODULES
+[ -n "${MODULES//[[:space:]]}" ] && modprobe -qab $MODULES
# If rootdelay is empty or not a non-negative integer, set it to 10
if [ -z "${rootdelay}" ] || ! [ "${rootdelay}" -ge 0 ]; then