From b068fa94d56d274fdc6195770aee260ac567f6c6 Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@robotics.uk.to>
Date: Sun, 30 Oct 2016 10:11:03 +0000
Subject: [PATCH] Simplify

---
 src/freedombone-sec | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/src/freedombone-sec b/src/freedombone-sec
index 06f9ad94d..62ea17177 100755
--- a/src/freedombone-sec
+++ b/src/freedombone-sec
@@ -205,16 +205,9 @@ function change_xmpp_settings {
 }
 
 function allow_ssh_passwords {
-    if [[ $SSH_PASSWORDS == "yes" ]]; then
-        dialog --title $"SSH Passwords" \
-               --backtitle $"Freedombone Security Configuration" \
-               --yesno $"\nAllow SSH login using passwords?" 7 60
-    else
-        dialog --title $"SSH Passwords" \
-               --backtitle $"Freedombone Security Configuration" \
-               --defaultno \
-               --yesno $"\nAllow SSH login using passwords?" 7 60
-    fi
+    dialog --title $"SSH Passwords" \
+           --backtitle $"Freedombone Security Configuration" \
+           --yesno $"\nAllow SSH login using passwords?" 7 60
     sel=$?
     case $sel in
         0) SSH_PASSWORDS="yes";;
@@ -738,6 +731,8 @@ function menu_security_settings {
             ;;
         8)
             allow_ssh_passwords
+            change_ssh_settings
+            exit 0
             ;;
         9)
             exit 0
-- 
GitLab