summaryrefslogtreecommitdiff
path: root/debian/dist
diff options
context:
space:
mode:
Diffstat (limited to 'debian/dist')
-rw-r--r--debian/dist/Debian/mariadb-server-10.0.postinst6
-rw-r--r--debian/dist/Ubuntu/mariadb-server-10.0.postinst6
2 files changed, 8 insertions, 4 deletions
diff --git a/debian/dist/Debian/mariadb-server-10.0.postinst b/debian/dist/Debian/mariadb-server-10.0.postinst
index 19a69ed00cb..5179fd4944a 100644
--- a/debian/dist/Debian/mariadb-server-10.0.postinst
+++ b/debian/dist/Debian/mariadb-server-10.0.postinst
@@ -266,8 +266,10 @@ 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
+# Check first that the command exists, to avoid emitting any warning messages.
+if [ -x "$(command -v deb-systemd-helper)" ]; then
+ deb-systemd-helper unmask mysql.service > /dev/null
+fi
#DEBHELPER#
diff --git a/debian/dist/Ubuntu/mariadb-server-10.0.postinst b/debian/dist/Ubuntu/mariadb-server-10.0.postinst
index 2486a09a5af..e90ef045e2c 100644
--- a/debian/dist/Ubuntu/mariadb-server-10.0.postinst
+++ b/debian/dist/Ubuntu/mariadb-server-10.0.postinst
@@ -282,8 +282,10 @@ 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
+# Check first that the command exists, to avoid emitting any warning messages.
+if [ -x "$(command -v deb-systemd-helper)" ]; then
+ deb-systemd-helper unmask mysql.service > /dev/null
+fi
#DEBHELPER#