summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Shiau <steven@nchc.org.tw>2015-08-19 17:15:56 +0200
committerDaniel Baumann <mail@daniel-baumann.ch>2015-08-19 17:22:23 +0200
commita1136f969938dea31590ff76075cbe52e8635ad3 (patch)
tree54a4856302e028888b4e9ebd0afd56fbaf33fd8e
parent7f8416aaed052ea637754568883c8bde32b5b58c (diff)
downloadlive-boot-a1136f969938dea31590ff76075cbe52e8635ad3.tar.gz
live-boot-a1136f969938dea31590ff76075cbe52e8635ad3.zip
Support predictable network interface names.
-rwxr-xr-xcomponents/9990-netbase.sh2
-rwxr-xr-xcomponents/9990-select-eth-device.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/components/9990-netbase.sh b/components/9990-netbase.sh
index a32a47b..70f97b8 100755
--- a/components/9990-netbase.sh
+++ b/components/9990-netbase.sh
@@ -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})"
diff --git a/components/9990-select-eth-device.sh b/components/9990-select-eth-device.sh
index df00666..c8f36b0 100755
--- a/components/9990-select-eth-device.sh
+++ b/components/9990-select-eth-device.sh
@@ -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 ]