From 5d097054219ffb4efdeb946a4ffa59caeb15511c Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Sun, 13 May 2018 15:22:08 +0000 Subject: dh_installinit: Skip systemctl daemon-reload in c12 It is not dh_installinit's job and dh_installsystemd already does it. Signed-off-by: Niels Thykier --- autoscripts/postrm-init | 7 ------- dh_installinit | 4 ++++ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/autoscripts/postrm-init b/autoscripts/postrm-init index 6f5bb09a..1c292982 100644 --- a/autoscripts/postrm-init +++ b/autoscripts/postrm-init @@ -1,10 +1,3 @@ if [ "$1" = "purge" ] ; then update-rc.d #SCRIPT# remove >/dev/null fi - - -# In case this system is running systemd, we make systemd reload the unit files -# to pick up changes. -if [ -d /run/systemd/system ] ; then - systemctl --system daemon-reload >/dev/null || true -fi diff --git a/dh_installinit b/dh_installinit index 7ba8504a..8cfa765c 100755 --- a/dh_installinit +++ b/dh_installinit @@ -399,6 +399,10 @@ foreach my $package (@{$dh{DOPACKAGES}}) { autoscript($package,"postrm","postrm-init", { 'SCRIPT' => $script, 'ERROR_HANDLER' => $dh{ERROR_HANDLER} }, \%snippet_options); + + if (compat(11)) { + autoscript($package, 'postrm', 'postrm-systemd-reload-only', \%snippet_options); + } } } } -- cgit v1.2.3