Look up systemctl from $PATH for user session checks (#13157)

This is already done in other instances where init calls systemctl, and we rely on init to find systemctl in PATH on NixOS, as we don't (really) have a /usr.
This commit is contained in:
K900 2025-06-21 00:09:50 +03:00 committed by GitHub
parent dedf36169d
commit e391e7854a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2704,7 +2704,7 @@ try
if (Config.BootInitTimeout > 0)
{
auto cmd = std::format("/usr/bin/systemctl is-active user@{}.service", Uid);
auto cmd = std::format("systemctl is-active user@{}.service", Uid);
try
{
return wsl::shared::retry::RetryWithTimeout<bool>(
@ -2739,4 +2739,4 @@ catch (...)
{
LOG_CAUGHT_EXCEPTION();
return false;
}
}