[debhelper-devel] Bug#836317: dh_systemd_start should stop the sevice on remove even if --no-start has been passed

Michael Biebl biebl at debian.org
Sun Oct 2 00:13:45 UTC 2016


On Thu, 01 Sep 2016 17:03:42 +0200 Laurent Bigonville <bigon at debian.org>
wrote:
> Package: debhelper
> Version: 9.20160814
> Severity: important
> File: /usr/bin/dh_systemd_start
> 
> Hi,
> 
> ATM, if --no-start is passed to dh_systemd_start, the service is never
> stopped even if the package is removed/purged.
> 
> IMHO, is should be stopped in that case, I would do something like:
> 
> -        if ($dh{R_FLAG} || $dh{RESTART_AFTER_UPGRADE}) {
> +        if ($dh{R_FLAG} || $dh{RESTART_AFTER_UPGRADE} || $dh{NO_START}) {
>                 # stop service only on remove
>                 $sd_autoscript->("prerm", "prerm-systemd-restart");
> -        } elsif (!$dh{NO_START}) {
> +        } else {
>                 # always stop service
>                 $sd_autoscript->("prerm", "prerm-systemd");
>         }
> 
> What do you think?

I think this makes sense but we should make sure that this is consistent
with dh_installinit/sysv
Have you checked what dh_installinit does in this case?


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/debhelper-devel/attachments/20161002/87895593/attachment-0003.sig>


More information about the debhelper-devel mailing list