From 393022a97e262662fdce084b8ff59ddfc67044b1 Mon Sep 17 00:00:00 2001 From: Bob Mottram <bob@robotics.uk.to> Date: Sat, 15 Oct 2016 21:30:25 +0100 Subject: [PATCH] Check that interactive configuration suceeded --- src/freedombone | 13 +++++++++++++ src/freedombone-config | 3 +++ 2 files changed, 16 insertions(+) diff --git a/src/freedombone b/src/freedombone index 1b34f5f77..eb1cec792 100755 --- a/src/freedombone +++ b/src/freedombone @@ -83,7 +83,20 @@ if [[ $command_options == "menuconfig" ]]; then rm $COMPLETION_FILE fi fi + + # clear the interactive file which indicates configuration success + interactive_file=$HOME/.${PROJECT_NAME}-interactive + if [ -f $interactive_file ]; then + rm $interactive_file + fi + interactive_configuration + + # check that the interactive file was created + if [ ! -f $interactive_file ]; then + exit 6393562 + fi + rm $interactive_file else while [[ $# > 1 ]] do diff --git a/src/freedombone-config b/src/freedombone-config index 258234334..745b1228a 100755 --- a/src/freedombone-config +++ b/src/freedombone-config @@ -1362,6 +1362,9 @@ function interactive_config { if [ -f temp.cfg ]; then shred -zu temp.cfg fi + + # This file indicates that the configuration happened successfully + touch $HOME/.${PROJECT_NAME}-interactive } function show_result { -- GitLab