Please sign in to comment.
The current service_systemd.go implementation is falling back to use the sysvinit one (service_init.go) when the commands give an error exit code. This is wrong, because systemd should have either generated a service file for those sysvinit init scripts, or systemd itself or the admin might have disabled or masked those services, so falling back will give the wrong result. Because it will definitely not pay attention to those sysvinit services outside of its compat support anyway, so either systemctl knows about them, or for all practical purposes it does not matter at all. This affects at least any Debian system starting with stretch (9.x). We check for any older system and only fallback when using a legacy systemd. Of course if there is no need to have transparent goss definitions that should work on services provided by either sysvinit or systemd, then an option is to hardcode the systemd full service name as in <unit>.socket, <unit>.service, or similar, which means the sysvinit fallback will always fail, and we will then preserve the failure from systemd.
- Loading branch information...
Showing with 45 additions and 12 deletions.