sosreport / sos

A unified tool for collecting system logs and other debug information
http://sos.rtfd.org
GNU General Public License v2.0
513 stars 541 forks source link

[systemd] systemd trigger #2013

Closed slashdd closed 4 years ago

slashdd commented 4 years ago

The systemd.py plugin should rely on the existence of /run/systemd/system directory which would be, IMHO, a more reliable trigger/verification to enable the plugin and that will also ensure a common standard regardless of the distribution flavor. (excluding the usual Packages verification already in place which lgtm)

My rationale behind /run/systemd/system usage: https://www.freedesktop.org/software/systemd/man/sd_booted.html https://github.com/systemd/systemd/blob/master/src/libsystemd/sd-daemon/sd-daemon.c#L598-L604

ddstreet commented 4 years ago

Agreed, the /lib/systemd/system vs. /usr/lib/systemd/system dirs vary between different distros; while the /run/systemd/system directory is created by systemd and should guarantee that systemd actually is managing the system.

BryanQuigley commented 4 years ago

Agreed, we actually have another check in the policy code that was changed to use it .. See 285873a (which did cause a regression, but that wouldn't impact this use case).

slashdd commented 4 years ago

@casual-lemon could you please submit a PR about it ?

TurboTurtle commented 4 years ago

Closed via e8b3804. Timing of the push with a GH outage prevented the auto close triggers from firing.