X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-premount%2Fselect_eth_device;h=fe86313aacc3b7dbd613672c67f476683572bd0a;hb=bc84772cff108c5392e09fa90aa6f68dc5c66072;hp=dfeac3d5aefe94e3ab9f7caf6f76eea1d938339c;hpb=b29beeed475cf0fa53befd4246fd01220a95103f;p=live-boot-grml.git 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