Commit f25a5c39 authored by Sergei Golubchik's avatar Sergei Golubchik

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
parent a19089ff
......@@ -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
......
interest-noawait /etc/mysql
interest-noawait /etc/systemd/system/mariadb.service.d
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment