systemd: service was disabled by user, what should package's postinst do?

Andreas Hasenack andreas at
Fri Aug 25 18:28:07 UTC 2017


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:

         invoke-rc.d freeradius $action || true

          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?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Ubuntu-devel-discuss mailing list