daemon: Use interface names from /sys/class/net when it exists.

This commit is contained in:
tgoff0@gmail.com 2015-01-21 21:37:52 +00:00
parent a8b4ef4f67
commit 942fa01b67

View file

@ -44,7 +44,13 @@ killall -q emane
killall -q emanetransportd
killall -q emaneeventservice
ifconfig -a | awk '
if [ -d /sys/class/net ]; then
ifcommand="ls -1 /sys/class/net"
else
ifcommand="ifconfig -a"
fi
eval "$ifcommand" | awk '
/^veth[0-9]+\./ {print "removing interface " $1; system("ip link del " $1);}
/tmp\./ {print "removing interface " $1; system("ip link del " $1);}
/gt\./ {print "removing interface " $1; system("ip link del " $1);}