Browse Source

Check that interactive configuration suceeded

Bob Mottram 8 years ago
parent
commit
393022a97e
2 changed files with 16 additions and 0 deletions
  1. 13
    0
      src/freedombone
  2. 3
    0
      src/freedombone-config

+ 13
- 0
src/freedombone View File

83
             rm $COMPLETION_FILE
83
             rm $COMPLETION_FILE
84
         fi
84
         fi
85
     fi
85
     fi
86
+
87
+    # clear the interactive file which indicates configuration success
88
+    interactive_file=$HOME/.${PROJECT_NAME}-interactive
89
+    if [ -f $interactive_file ]; then
90
+        rm $interactive_file
91
+    fi
92
+
86
     interactive_configuration
93
     interactive_configuration
94
+
95
+    # check that the interactive file was created
96
+    if [ ! -f $interactive_file ]; then
97
+        exit 6393562
98
+    fi
99
+    rm $interactive_file
87
 else
100
 else
88
     while [[ $# > 1 ]]
101
     while [[ $# > 1 ]]
89
     do
102
     do

+ 3
- 0
src/freedombone-config View File

1362
     if [ -f temp.cfg ]; then
1362
     if [ -f temp.cfg ]; then
1363
         shred -zu temp.cfg
1363
         shred -zu temp.cfg
1364
     fi
1364
     fi
1365
+
1366
+    # This file indicates that the configuration happened successfully
1367
+    touch $HOME/.${PROJECT_NAME}-interactive
1365
 }
1368
 }
1366
 
1369
 
1367
 function show_result {
1370
 function show_result {