From b965d56caeb5ce0501dd519516068b71a206f17b Mon Sep 17 00:00:00 2001 From: rootzoll Date: Mon, 14 Jan 2019 18:13:45 +0100 Subject: [PATCH] test result of password config --- home.admin/00mainMenu.sh | 4 ++-- home.admin/config.scripts/blitz.setpassword.sh | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/home.admin/00mainMenu.sh b/home.admin/00mainMenu.sh index 73003fd..8bafa37 100755 --- a/home.admin/00mainMenu.sh +++ b/home.admin/00mainMenu.sh @@ -378,8 +378,8 @@ case $CHOICE in sudo shutdown -r now ;; PASSWORD) - sudo /home/admin/config.scripts/blitz.setpassword.sh - echo "Press ENTER to Reboot." + result=$(sudo /home/admin/config.scripts/blitz.setpassword.sh) + echo "Press ENTER to Reboot. (${result})" read key sudo shutdown -r now ;; diff --git a/home.admin/config.scripts/blitz.setpassword.sh b/home.admin/config.scripts/blitz.setpassword.sh index 6dc761b..316b71e 100644 --- a/home.admin/config.scripts/blitz.setpassword.sh +++ b/home.admin/config.scripts/blitz.setpassword.sh @@ -4,6 +4,7 @@ if [ "$1" = "-h" ] || [ "$1" = "-help" ]; then echo "small config script to set a passwords A,B,C & D" echo "blitz.setpassword.sh [?a|b|c|d] [?newpassword] " + echo "exits on 0 = needs reboot" exit 1 fi @@ -131,6 +132,7 @@ if [ "${abcd}" = "a" ]; then echo "" echo "OK - password A changed for user pi, root, admin & bitcoin" + exit 0 ############################ # PASSWORD B @@ -199,6 +201,7 @@ elif [ "${abcd}" = "b" ]; then echo "OK -> RPC Password B changed" echo "if services are running - reboot is needed to activate new settings" + exit 0 ############################ # PASSWORD C @@ -231,6 +234,7 @@ elif [ "${abcd}" = "c" ]; then # final user output echo "" echo "OK" + exit 0 ############################ # PASSWORD D @@ -238,10 +242,10 @@ elif [ "${abcd}" = "d" ]; then echo "#### NOTICE ####" echo "Sorry - the password D cannot be changed. Its the password you set on creating your wallet to protect your seed (the list of words)." + exit 1 # everything else else echo "FAIL: there is no password '${abcd}' (reminder: use lower case)" -fi - -echo "" \ No newline at end of file + exit 1 +fi \ No newline at end of file