summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2011-07-02 13:42:25 +0200
committerThomas Bächler <thomas@archlinux.org>2011-07-02 13:42:25 +0200
commitda81935dbb203340e9f3b394d4f6f4e5b3aa63c4 (patch)
treef67f28325274207e84c0a43fd1646f31efc4d7e9
parent491a99b8a2531207121d651d8e4b15fe4febbd2b (diff)
downloadmkinitcpio-da81935dbb203340e9f3b394d4f6f4e5b3aa63c4.tar.gz
mkinitcpio-da81935dbb203340e9f3b394d4f6f4e5b3aa63c4.tar.xz
Trim leading spaces in MODULES and earlymodules to prevent error messages when one is set to " "
-rw-r--r--init7
1 files changed, 4 insertions, 3 deletions
diff --git a/init b/init
index 38076bb..8c8709c 100644
--- a/init
+++ b/init
@@ -45,13 +45,14 @@ if [ -n "${disablehooks}" ]; then
done
fi
-if [ -n "${earlymodules}" ]; then
- modprobe -qab ${earlymodules//,/ }
+earlymodules=${earlymodules//,/ }
+if [ -n "${earlymodules## }" ]; then
+ modprobe -qab ${earlymodules}
fi
. /config
-[ -n "$MODULES" ] && modprobe -qab $MODULES
+[ -n "${MODULES## }" ] && modprobe -qab $MODULES
# If rootdelay is empty or not a non-negative integer, set it to 10
if [ -z "${rootdelay}" ] || ! [ "${rootdelay}" -ge 0 ]; then