summaryrefslogtreecommitdiffstats
path: root/src/wifi-menu
diff options
context:
space:
mode:
authorWilliam Giokas <1007380@gmail.com>2013-01-25 05:22:21 +0100
committerWilliam Giokas <1007380@gmail.com>2013-01-25 05:22:21 +0100
commit45f9cb55fffe278f3ca10fbc3deef478979ec6db (patch)
tree8a624276de98b9d58df37dc0c6c3db90ce6c6d83 /src/wifi-menu
parent61e97343d0169839b89dccd762f3c492e74cee8a (diff)
downloadnetctl-45f9cb55fffe278f3ca10fbc3deef478979ec6db.tar.gz
netctl-45f9cb55fffe278f3ca10fbc3deef478979ec6db.tar.xz
[wifi-menu] Do not fail if already connected
If netctl is already connected to a network and wifi-menu is run, then it will fail to connect. Having wifi-menu call `netctl switch-to` instead of `netctl restart` causes wifi-menu to behave like netctl switch-to: It will connect if not connected, and if already connected on that interface it will put the connected profile down the put up the selected profile. This fixes github issue #6. Signed-off-by: William Giokas <1007380@gmail.com>
Diffstat (limited to 'src/wifi-menu')
-rwxr-xr-xsrc/wifi-menu2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wifi-menu b/src/wifi-menu
index 2b2e700..57275c4 100755
--- a/src/wifi-menu
+++ b/src/wifi-menu
@@ -146,7 +146,7 @@ connect_to_ssid()
SPAWNED_PROFILE=1
fi
clear
- if ! netctl restart "$PROFILE"; then
+ if ! netctl switch-to "$PROFILE"; then
if (( SPAWNED_PROFILE )); then
msg=" CONNECTING FAILED