From 92fc2f3536f565fda60e6a91751b317b90be6cc1 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Wed, 7 Feb 2018 15:31:40 -0500 Subject: [PATCH] being forced to debug missing prompt something is causing the revamp not to show the prompt. --- scripts/security/password_functions.sh | 1 + scripts/site_avenger/revamp_cakelampvm.sh | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/scripts/security/password_functions.sh b/scripts/security/password_functions.sh index 92e0d71e..637e352d 100644 --- a/scripts/security/password_functions.sh +++ b/scripts/security/password_functions.sh @@ -62,6 +62,7 @@ function read_password() { prompt="$1"; shift echo -n "$prompt " +# sync # turn off echo but remember former setting. stty_orig=`stty -g` stty -echo diff --git a/scripts/site_avenger/revamp_cakelampvm.sh b/scripts/site_avenger/revamp_cakelampvm.sh index c5cf860f..d86a35d7 100644 --- a/scripts/site_avenger/revamp_cakelampvm.sh +++ b/scripts/site_avenger/revamp_cakelampvm.sh @@ -24,9 +24,13 @@ source "$FEISTY_MEOW_SCRIPTS/security/password_functions.sh" # new requirement to have the sql root password, since we need to do some sql db configuration. +echo A mysql_passwd="$(load_password /etc/mysql/secret_password)" +echo B if [ -z "$mysql_password" ]; then +echo C mysql_password="$(read_password "Please enter the MySQL root account password:")" +echo D # echo -n "Please enter the MySQL root account password: " # # turn off echo but remember former setting. # stty_orig=`stty -g` @@ -36,9 +40,11 @@ if [ -z "$mysql_password" ]; then # stty $stty_orig fi if [ -z "$mysql_passwd" ]; then +echo E echo "This script must have the sql root password to proceed." exit 1 else +echo F store_password /etc/mysql/secret_password "$mysql_password" fi -- 2.34.1