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:
Robin H. Johnson 2012-03-02 19:54:48 +00:00
parent 0dc9431bdb
commit 7a1e4ef606
No known key found for this signature in database
GPG Key ID: AE72287837C59F5F
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ _down()
_exists()
{
grep -Eq "^[[:space:]]*${IFACE}:" /proc/net/dev
[ -e /sys/class/net/"$IFACE" ]
}
_ifindex()

View File

@ -20,7 +20,7 @@ _down()
_exists()
{
grep -Eq "^[[:space:]]*${IFACE}:" /proc/net/dev
[ -e /sys/class/net/"$IFACE" ]
}
_ifindex()