From 9e341d31cd15172941268412d258c38591ff4988 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Tue, 8 Jan 2008 09:09:46 -0600 Subject: network script logic cleanups/enhancements Signed-off-by: Aaron Griffin --- network | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'network') diff --git a/network b/network index d0c28eb..7489206 100755 --- a/network +++ b/network @@ -22,7 +22,7 @@ ifup() [ "$(/sbin/ifconfig ${1} 2>/dev/null | grep UP)" ] && return 0 eval iwcfg="\$wlan_${1}" if [ "$iwcfg" != "" ]; then - sh -c "/usr/sbin/iwconfig $iwcfg" + /usr/sbin/iwconfig $iwcfg /bin/sleep 2 fi eval ifcfg="\$${1}" @@ -47,11 +47,9 @@ ifdown() if [ -f /var/run/dhcpcd-${1}.pid ]; then kill $(cat /var/run/dhcpcd-${1}.pid) fi - # Bring the interface itself down (in case it didn't happen above) - /sbin/ifconfig ${1} down >/dev/null 2>&1 - else - /sbin/ifconfig $ifcfg down >/dev/null 2>&1 fi + # Always bring the interface itself down + /sbin/ifconfig ${1} down >/dev/null 2>&1 return $? } -- cgit v1.2.3