diff options
Diffstat (limited to 'debian')
-rw-r--r-- | debian/mariadb-server-10.2.postinst | 21 | ||||
-rw-r--r-- | debian/mariadb-server-10.2.triggers | 2 |
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 |