From 1603e30f49347525dfcc999e3c63cb27cb54dde8 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Thu, 1 Nov 2012 16:39:55 -0400 Subject: 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 --- init | 5 +++-- 1 file 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 -- cgit v1.2.3-24-g4f1b