summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-12-11 11:38:30 +0100
committerSergei Golubchik <serg@mariadb.org>2018-12-12 20:19:56 +0100
commit541500295abdba7fa619065069291ac9c1dd6e83 (patch)
tree2aeaab5ce17f5ab38436b18a8d5a56bf5de77100 /debian
parentf77f8f6d1a5f4846766a8aab00a9e1e5f41909a1 (diff)
downloadmariadb-git-541500295abdba7fa619065069291ac9c1dd6e83.tar.gz
debian install/upgrade fixes
1. don't run full mysql_upgrade on every server restart, use --version-check to do it only once 2. fix syslog tag name in the postinst script, don't pretend mysqld_safe generated all these messages. Auto-detect the version to simplify maintenance
Diffstat (limited to 'debian')
-rw-r--r--debian/additions/debian-start2
-rw-r--r--debian/mariadb-server-10.1.postinst7
2 files changed, 6 insertions, 3 deletions
diff --git a/debian/additions/debian-start b/debian/additions/debian-start
index 9fd0030d0ec..ff741b86f79 100644
--- a/debian/additions/debian-start
+++ b/debian/additions/debian-start
@@ -9,7 +9,7 @@ source /usr/share/mysql/debian-start.inc.sh
MYSQL="/usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf"
MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
-MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf"
+MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf --version-check"
MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf"
MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables"
MYCHECK_PARAMS="--all-databases --fast --silent"
diff --git a/debian/mariadb-server-10.1.postinst b/debian/mariadb-server-10.1.postinst
index eede069ae12..5382d3d0690 100644
--- a/debian/mariadb-server-10.1.postinst
+++ b/debian/mariadb-server-10.1.postinst
@@ -2,13 +2,16 @@
. /usr/share/debconf/confmodule
+# assume the filename is /path/to/mariadb-server-##.#.postinst
+VER=${0: -13:4}
+
if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
# This command can be used as pipe to syslog. With "-s" it also logs to stderr.
-ERR_LOGGER="logger -p daemon.err -t mysqld_safe -i"
+ERR_LOGGER="logger -p daemon.err -t mariadb-server-$VER.postinst -i"
# This will make an error in a logged command immediately apparent by aborting
# the install, rather than failing silently and leaving a broken install.
set -o pipefail
@@ -131,7 +134,7 @@ EOF
db_set mysql-server/postrm_remove_database false || true
# To avoid downgrades.
- touch $mysql_statedir/debian-10.1.flag
+ touch $mysql_statedir/debian-$VER.flag
## On every reconfiguration the maintenance user is recreated.
#