diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-11-01 21:39:55 +0100 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-11-24 00:01:34 +0100 |
commit | 1603e30f49347525dfcc999e3c63cb27cb54dde8 (patch) | |
tree | bc9a354f514bd6d07ce123157801b10738592381 /init | |
parent | 826562e35278faa7c40b3b78a5d51223bee28d00 (diff) | |
download | mkinitcpio-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-- | init | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |