Message info
 
To:arch-projects@archlinux.org From:Dave Reisner Subject:[arch-projects] [mkinitcpio][PATCH 12/19] init: correct trimming of earlymodules and MODULES Date:Sun, 13 May 2012 13:57:15 -0400
 

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>
---
init | 7 ++-----
1 file 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
--
1.7.10.2