systemd: service was disabled by user, what should package's postinst do?
Andreas Hasenack
andreas at canonical.com
Fri Aug 25 18:28:07 UTC 2017
Hi,
I have a bug[1] on xenial where the user installed freeradius,
freeradius-ldap and then disabled the service:
systemctl stop freeradius.service
systemctl disable freeradius.service
When the freeradius packages are upgraded, freeradius-ldap's postinst fails
to force-reload the service, because it's not running:
freeradius.service is not active, cannot reload.
invoke-rc.d: initscript freeradius, action "force-reload" failed.
dpkg: error processing package freeradius-ldap (--configure):
In fact, even freeradius' postinst fails to start the service, but since
its start invocation ends with "|| true", the error is swallowed. But not
in the force-reload case:
freeradius.postinst:
invoke-rc.d freeradius $action || true
freeradius-ldap.postinst:
invoke-rc.d freeradius force-reload
A trivial workaround would be to add "|| true" to the force-reload line, of
course. But even the one around "start" feels bad, because it could mask
real errors.
What should be done here, from a policy perspective? Is there a better
pattern out there for this scenario already in some package, or even a
debhelper helper?
Thanks
1. https://bugs.launchpad.net/ubuntu/+source/freeradius/+bug/1712817
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20170825/09208a4c/attachment.html>
More information about the Ubuntu-devel-discuss
mailing list