From 9a1876571b11a55ac4c387d5c1a890f940548b3d Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Mon, 31 Oct 2016 16:55:10 -0700 Subject: [PATCH] Prototype `whiptails` so they don't fall to shell. Need to do this to all functions. --- automated install/basic-install.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 028e20a4..ddb83e3b 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -545,8 +545,7 @@ setLogging() { LogToggleCommand=(whiptail --separate-output --radiolist "Do you want to log queries?\n (Disabling will render graphs on the Admin page useless):" ${r} ${c} 6) LogChooseOptions=("On (Reccomended)" "" on Off "" off) - LogChoices=$("${LogToggleCommand[@]}" "${LogChooseOptions[@]}" 2>&1 >/dev/tty) - if [[ $? = 0 ]];then + LogChoices=$("${LogToggleCommand[@]}" "${LogChooseOptions[@]}" 2>&1 >/dev/tty) || (echo "::: Cancel selected. Exiting..." && exit 1) case ${LogChoices} in "On (Recommended)") echo "::: Logging On." @@ -557,11 +556,6 @@ setLogging() { QUERYLOGGING=false ;; esac - else - # Well never see this, `set -e` kicked in already and dropped us. - echo "::: Cancel selected. Exiting..." - exit 1 - fi }