]> pd.if.org Git - startuptools/blobdiff - scripts/rc.sysinit
fix empty module list handling
[startuptools] / scripts / rc.sysinit
index 79de383b143b004e3312d94fb5953cda29a52fde..ebfe17c286da40ee5474ca5e3da30c93c0cc15a4 100644 (file)
@@ -82,7 +82,10 @@ status_check
 # to load more hardware
 if ! is_true "$NOPROBEHW" ; then
        status_begin "loading kernel modules"
-       modprobe $(lspci -k|grep 'Kernel modules:' | awk '{print $3}'| sort -u)
+       modlist=$(lspci -k|grep 'Kernel modules:' | awk '{print $3}'| sort -u)
+       if [ -n "$modlist" ]; then
+               modprobe $modlist
+       fi
        status_check
 fi