summaryrefslogtreecommitdiff
path: root/scripts/live-premount/select_eth_device
diff options
context:
space:
mode:
authorSteven Shiau <steven@nchc.org.tw>2010-08-18 14:30:06 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:59:20 +0100
commit208f5edf15809e85af2bd11fff1d9e43ede6fe0b (patch)
tree7a328ed5dd720cd6b2f666061f638bb4791af098 /scripts/live-premount/select_eth_device
parentd9b6d4f6a85850a317bf57dfdbae3c04e7d4c9b1 (diff)
downloadlive-boot-208f5edf15809e85af2bd11fff1d9e43ede6fe0b.tar.gz
live-boot-208f5edf15809e85af2bd11fff1d9e43ede6fe0b.zip
Making multiple connected NICs work.
Diffstat (limited to 'scripts/live-premount/select_eth_device')
-rwxr-xr-xscripts/live-premount/select_eth_device15
1 files changed, 10 insertions, 5 deletions
diff --git a/scripts/live-premount/select_eth_device b/scripts/live-premount/select_eth_device
index dfeac3d..fe86313 100755
--- a/scripts/live-premount/select_eth_device
+++ b/scripts/live-premount/select_eth_device
@@ -68,6 +68,7 @@ for ARGUMENT in $(cat /proc/cmdline); do
esac
done
+found_eth_dev=""
while true; do
echo -n "Looking for a connected Ethernet interface ..."
@@ -85,13 +86,17 @@ while true; do
2>/dev/null)
# link detected
if [ "$carrier" = 1 ]; then
- echo " found $interface."
+ echo "Connected $interface found"
# inform initrd's init script :
- echo "DEVICE=$interface" >> /conf/param.conf
- exit 0
+ found_eth_dev="$found_eth_dev $interface"
fi
done
- # wait a bit
- sleep 1
+ if [ -n "$found_eth_dev" ]; then
+ echo "DEVICE='$found_eth_dev'" >> /conf/param.conf
+ exit 0
+ else
+ # wait a bit
+ sleep 1
+ fi
done
done