From 03eff8506f53db7e72630835a9a4d83ebd82c1dd Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Mon, 18 Dec 2017 16:12:38 -0500 Subject: [PATCH] disable echo during password entry --- scripts/site_avenger/revamp_cakelampvm.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/site_avenger/revamp_cakelampvm.sh b/scripts/site_avenger/revamp_cakelampvm.sh index 37440de3..9fff4c0f 100644 --- a/scripts/site_avenger/revamp_cakelampvm.sh +++ b/scripts/site_avenger/revamp_cakelampvm.sh @@ -22,7 +22,12 @@ source "$FEISTY_MEOW_SCRIPTS/system/common_sysadmin.sh" # new requirement is to get the sql root password, since we need to do some sql db configuration. echo -n "Please enter the MySQL root account password: " +# turn off echo but remember former setting. +stty_orig=`stty -g` +stty -echo read mysql_passwd +# turn echo back on. +stty $stty_orig if [ -z "$mysql_passwd" ]; then echo "This script must have the sql root password to proceed." exit 1 -- 2.34.1