diff options
author | Otto Kekäläinen <otto@mariadb.org> | 2016-02-29 23:02:53 +0200 |
---|---|---|
committer | Otto Kekäläinen <otto@mariadb.org> | 2016-02-29 23:02:53 +0200 |
commit | 802843eda080c95180f194e1d137ba180cf6ca61 (patch) | |
tree | e21a91adf292cab78ece2015d34be52b0ebb599c /debian | |
parent | e7d50efc458b95d5fad92f6020758d7c63b0dc0b (diff) | |
download | mariadb-git-802843eda080c95180f194e1d137ba180cf6ca61.tar.gz |
MDEV-9643: Don't emit any "deb-systemd-helper not found" warnings
Diffstat (limited to 'debian')
-rw-r--r-- | debian/dist/Debian/mariadb-server-10.0.postinst | 6 | ||||
-rw-r--r-- | debian/dist/Ubuntu/mariadb-server-10.0.postinst | 6 |
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# |