[fix] mysql_pass issue in debian/config

This commit is contained in:
Benjamin Sonntag 2014-10-01 15:05:24 +02:00
parent 0acbaff07a
commit f01ebc9b51
1 changed files with 3 additions and 3 deletions

View File

@ -40,12 +40,12 @@ check_mysql()
db_input high alternc/mysql/remote_password || true db_input high alternc/mysql/remote_password || true
db_go db_go
db_get alternc/mysql/remote_password || true db_get alternc/mysql/remote_password || true
MYSQL_PASSWORD="$RET" MYSQL_PASS="$RET"
db_input high alternc/mysql/client || true db_input high alternc/mysql/client || true
db_go db_go
db_get alternc/mysql/client || true db_get alternc/mysql/client || true
MYSQL_CLIENT="$RET" MYSQL_CLIENT="$RET"
if [ "`mysql -u"$MYSQL_USER" -p"$MYSQL_PASSWORD" -h"$MYSQL_HOST" -Bse 'SELECT "OK";' 2>/dev/null`" = "OK" ]; then if [ "`mysql -u"$MYSQL_USER" -p"$MYSQL_PASS" -h"$MYSQL_HOST" -Bse 'SELECT "OK";' 2>/dev/null`" = "OK" ]; then
STATE=`expr $STATE + 1` STATE=`expr $STATE + 1`
else else
db_input high alternc/retry_remote_mysql || true db_input high alternc/retry_remote_mysql || true
@ -107,7 +107,7 @@ while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 14 ]; do
1) 1)
if [ -r /etc/alternc/my.cnf ]; then if [ -r /etc/alternc/my.cnf ]; then
MYSQL_USER=$(cat /etc/alternc/my.cnf |grep "^user"|sed -r 's/user="(.*)"/\1/'); MYSQL_USER=$(cat /etc/alternc/my.cnf |grep "^user"|sed -r 's/user="(.*)"/\1/');
MYSQL_PASSWORD=$(cat /etc/alternc/my.cnf |grep "^password"|sed -r 's/password="(.*)"/\1/'); MYSQL_PASS=$(cat /etc/alternc/my.cnf |grep "^password"|sed -r 's/password="(.*)"/\1/');
MYSQL_DATABASE=$(cat /etc/alternc/my.cnf |grep "^database"|sed -r 's/database="(.*)"/\1/'); MYSQL_DATABASE=$(cat /etc/alternc/my.cnf |grep "^database"|sed -r 's/database="(.*)"/\1/');
MYSQL_HOST=$(cat /etc/alternc/my.cnf |grep "^host"|sed -r 's/host="(.*)"/\1/'); MYSQL_HOST=$(cat /etc/alternc/my.cnf |grep "^host"|sed -r 's/host="(.*)"/\1/');
db_set alternc/mysql/host "$MYSQL_HOST" db_set alternc/mysql/host "$MYSQL_HOST"