summaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2005-11-11 18:46:12 +0000
committerJudd Vinet <judd@archlinux.org>2005-11-11 18:46:12 +0000
commit9683aeadd86569b69ad44d270e006284e565dfd5 (patch)
treebe02d188ae46ef3ce5efb00048c385c3bee1b909 /network
parent78ce45a497753e2be061e29a6464fcd969041895 (diff)
changed ifup() to skip interfaces that are already up
Diffstat (limited to 'network')
-rwxr-xr-xnetwork2
1 files changed, 2 insertions, 0 deletions
diff --git a/network b/network
index b16c9f1..2510b58 100755
--- a/network
+++ b/network
@@ -31,6 +31,8 @@ ifup()
echo "usage: $0 ifup <interface_name>"
return 1
fi
+ # don't bring up an interface that's already up
+ [ "`/sbin/ifconfig ${1} 2>/dev/null | grep UP`" ] && return 1
eval iwcfg="\$wlan_${1}"
if [ "$iwcfg" != "" ]; then
/usr/sbin/iwconfig $iwcfg