diff options
author | Niels Thykier <niels@thykier.net> | 2018-01-01 08:35:36 +0000 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2018-01-01 08:35:36 +0000 |
commit | 8a9db97be30865edc260549fad22ac787cf7293a (patch) | |
tree | 5ed6254348ee24b63c6dcfde70cfe2949236142b | |
parent | 60d7eff8a46cdc62776cc3c25fadf98fcb504667 (diff) | |
download | debhelper-8a9db97be30865edc260549fad22ac787cf7293a.tar.gz |
autoscripts/*systemd*: Consistently use "|| true"
Signed-off-by: Niels Thykier <niels@thykier.net>
-rw-r--r-- | autoscripts/postrm-systemd | 6 | ||||
-rw-r--r-- | autoscripts/prerm-systemd | 2 | ||||
-rw-r--r-- | autoscripts/prerm-systemd-restart | 2 | ||||
-rw-r--r-- | 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 <niels@thykier.net> Sun, 17 Dec 2017 07:59:18 +0000 |