]> pd.if.org Git - startuptools/blobdiff - scripts/rc.sysinit
fix empty module list handling
[startuptools] / scripts / rc.sysinit
index b693ecd41f93d77dc0d1499f27c59379e75e53dc..ebfe17c286da40ee5474ca5e3da30c93c0cc15a4 100644 (file)
@@ -81,8 +81,11 @@ status_check
 # this covers the case where there isn't one, but we still want
 # to load more hardware
 if ! is_true "$NOPROBEHW" ; then
-       status_begin "looking for kernel modules to load"
-       lspci -k|grep 'Kernel modules:' | awk '{print $3}'| sort -u | xargs -n1 modprobe
+       status_begin "loading kernel modules"
+       modlist=$(lspci -k|grep 'Kernel modules:' | awk '{print $3}'| sort -u)
+       if [ -n "$modlist" ]; then
+               modprobe $modlist
+       fi
        status_check
 fi