aboutsummaryrefslogtreecommitdiff
path: root/netcfg
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2005-11-28 19:36:56 +0000
committerJudd Vinet <judd@archlinux.org>2005-11-28 19:36:56 +0000
commit2c90c8af7bee4f06cf05c481e658406df35fe401 (patch)
tree34427b0e25526f3bbe0e7dc32dd70d436a4bb62d /netcfg
parent15c49deac15f97e647afc081c7b5e210ad4bdcd3 (diff)
downloadinitscripts-2c90c8af7bee4f06cf05c481e658406df35fe401.tar.xz
added USEWPA to template to enable/disable wpa_supplicant
Diffstat (limited to 'netcfg')
-rwxr-xr-xnetcfg7
1 files changed, 4 insertions, 3 deletions
diff --git a/netcfg b/netcfg
index 4ede296..3140c30 100755
--- a/netcfg
+++ b/netcfg
@@ -49,7 +49,7 @@ stop_profile()
[ "$GATEWAY" ] && route del default gw $GATEWAY
# shutdown wpa_supplicant if it's running
- [ "$WPAOPTS" ] && wpa_cli terminate >/dev/null 2>&1
+ [ "$USEWPA" = "yes" -o "$USEWPA" = "YES" ] && wpa_cli terminate >/dev/null 2>&1
# bring down dhcpcd if we're using it
[ "$IFOPTS" = "dhcp" -o "$IFOPTS" = "DHCP" ] && dhcpcd -k
@@ -94,7 +94,8 @@ start_profile()
stat_busy "Starting network profile: $1"
# Re-read the profile (stop_profile might have overwritten our settings)
- unset DESCRIPTION INTERFACE IFOPTS IWOPTS WIFI_INTERFACE WIFI_WAIT WPAOPTS
+ unset DESCRIPTION INTERFACE IFOPTS
+ unset IWOPTS WIFI_INTERFACE WIFI_WAIT USEWPA WPAOPTS
unset GATEWAY HOSTNAME DOMAIN DNS1 DNS2
. $PROFILE_DIR/$1
@@ -107,7 +108,7 @@ start_profile()
fi
# Start wpa_supplicant, if necessary
- if [ "$WPAOPTS" ]; then
+ if [ "$USEWPA" = "yes" -o "$USEWPA" = "YES" ]; then
ifconfig $WIFI_INTERFACE up
wpa_supplicant -wB -i $WIFI_INTERFACE -c /etc/wpa_supplicant.conf $WPAOPTS
# I donīt know how we could determine if wpa_supplicant is ready...