summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-06-23 15:37:09 +0200
committerSergei Golubchik <serg@mariadb.org>2018-06-24 15:18:36 +0200
commitf25a5c39c1467df4677663607625c7444e65f837 (patch)
treeee9be8b849a3faae8592ec6be9ab31fcaeee7ba8 /debian
parenta19089ff4e69d596bbf5f4ca48a0d89452da0b8f (diff)
downloadmariadb-git-f25a5c39c1467df4677663607625c7444e65f837.tar.gz
MDEV-14560 Extra engines enabled through additional config are not loaded on first installation
Solution for Debian/Ubuntu: install a trigger to restart mysqld automatically whenever a package changes something in /etc/mysql or in /etc/systemd/system/mariadb.service.d
Diffstat (limited to 'debian')
-rw-r--r--debian/mariadb-server-10.2.postinst21
-rw-r--r--debian/mariadb-server-10.2.triggers2
2 files changed, 16 insertions, 7 deletions
diff --git a/debian/mariadb-server-10.2.postinst b/debian/mariadb-server-10.2.postinst
index 9131ca851a7..bf5cd289d76 100644
--- a/debian/mariadb-server-10.2.postinst
+++ b/debian/mariadb-server-10.2.postinst
@@ -50,14 +50,14 @@ EOF
return $retval
}
-# This is necessary because mysql_install_db removes the pid file in /var/run
-# and because changed configuration options should take effect immediately.
-# In case the server wasn't running at all it should be ok if the stop
-# script fails. I can't tell at this point because of the cleaned /var/run.
-set +e; invoke stop; set -e
-
case "$1" in
configure)
+ # This is needed because mysql_install_db removes the pid file in /var/run
+ # and because changed configuration options should take effect immediately.
+ # In case the server wasn't running at all it should be ok if the stop
+ # script fails. I can't tell at this point because of the cleaned /var/run.
+ set +e; invoke stop; set -e
+
mysql_statedir=/usr/share/mysql
mysql_datadir=/var/lib/mysql
mysql_logdir=/var/log/mysql
@@ -91,7 +91,7 @@ case "$1" in
mv "$targetdir" "$mysql_tmp"
cat << EOF > "$mysql_tmp/README"
-Ff you're reading this, it's most likely because you had replaced /var/lib/mysql
+If you're reading this, it's most likely because you had replaced /var/lib/mysql
with a symlink, then upgraded to a new version of mysql, and then dpkg
removed your symlink (see #182747 and others). The mysql packages noticed
that this happened, and as a workaround have restored it. However, because
@@ -240,6 +240,13 @@ EOF
abort-upgrade|abort-remove|abort-configure)
;;
+ triggered)
+ if [ -x "$(command -v systemctl)" ]; then
+ systemctl daemon-reload
+ fi
+ invoke restart
+ ;;
+
*)
echo "postinst called with unknown argument '$1'" 1>&2
exit 1
diff --git a/debian/mariadb-server-10.2.triggers b/debian/mariadb-server-10.2.triggers
new file mode 100644
index 00000000000..d1f5f5e14f1
--- /dev/null
+++ b/debian/mariadb-server-10.2.triggers
@@ -0,0 +1,2 @@
+interest-noawait /etc/mysql
+interest-noawait /etc/systemd/system/mariadb.service.d