diff options
author | Loic Nageleisen <lloeki@gmail.com> | 2008-01-08 09:14:42 -0600 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2008-01-08 09:31:16 -0600 |
commit | f589387f0b9ef56de8ab30f50a3c562e010baeeb (patch) | |
tree | ea5c2c972a40ce4fa5780d2f36441976ebd77b65 /network | |
parent | 9e341d31cd15172941268412d258c38591ff4988 (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-x | network | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |