diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2012-03-02 19:54:48 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2012-03-02 19:54:48 +0000 |
commit | 7a1e4ef606a814b124fc35136c2821484981e6cb (patch) | |
tree | 1c3dc8de2e34644623bf0224a9065616efaa2c0d /net/ifconfig.sh.Linux.in | |
parent | 0dc9431bdb989231cfa20560d69aebebd487a926 (diff) |
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>
Diffstat (limited to 'net/ifconfig.sh.Linux.in')
-rw-r--r-- | net/ifconfig.sh.Linux.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ifconfig.sh.Linux.in b/net/ifconfig.sh.Linux.in index 80a0b987..9eaa7c56 100644 --- a/net/ifconfig.sh.Linux.in +++ b/net/ifconfig.sh.Linux.in @@ -19,7 +19,7 @@ _down() _exists() { - grep -Eq "^[[:space:]]*${IFACE}:" /proc/net/dev + [ -e /sys/class/net/"$IFACE" ] } _ifindex() |