From 5460671a09103d8f38b5ef49e3385cedaec8dbac Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@robotics.uk.to>
Date: Mon, 24 Oct 2016 18:00:09 +0100
Subject: [PATCH] Quotes

---
 src/freedombone-controlpanel | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/freedombone-controlpanel b/src/freedombone-controlpanel
index bd64539a1..d46c6d89d 100755
--- a/src/freedombone-controlpanel
+++ b/src/freedombone-controlpanel
@@ -866,6 +866,9 @@ function backup_data {
 function restore_data_from_storage {
     restore_type="$1"
 
+    AllStr=$"all"
+    ExitStr=$"Exit"
+
     if [[ $restore_type != "local" ]]; then
         restore_command="${PROJECT_NAME}-restore-remote $remote_domain_name configuration;;"
     else
@@ -910,7 +913,6 @@ function restore_data_from_storage {
     do
 
         app_list=()
-        AllStr=$"all"
         n=1
         applist="$n $AllStr off"
         n=$[n+1]
@@ -934,7 +936,6 @@ function restore_data_from_storage {
             app_index=$[app_index+1]
             app_list+=("$app_name")
         done
-        ExitStr=$"Exit"
         applist="$applist $n $ExitStr on"
         n=$[n+1]
 
@@ -951,14 +952,15 @@ function restore_data_from_storage {
         app_name=$(cat $data)
 
         # exit
-        if [[ $app_name == "$ExitStr" ]]; then
+        if [[ "$app_name" == "$ExitStr" ]]; then
             break
         fi
 
         clear
+        echo $"Selected $app_name"
 
         # Restore all
-        if [[ $app_name == "$AllStr" ]]; then
+        if [[ "$app_name" == "$AllStr" ]]; then
             $restore_command
             retcode="$?"
             if [[ "$retcode" != "0" ]]; then
-- 
GitLab