Bug #405491: _exists can give a false negative since /proc/net/dev can be slow to update sometimes when interfaces are added rapidly. Use sysfs instead.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
This commit is contained in:
parent
0dc9431bdb
commit
7a1e4ef606
@ -19,7 +19,7 @@ _down()
|
|||||||
|
|
||||||
_exists()
|
_exists()
|
||||||
{
|
{
|
||||||
grep -Eq "^[[:space:]]*${IFACE}:" /proc/net/dev
|
[ -e /sys/class/net/"$IFACE" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
_ifindex()
|
_ifindex()
|
||||||
|
@ -20,7 +20,7 @@ _down()
|
|||||||
|
|
||||||
_exists()
|
_exists()
|
||||||
{
|
{
|
||||||
grep -Eq "^[[:space:]]*${IFACE}:" /proc/net/dev
|
[ -e /sys/class/net/"$IFACE" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
_ifindex()
|
_ifindex()
|
||||||
|
Loading…
Reference in New Issue
Block a user