summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xnet_if8
1 files changed, 4 insertions, 4 deletions
diff --git a/net_if b/net_if
index e7825ec..8d6f71d 100755
--- a/net_if
+++ b/net_if
@@ -39,12 +39,12 @@ sub get_if_status {
}
while (<IFCONFIG>) {
- if ($_ =~ m/^$if: flags=([0-9]+)</) {
- if ($1 & 1) {
- push(@up, $if);
+ if ($_ =~ m/^([-a-v0-9]+): flags=([0-9]+)</) {
+ if ($2 & 1) {
+ push(@up, $1);
}
else {
- push (@down, $if);
+ push (@down, $if) if $1 eq $if;
}
}
}