From f589387f0b9ef56de8ab30f50a3c562e010baeeb Mon Sep 17 00:00:00 2001 From: Loic Nageleisen Date: Tue, 8 Jan 2008 09:14:42 -0600 Subject: 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 --- network | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'network') 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 -- cgit v1.2.3-54-g00ecf