diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2022-10-17 08:25:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-17 08:25:25 -0400 |
commit | f4a4918cc9aef526cb02eec1e3629c148c2af06b (patch) | |
tree | 3ba8df8c6165ddff9cb706ff6b8c31c5b96e854d /.github | |
parent | df38c0c2c4336d2d6fdac471fc0f2f6c3db6531c (diff) |
Further improvements to the new service installation code. (#13774)
* Improve OpenRC detection.
- Check for rc-update command, without that we don’t work so it’s ‘not
OpenRC’.
- Sort checks so that less expensive ones run first.
- If we see `/etc/init.d/local` and it’s got a shebang line with
`openrc-run`, then assume we’re dealing with OpenRC. This file gets
installed by default as part of OpenRC itself.
* Fix runit detection.
- `/lib/rc/sv.d` is only used on some runit systems (notably Artix), not
all, so don’t bail if we can’t find it.
- Check not just for a `runit` command, but also `runsvdir`.
* Add support for systemd in WSL.
THis just involves running the normal systemd check if we detected WSL,
and updating the service manager type appropriately.
* Fix tmpdir handling for service installation.
* Fix invocation of service install script.
* Add fallback to detected but not running service managers.
Currently supported for systemd and OpenRC. If no other service manager
is detected, but we detected that either systemd or OpenRC is present
but not running, fall back to them instead of outright failing.
This does not allow starting/stopping the agent using the service manager,
but _does_ happen to work for installing the service properly on an
offline system.
* Fix service-type fallback handling.
If we see systemd, even if it not booted into it, we should not install
init.d or LSB init scripts.
* Fix recursion bug in initd install type checking.
* Skip initd if OpenRC is found.
Just like systemd, any OpenRC on the system automatically means that
it’s _not_ a classic init.d setup.
* Fall back to init.d in WSL in some cases.
If there is no _usable_ systemd, and the service manager otherwise looks
like an init.d setup, fall back to an init.d setup.
* Support LSB style init scripts in WSL as well.
Also consolidate and update the error message that gets printed when
running under WSL.
* Fix typo in LSB init script handling code.
* Fix command handling for LSB and initd service management.
Instead of using `service`, just run the init scripts directly. This way
we avoid any bugs in `service` that would cause it to pretend that
systemd is in use even though it isn’t.
* Fix botched partial commit.
* Restructure service type detection to not rely on return codes.
* Added option to display service type detection results.
This should simplify debugging.
Diffstat (limited to '.github')
0 files changed, 0 insertions, 0 deletions