diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-05-12 04:41:13 +0200 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-05-18 15:39:04 +0200 |
commit | 87c55e67d063bed6b1e2fa296779280182d79c40 (patch) | |
tree | e3d3495b275798df134d3ade906736577c92c65c /init | |
parent | b7c1887306c1067984b5e5b564f25a12631b8162 (diff) | |
download | mkinitcpio-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-- | init | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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 |