diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2016-03-01 10:45:33 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2016-03-01 10:45:33 +0400 |
commit | c3071af5f011eca8dd253e73fa7a4ef65ac5de8d (patch) | |
tree | e21a91adf292cab78ece2015d34be52b0ebb599c | |
parent | e7d50efc458b95d5fad92f6020758d7c63b0dc0b (diff) | |
parent | 802843eda080c95180f194e1d137ba180cf6ca61 (diff) | |
download | mariadb-git-c3071af5f011eca8dd253e73fa7a4ef65ac5de8d.tar.gz |
Merge pull request #158 from ottok/ok-debpkg-10.0
MDEV-9643: Don't emit any "deb-systemd-helper not found" warnings
-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# |