[enh] remote mysql: show an error when connection fails
This commit is contained in:
parent
c05f1bddd2
commit
ca8cd30437
|
@ -51,13 +51,17 @@ check_mysql()
|
|||
if [ "`mysql -u"$MYSQL_USER" -p"$MYSQL_PASSWORD" -h"$MYSQL_HOST" -Bse 'SELECT "OK";' 2>/dev/null`" = "OK" ]; then
|
||||
STATE=`expr $STATE + 1`
|
||||
else
|
||||
db_input high alternc/remote_mysql_error || true
|
||||
db_input high alternc/retry_remote_mysql || true
|
||||
if [ $? -eq 30 ]; then
|
||||
db_input high alternc/remote_mysql_error || true
|
||||
db_go || true
|
||||
exit 4
|
||||
fi
|
||||
db_go
|
||||
db_get alternc/remote_mysql_error || true
|
||||
db_get alternc/retry_remote_mysql || true
|
||||
if [ "$RET" = "false" ]; then
|
||||
db_input high alternc/remote_mysql_error || true
|
||||
db_go || true
|
||||
exit 4
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -241,7 +241,7 @@ _Description: Use a remote MySQL server?
|
|||
Please confirm you want to use a remote Mysql Server.
|
||||
If not, AlternC cannot be installed.
|
||||
|
||||
Template: alternc/remote_mysql_error
|
||||
Template: alternc/retry_remote_mysql
|
||||
Type: boolean
|
||||
_Description: MySQL connection error. Try again?
|
||||
Remote connection to the MySQL server failed.
|
||||
|
@ -254,3 +254,10 @@ _Description: Private IP detected, use it anyway?
|
|||
this is an expected situation, since the server might not be reachable
|
||||
from outside your network.
|
||||
|
||||
Template: alternc/remote_mysql_error
|
||||
Type: error
|
||||
_Description: Remote mysql: connection error
|
||||
Connection to the remote MySQL server failed.
|
||||
.
|
||||
This is a fatal error and will cause the package installation
|
||||
to fail.
|
||||
|
|
Loading…
Reference in New Issue