try to load all networking modules via linuxrc
authorMichael Prokop <mika@grml.org>
Thu, 16 Nov 2006 16:51:03 +0000 (17:51 +0100)
committerMichael Prokop <mika@grml.org>
Thu, 16 Nov 2006 16:51:03 +0000 (17:51 +0100)
debian/TODO
grml-terminalserver
grml-terminalserver-config
linuxrc

index 9cfdb3e..5806e7a 100644 (file)
@@ -2,7 +2,6 @@
   * maybe dump discover + libuclibc in favour of hwinfo + libc (space?)
   * udhcp client "timeout" ( --background + in linuxrc 10s warten bis IP kommt, wenn schon ip vorhanden sofort weitermachen).
   * resolv.conf should be copied from the initrd
-  * update linuxrc from grml
   * DON'T delete /var/lib/tftpdboot on a !grml-system
   * config vars to use external services (dhcp, tftp, nfs)
   * make pxelinux configurable (to use another pxe-boot-manager) (MAYBE)
index 9c362c9..ab28ff2 100755 (executable)
@@ -147,7 +147,7 @@ function runIptables
     if iptables -L | grep -q '^REJECT.*tcp-reset' ; then
        echo "Rule for tcp/113 already present, nothing to be done."
     else
-       echo -n "Rejecting tcp/113 via iptables to speed up speed up booting via PXE:"
+       echo -n "Rejecting tcp/113 via iptables to speed up speed up booting via PXE: "
        iptables -A OUTPUT -p tcp --dport 113 -j REJECT --reject-with tcp-reset && echo done || echo failed
     fi
  else
index eac1533..bd0ec38 100755 (executable)
@@ -122,10 +122,10 @@ function actionAutoconf
 
 function actionMkInitrd
 {
-  echo "Creating initrd: $PATH_/minirt26.gz"
+  echo -n "Creating initrd $PATH_/minirt26.gz: "
   isExistent "$PATH_/minirt26.gz" && echo "$PATH_/minirt26.gz does already exist, skipping initrd creation" && return 0
   mkInitrd
-  echo 'done'
+  echo done
 }
 
 function mkInitrd
@@ -188,13 +188,13 @@ function mkInitrd
   local modules="`cat $CARDS_DETECTED_BY_DISCOVER |xargs` af_packet"
   local modules_dep=""
 
-  # get paths of modules + paths of all dependet modules
+  # get paths of modules + paths of all dependent modules
   echo -n "" >"$TMP_"
   for i in $modules; do
     tmp_=`awk -F: '{if($1~/'"$i".ko'/) {print $0}}' $MODULES_PATH_/$KERNEL_VERSION_/modules.dep`
     echo "${tmp_%%:*}"
     # FIXME ugly sed hack :(
-    echo "${tmp_#*:}" |xargs -n1 echo |sed 's/://'
+    echo "${tmp_#*:}" | xargs -n1 echo | sed 's/://'
   done \
   | sort | uniq | while read module relax; do
     if [ -n "$module" ]; then
@@ -231,7 +231,7 @@ function mkInitrd
   local tmp_size=`du -s $INITRD_ |awk '{print $1}'`   # in kB
   let tmp_size=$tmp_size+1000
   if (( $tmp_size >= 16000 )); then
-    warn "Your initrd is $tmp_size kByte large => TOO BIG (should be 16000kByte)"
+    warn "Your initrd is $tmp_size kByte large => TOO BIG (should be <= 16000kB)"
     warn "Please remove a few modules from $CARDS_DETECTED_BY_DISCOVER or edit $INITRD_ manually"
     return 1
   fi
diff --git a/linuxrc b/linuxrc
index 611b8c2..6269e26 100755 (executable)
--- a/linuxrc
+++ b/linuxrc
@@ -523,13 +523,19 @@ if [ -n "$NFS" ]; then
   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\""
-
-  # FIXME modprobe is buggy from busybox
-  modules_to_load=`echo $modules_to_load | xargs`
+#  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
+  done
+  modules_to_load=`cat /loadme`
+#
+#  # FIXME modprobe is buggy from busybox
+#  modules_to_load=`echo $modules_to_load | xargs`
   modLoad()
   {
     for mod in $@ ; do