From 7a1e4ef606a814b124fc35136c2821484981e6cb Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Fri, 2 Mar 2012 19:54:48 +0000 Subject: 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 --- net/ifconfig.sh.Linux.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/ifconfig.sh.Linux.in') 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() -- cgit v1.2.3