Skip to content

Commit 1863bde

Browse files
committed
InitSystem: better systemd version detection
1 parent 7c1b6c6 commit 1863bde

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/detection/initsystem/initsystem_linux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const char* ffDetectInitSystem(FFInitSystemResult* result)
2020
if (ffStrbufEqualS(&result->name, "systemd"))
2121
{
2222
if (ffProcessAppendStdOut(&result->version, (char* const[]) {
23-
result->exe.chars, // use exe path in case users have another systemd installed
23+
ffStrbufEndsWithS(&result->exe, "/systemd") ? result->exe.chars : "systemctl", // use exe path in case users have another systemd installed
2424
"--version",
2525
NULL,
2626
}) == NULL && result->version.length)

0 commit comments

Comments
 (0)