aboutsummaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
Diffstat (limited to 'network')
-rwxr-xr-xnetwork8
1 files changed, 3 insertions, 5 deletions
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 $?
}