summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/ifconfig.sh.Linux.in2
-rw-r--r--net/iproute2.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/net/ifconfig.sh.Linux.in b/net/ifconfig.sh.Linux.in
index 80a0b98..9eaa7c5 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()
diff --git a/net/iproute2.sh b/net/iproute2.sh
index 09912bf..e06152f 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()