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/iproute2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/iproute2.sh') diff --git a/net/iproute2.sh b/net/iproute2.sh index 09912bf4..e06152f8 100644 --- a/net/iproute2.sh +++ b/net/iproute2.sh @@ -20,7 +20,7 @@ _down() _exists() { - grep -Eq "^[[:space:]]*${IFACE}:" /proc/net/dev + [ -e /sys/class/net/"$IFACE" ] } _ifindex() -- cgit v1.2.3