From 45f9cb55fffe278f3ca10fbc3deef478979ec6db Mon Sep 17 00:00:00 2001 From: William Giokas <1007380@gmail.com> Date: Thu, 24 Jan 2013 22:22:21 -0600 Subject: [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> --- src/wifi-menu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3-24-g4f1b