diff options
author | Niels Thykier <niels@thykier.net> | 2018-05-13 15:22:08 +0000 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2018-09-02 17:54:41 +0000 |
commit | 5d097054219ffb4efdeb946a4ffa59caeb15511c (patch) | |
tree | acb4e3e02e344ff3769a6a18f9d37b200dcc9239 | |
parent | 63af6d4bce2e056fea4af4e464ba066f0fbef60f (diff) | |
download | debhelper-5d097054219ffb4efdeb946a4ffa59caeb15511c.tar.gz |
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 <niels@thykier.net>
-rw-r--r-- | autoscripts/postrm-init | 7 | ||||
-rwxr-xr-x | 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); + } } } } |