diff options
author | William Giokas <1007380@gmail.com> | 2013-01-25 05:22:21 +0100 |
---|---|---|
committer | William Giokas <1007380@gmail.com> | 2013-01-25 05:22:21 +0100 |
commit | 45f9cb55fffe278f3ca10fbc3deef478979ec6db (patch) | |
tree | 8a624276de98b9d58df37dc0c6c3db90ce6c6d83 | |
parent | 61e97343d0169839b89dccd762f3c492e74cee8a (diff) | |
download | netctl-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>
-rwxr-xr-x | src/wifi-menu | 2 |
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 |