From 8a9db97be30865edc260549fad22ac787cf7293a Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Mon, 1 Jan 2018 08:35:36 +0000 Subject: autoscripts/*systemd*: Consistently use "|| true" Signed-off-by: Niels Thykier --- autoscripts/postrm-systemd | 6 +++--- autoscripts/prerm-systemd | 2 +- autoscripts/prerm-systemd-restart | 2 +- debian/changelog | 4 ++++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/autoscripts/postrm-systemd b/autoscripts/postrm-systemd index 22725ce1..d95013b6 100644 --- a/autoscripts/postrm-systemd +++ b/autoscripts/postrm-systemd @@ -1,12 +1,12 @@ if [ "$1" = "remove" ]; then if [ -x "/usr/bin/deb-systemd-helper" ]; then - deb-systemd-helper mask #UNITFILES# >/dev/null + deb-systemd-helper mask #UNITFILES# >/dev/null || true fi fi if [ "$1" = "purge" ]; then if [ -x "/usr/bin/deb-systemd-helper" ]; then - deb-systemd-helper purge #UNITFILES# >/dev/null - deb-systemd-helper unmask #UNITFILES# >/dev/null + deb-systemd-helper purge #UNITFILES# >/dev/null || true + deb-systemd-helper unmask #UNITFILES# >/dev/null || true fi fi diff --git a/autoscripts/prerm-systemd b/autoscripts/prerm-systemd index 6cc72423..d85223f7 100644 --- a/autoscripts/prerm-systemd +++ b/autoscripts/prerm-systemd @@ -1,3 +1,3 @@ if [ -d /run/systemd/system ]; then - deb-systemd-invoke stop #UNITFILES# >/dev/null + deb-systemd-invoke stop #UNITFILES# >/dev/null || true fi diff --git a/autoscripts/prerm-systemd-restart b/autoscripts/prerm-systemd-restart index 51abb0b0..13b0388e 100644 --- a/autoscripts/prerm-systemd-restart +++ b/autoscripts/prerm-systemd-restart @@ -1,3 +1,3 @@ if [ -d /run/systemd/system ] && [ "$1" = remove ]; then - deb-systemd-invoke stop #UNITFILES# >/dev/null + deb-systemd-invoke stop #UNITFILES# >/dev/null || true fi diff --git a/debian/changelog b/debian/changelog index 6ec3bf69..1618c905 100644 --- a/debian/changelog +++ b/debian/changelog @@ -39,6 +39,10 @@ debhelper (11.1) UNRELEASED; urgency=medium * Dh_Lib.pm: Make "exit 1" the default error-handler instead of "exit $?" as this makes it easier to migrate from sed-based autoscript substitutions to the new hash-based ones. + * autoscripts/*systemd*: Also use "|| true" in removal scripts for + systemd related tools if we do it in other scripts for the same + command. Thanks to Laurent Bigonville for the report. + (Closes: #761272) -- Niels Thykier Sun, 17 Dec 2017 07:59:18 +0000 -- cgit v1.2.3