diff --git a/src/detection/initsystem/initsystem_linux.c b/src/detection/initsystem/initsystem_linux.c index 0a93b0ca7..b518db21d 100644 --- a/src/detection/initsystem/initsystem_linux.c +++ b/src/detection/initsystem/initsystem_linux.c @@ -20,7 +20,7 @@ const char* ffDetectInitSystem(FFInitSystemResult* result) if (ffStrbufEqualS(&result->name, "systemd")) { if (ffProcessAppendStdOut(&result->version, (char* const[]) { - result->exe.chars, // use exe path in case users have another systemd installed + ffStrbufEndsWithS(&result->exe, "/systemd") ? result->exe.chars : "systemctl", // use exe path in case users have another systemd installed "--version", NULL, }) == NULL && result->version.length)