summaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorLoic Nageleisen <lloeki@gmail.com>2008-01-08 09:14:42 -0600
committerAaron Griffin <aaronmgriffin@gmail.com>2008-01-08 09:31:16 -0600
commitf589387f0b9ef56de8ab30f50a3c562e010baeeb (patch)
treeea5c2c972a40ce4fa5780d2f36441976ebd77b65 /network
parent9e341d31cd15172941268412d258c38591ff4988 (diff)
Enhance interface 'up' state checking
Using the 'UP' state to imply operational status is wrong and even if a device is 'UP' we may still need to run ifconfig/dhcp Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'network')
-rwxr-xr-xnetwork4
1 files changed, 3 insertions, 1 deletions
diff --git a/network b/network
index 7489206..fbe77d8 100755
--- a/network
+++ b/network
@@ -19,7 +19,9 @@ ifup()
return 1
fi
# don't bring up an interface that's already up
- [ "$(/sbin/ifconfig ${1} 2>/dev/null | grep UP)" ] && return 0
+ [ "$(/sbin/ifconfig ${1} 2>/dev/null |\
+ grep -v 'inet6 addr: fe80:' |\
+ grep -e 'inet addr:' -e 'inet6 addr:')" ] && return 0
eval iwcfg="\$wlan_${1}"
if [ "$iwcfg" != "" ]; then
/usr/sbin/iwconfig $iwcfg