From: Michael Prokop Date: Thu, 16 Nov 2006 17:44:05 +0000 (+0100) Subject: send output of module loading in /linuxrc to /dev/null X-Git-Tag: 0.72~8 X-Git-Url: http://git.grml.org/?a=commitdiff_plain;ds=sidebyside;h=d599ecad47905edf46a173f2ab0a3c05e7834b06;p=grml-terminalserver.git send output of module loading in /linuxrc to /dev/null --- diff --git a/linuxrc b/linuxrc index 6269e26..808422d 100755 --- a/linuxrc +++ b/linuxrc @@ -522,31 +522,32 @@ if [ -n "$NFS" ]; then # put the mylibs into /lib for discover and udhcpc cdir - # starting hw-detection for network card -# echo "Starting hw-detection" -# kernel_version_=`uname -r` -# modules_to_load=$(/static/discover --disable-bus all --enable-bus pci --type network --normalize-whitespace --data-path=linux/module/name --data-version=$kernel_version_ | grep -v '^ $' | uniq) -# echo "trying to load the following network modules: \"$modules_to_load\"" + # starting hw-detection for network card - currently broken, so don't use it + # echo "Starting hw-detection" + # kernel_version_=`uname -r` + # modules_to_load=$(/static/discover --disable-bus all --enable-bus pci --type network --normalize-whitespace --data-path=linux/module/name --data-version=$kernel_version_ | grep -v '^ $' | uniq) + # echo "trying to load the following network modules: \"$modules_to_load\"" KERNELVER=`uname -r` for mod in `find /lib/modules/$KERNELVER/kernel/drivers/net/ -name \*.ko` ; do - echo `basename $mod | tr -d \.ko` >> /loadme + echo `basename $mod | tr -d \.ko` >> /modules.load done - modules_to_load=`cat /loadme` -# -# # FIXME modprobe is buggy from busybox -# modules_to_load=`echo $modules_to_load | xargs` + modules_to_load=`cat /modules.load` + + # FIXME modprobe is buggy from busybox + modules_to_load=`echo $modules_to_load | xargs` modLoad() { for mod in $@ ; do tmp_="`modprobe -vn $mod`" if [ $? -ne 0 ]; then - continue + continue fi - eval "$tmp_" + [ -n "$DEBUG" ] && eval "$tmp_" || eval "$tmp_" 1>/dev/null 2>/dev/null done } modLoad "$modules_to_load" + rm -f /modules.load # loading additional modules modLoad sunrpc lockd af_packet nfs