diff options
author | Aaron Griffin <aaronmgriffin@gmail.com> | 2008-01-08 09:09:46 -0600 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2008-01-08 09:31:15 -0600 |
commit | 9e341d31cd15172941268412d258c38591ff4988 (patch) | |
tree | 538fb72d371b2defe178ebec1e93502888f60e7b /network | |
parent | 7719cd7c0ac6d3f316ed8595becf29ef418d9af9 (diff) |
network script logic cleanups/enhancements
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'network')
-rwxr-xr-x | network | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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 $? } |