InitSystem: better systemd version detection

This commit is contained in:
李通洲
2024-05-30 08:45:14 +08:00
parent 7c1b6c6a10
commit 1863bde916
+1 -1
View File
@@ -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)