Bug#805878: dh-systemd: dh_systemd_start --no-start --restart-after-upgrade causes the service to be started on install
Felipe Sateler
fsateler at debian.org
Wed Dec 14 21:57:13 GMT 2016
Hi,
On 9 October 2016 at 17:26, Felipe Sateler <fsateler at debian.org> wrote:
> Control: tags -1 patch
>
> On 23 November 2015 at 11:34, Felipe Sateler <fsateler at debian.org> wrote:
>> Package: dh-systemd
>> Version: 1.24
>> Severity: normal
>>
>> Current autoscript has:
>>
>> if [ -d /run/systemd/system ]; then
>> systemctl --system daemon-reload >/dev/null || true
>> if [ -n "$2" : ]; then
>> _dh_action=try-restart
>> else
>> _dh_action=start
>> fi
>> deb-systemd-invoke $_dh_action #UNITFILES# >/dev/null || true
>> fi
>>
>>
>> And this does not take into account that --no-start was passed. If it
>> was passed, then try-restart should always be used.
>
> This is more problematic now that restart-on-upgrade is default. The
> following patch fixes the issue:
Please find attached a patch rebased against current master.
Alternatively, you can fetch the branch `restartnorestart` from my
clone[1].
I have re-tested that this gives the desired result:
--restart-after-upgrade + --start => starts and restarts service.
--no-restart-after-upgrade + --start => always starts
--restart-after-upgrade + --no-start => only restarts
-- no-restart-after-upgrade + --no-start => nothing
[1] https://anonscm.debian.org/git/users/fsateler/debhelper.git
Please attach this so that this can be included in stretch.
--
Saludos,
Felipe Sateler
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-systemd_start-do-not-start-when-no-start-and-restart.patch
Type: text/x-patch
Size: 1497 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-systemd-maintainers/attachments/20161214/7c8ce225/attachment.bin>
More information about the Pkg-systemd-maintainers
mailing list