disable echo during password entry
authorChris Koeritz <fred@gruntose.com>
Mon, 18 Dec 2017 21:12:38 +0000 (16:12 -0500)
committerChris Koeritz <fred@gruntose.com>
Mon, 18 Dec 2017 21:12:38 +0000 (16:12 -0500)
scripts/site_avenger/revamp_cakelampvm.sh

index 37440de33c9d6dc27a0e105b9a803aa51184cc24..9fff4c0fc3fe5584adb375e7529549cecf58b44e 100644 (file)
@@ -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