daemon: Use interface names from /sys/class/net when it exists.
This commit is contained in:
parent
dfc4b2b9a2
commit
3d7aab1149
1 changed files with 7 additions and 1 deletions
|
@ -44,7 +44,13 @@ killall -q emane
|
||||||
killall -q emanetransportd
|
killall -q emanetransportd
|
||||||
killall -q emaneeventservice
|
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);}
|
/^veth[0-9]+\./ {print "removing interface " $1; system("ip link del " $1);}
|
||||||
/tmp\./ {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);}
|
/gt\./ {print "removing interface " $1; system("ip link del " $1);}
|
||||||
|
|
Loading…
Add table
Reference in a new issue