Use 'true' to prevent config script from dying and fix a bad variable name

This commit is contained in:
Emmanuel Papin 2014-12-07 00:04:26 +01:00
parent b201ad2d7e
commit af0770c33f
2 changed files with 4 additions and 4 deletions

View File

@ -40,14 +40,14 @@ if [ ! "$ZM_DB_TYPE" = "mysql" ]; then
fi
# Ask the user if the database shall be installed locally or remotely
db_input high zoneminder/debconf_dblocation
db_input high zoneminder/debconf_dblocation || true
db_go || true
db_get zoneminder/debconf_dblocation
if [ "$RET" = "local" ]; then
if [ ! -e "/usr/sbin/mysqld" ]; then
# Display a message and exit if the user want a local database but no
# database server is available
db_input high zoneminder/debconf_dblocalmissingerror
db_input high zoneminder/debconf_dblocalmissingerror || true
db_go || true
exit 1
fi
@ -65,7 +65,7 @@ else
# dbc_remote_questions_default to true here but unfortunately this does
# not work
# https://bugs.launchpad.net/ubuntu/+source/dbconfig-common/+bug/1065331
db_input high zoneminder/debconf_dbconfigerror
db_input high zoneminder/debconf_dbconfigerror || true
db_go || true
exit 1
fi

View File

@ -83,7 +83,7 @@ if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then
ADMIN_PASSWORD=${RET:-admin}
# Get the lastest database version from dbconfig upgrade folder
DB_VERSION=$(ls -rv /usr/share/dbconfig-common/data/zoneminder/upgrade/$dbctypes | head -1)
DB_VERSION=$(ls -rv /usr/share/dbconfig-common/data/zoneminder/upgrade/$dbc_dbtypes | head -1)
# Update the default admin account and database version
mysql_update