Open
Description
Output of the info page (if this is a bug)
N/A
Describe what happened:
- I updated
/usr/sbin/policy-rc.d
to exit with code101
always, which should cause services installed via APT to not start automatically. - I installed the
datadog-agent
package via APT. - The
datadog-agent
service was automatically enabled and started, but crashed because configuration was incomplete.
Describe what you expected:
I expected the datadog-agent
package to honour policy-rc.d
and not start the service
The postinst
hook should use deb-systemd-invoke
and debian-systemd-helper
from init-system-helpers
, rather than invoking systemctl
directly:
https://manpages.debian.org/testing/init-system-helpers/deb-systemd-helper.1p.en.html
https://manpages.ubuntu.com/manpages/focal/man1/deb-systemd-invoke.1p.html
Steps to reproduce the issue:
See above.
Additional environment details (Operating System, Cloud provider, etc):
Ubuntu 20.04 LTS, but this should be reproducible on any Debian-alike.