summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/netctl.in4
-rwxr-xr-xsrc/wifi-menu4
2 files changed, 3 insertions, 5 deletions
diff --git a/src/netctl.in b/src/netctl.in
index 51ffe02..ed4cea4 100644
--- a/src/netctl.in
+++ b/src/netctl.in
@@ -48,8 +48,8 @@ list() {
local indicators=( '*' ' ' )
list_profiles | while read -r Profile; do
sd_call "is-active --quiet" "$Profile" &> /dev/null
- # Make the return variable boolean
- [[ $? -eq 0 ]]; printf '%s %s\n' "${indicators[$?]}" "$Profile"
+ # Make the return value boolean
+ printf '%s %s\n' "${indicators[!! $?]}" "$Profile"
done
}
diff --git a/src/wifi-menu b/src/wifi-menu
index a30d15c..d0903aa 100755
--- a/src/wifi-menu
+++ b/src/wifi-menu
@@ -140,9 +140,7 @@ connect_to_ssid()
local msg
PROFILE=$(ssid_to_profile "$1")
if [[ $? -ne 0 ]]; then
- PROFILE=$(create_profile "$1")
- RETURN=$?
- (( RETURN == 0 )) || return $RETURN
+ PROFILE=$(create_profile "$1") || return $?
NEW_PROFILE=1
fi
clear