summaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2008-01-08 09:09:46 -0600
committerAaron Griffin <aaronmgriffin@gmail.com>2008-01-08 09:31:15 -0600
commit9e341d31cd15172941268412d258c38591ff4988 (patch)
tree538fb72d371b2defe178ebec1e93502888f60e7b /network
parent7719cd7c0ac6d3f316ed8595becf29ef418d9af9 (diff)
network script logic cleanups/enhancements
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
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 $?
}