Joey Hess wrote: > Hardware is not mine and already in production unfortunatly. It'll be a week or two until I can even boot a test image on it. This patch will up and then down every interface. That seems safe enough to do, especially since netcfg also ups and downs all interfaces when doing link detection. It does mean that if the network is up, ethdetect will take it down. Index: ethdetect.sh =================================================================== --- ethdetect.sh (revision 54544) +++ ethdetect.sh (working copy) @@ -82,12 +82,15 @@ rm -f $TEMP_EXTRACT } +lsifaces () { + sed -e "s/lo://" < /proc/net/dev | grep "[a-z0-9]*:[ ]*[0-9]*" | sed "s/:.*//; s/^ *//" +} + ethernet_found() { local ifaces=0 local firewire=0 - for iface in $(sed -e "s/lo://" < /proc/net/dev | \ - grep "[a-z0-9]*:[ ]*[0-9]*" | sed "s/:.*//; s/^ *//"); do + for iface in $(lsifaces); do ifaces=$(expr $ifaces + 1) if [ -f /etc/network/devnames ]; then if grep "^$iface:" /etc/network/devnames | \ @@ -237,6 +240,13 @@ fi done +# Some modules only try to load firmware once brought up. So bring up and +# then down all interfaces. +for iface in $(lsifaces); do + ip link set "$iface" up + ip link set "$iface" down +done check-missing-firmware + sysfs-update-devnames || true cleanup -- see shy jo
Attachment:
signature.asc
Description: Digital signature