summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorOtto Kekäläinen <otto@mariadb.org>2016-01-11 10:28:00 +0200
committerOtto Kekäläinen <otto@mariadb.org>2016-01-11 10:28:00 +0200
commit2a9f84b9a6e72f2d4facfaf49226736cdfe38d53 (patch)
treed7532fb6d6236423d457a45dd33bc9d71f860646 /debian
parent3730d8a225fe33a0157e0aaa85121ef7cecf288d (diff)
downloadmariadb-git-2a9f84b9a6e72f2d4facfaf49226736cdfe38d53.tar.gz
MDEV-9354: Debian: unmask the mysql.service on installation
Unmask the systemd mysql.service if left behind by mysql-server-5.6 Without this a simple 'apt-get install mariadb-server' would end up with a system where mysqld is not running despite it was running OK with mysql-server-5.6 installed, and users might wrongly think mariadb-server package is broken when the real cause was the removal of mysql-server-5.6 that left a /etc/systemd/system/ file behind pointing to /dev/null.
Diffstat (limited to 'debian')
-rw-r--r--debian/dist/Debian/mariadb-server-10.0.postinst5
-rw-r--r--debian/dist/Ubuntu/mariadb-server-10.0.postinst5
2 files changed, 10 insertions, 0 deletions
diff --git a/debian/dist/Debian/mariadb-server-10.0.postinst b/debian/dist/Debian/mariadb-server-10.0.postinst
index 19594fb910e..19a69ed00cb 100644
--- a/debian/dist/Debian/mariadb-server-10.0.postinst
+++ b/debian/dist/Debian/mariadb-server-10.0.postinst
@@ -264,6 +264,11 @@ fi
db_stop # in case invoke failes
+# If we upgrade from MySQL mysql.service may be masked, which also
+# means init.d script is disabled. Unmask mysql service explicitely.
+# Ignore exit code as command is not available everywhere.
+deb-systemd-helper unmask mysql.service > /dev/null || true
+
#DEBHELPER#
exit 0
diff --git a/debian/dist/Ubuntu/mariadb-server-10.0.postinst b/debian/dist/Ubuntu/mariadb-server-10.0.postinst
index 1acfbc80970..2486a09a5af 100644
--- a/debian/dist/Ubuntu/mariadb-server-10.0.postinst
+++ b/debian/dist/Ubuntu/mariadb-server-10.0.postinst
@@ -280,6 +280,11 @@ fi
db_stop # in case invoke failes
+# If we upgrade from MySQL mysql.service may be masked, which also
+# means init.d script is disabled. Unmask mysql service explicitely.
+# Ignore exit code as command is not available everywhere.
+deb-systemd-helper unmask mysql.service > /dev/null || true
+
#DEBHELPER#
exit 0