the mysql password management seems to be doing well now.
# return the password in the variable they provided.
eval $varname="$passwd"
# return the password in the variable they provided.
eval $varname="$passwd"
-#echo varname is: $varname
-#echo new value of that variable is ${!varname}
}
# stores a password into a password file. the password file should be the
}
# stores a password into a password file. the password file should be the
stty $stty_orig
# return the password in the variable they provided.
eval $varname="$the_passwd"
stty $stty_orig
# return the password in the variable they provided.
eval $varname="$the_passwd"
-#echo varname is: $varname
-#echo new value of that variable is ${!varname}
-# new requirement to have the sql root password, since we need to do some sql db configuration.
-
-echo A
+# it's a requirement to have sql root password, since we may need some sql db configuration.
load_password /etc/mysql/secret_password mysql_passwd
load_password /etc/mysql/secret_password mysql_passwd
if [ -z "$mysql_passwd" ]; then
if [ -z "$mysql_passwd" ]; then
read_password "Please enter the MySQL root account password:" mysql_passwd
read_password "Please enter the MySQL root account password:" mysql_passwd
-echo D
-echo password was found as: $mysql_passwd
-# 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
fi
if [ -z "$mysql_passwd" ]; then
fi
if [ -z "$mysql_passwd" ]; then
echo "This script must have the sql root password to proceed."
exit 1
else
echo "This script must have the sql root password to proceed."
exit 1
else
store_password /etc/mysql/secret_password "$mysql_passwd"
fi
store_password /etc/mysql/secret_password "$mysql_passwd"
fi