Commit a1136f96 authored by Steven Shiau's avatar Steven Shiau Committed by Daniel Baumann

Support predictable network interface names.

parent 7f8416aa
......@@ -93,7 +93,7 @@ EOF
# iterate the physical interfaces and add them to the interfaces list and also add when ethdevice= called on cmdline
if [ "${method}" != dhcp ] || ([ ! -x /root/usr/sbin/NetworkManager ] && [ ! -x /root/usr/sbin/wicd ]) || [ ! -z "${ETHDEVICE}" ]
then
for interface in /sys/class/net/eth* /sys/class/net/ath* /sys/class/net/wlan*
for interface in /sys/class/net/eth* /sys/class/net/ath* /sys/class/net/wlan* /sys/class/net/en*
do
[ -e ${interface} ] || continue
i="$(basename ${interface})"
......
......@@ -39,7 +39,7 @@ Select_eth_device ()
echo "Waiting for ethernet card(s) up... If this fails, maybe the ethernet card is not supported by the kernel `uname -r`?"
while [ -z "$l_interfaces" ]
do
l_interfaces="$(cd /sys/class/net/ && ls -d eth* 2>/dev/null)"
l_interfaces="$(cd /sys/class/net/ && ls -d * 2>/dev/null | grep -v "lo")"
done
if [ $(echo $l_interfaces | wc -w) -lt 2 ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment