diff options
Diffstat (limited to 'net.Linux/ifconfig.sh')
-rw-r--r-- | net.Linux/ifconfig.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net.Linux/ifconfig.sh b/net.Linux/ifconfig.sh index 0b0af979..68590bbe 100644 --- a/net.Linux/ifconfig.sh +++ b/net.Linux/ifconfig.sh @@ -15,7 +15,7 @@ _down() { } _exists() { - grep -Eq "^[[:space:]]*${IFACE}:[[:space:]]*" /proc/net/dev + grep -Eq "^[[:space:]]*${IFACE}:" /proc/net/dev } _ifindex() { @@ -24,7 +24,7 @@ _ifindex() { i=$((${i} + 1)) [ ${i} -lt 1 ] && continue case "${line}" in - "${IFACE}: "*) echo "${i}"; return 0;; + "${IFACE}:"*) echo "${i}"; return 0;; esac done < /proc/net/dev return 1 @@ -35,7 +35,7 @@ _is_wireless() { [ -d /sys/class/net/"${IFACE}"/wireless ] && return 0 [ ! -e /proc/net/wireless ] && return 1 - grep -Eq "^[[:space:]]*${IFACE}:[[:space:]]+" /proc/net/wireless + grep -Eq "^[[:space:]]*${IFACE}:" /proc/net/wireless } _get_mac_address() { |