summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-11-01 21:39:55 +0100
committerDave Reisner <dreisner@archlinux.org>2012-11-24 00:01:34 +0100
commit1603e30f49347525dfcc999e3c63cb27cb54dde8 (patch)
treebc9a354f514bd6d07ce123157801b10738592381 /init
parent826562e35278faa7c40b3b78a5d51223bee28d00 (diff)
downloadmkinitcpio-1603e30f49347525dfcc999e3c63cb27cb54dde8.tar.gz
mkinitcpio-1603e30f49347525dfcc999e3c63cb27cb54dde8.tar.xz
init: condense early module loading
Since mkinitcpio rewrites its runtime config, we can guarantee that these variable are sanitized of extraneous whitespace. Meld the two calls together, ensuring that we retain the ordering, but only call modprobe once. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'init')
-rw-r--r--init5
1 files changed, 3 insertions, 2 deletions
diff --git a/init b/init
index b95565d..3351cfc 100644
--- a/init
+++ b/init
@@ -24,8 +24,9 @@ done
run_hookfunctions 'run_earlyhook' 'early hook' $EARLYHOOKS
-[ -n "${earlymodules//[[:space:]]}" ] && modprobe -qab ${earlymodules//,/ }
-[ -n "${MODULES//[[:space:]]}" ] && modprobe -qab $MODULES
+if [ -n "$earlymodules$MODULES" ]; then
+ modprobe -qab ${earlymodules//,/ } $MODULES
+fi
# If rootdelay is empty or not a non-negative integer, set it to 10
if [ -z "${rootdelay}" ] || ! [ "${rootdelay}" -ge 0 ]; then