mirror of
https://github.com/microsoft/WSL.git
synced 2025-12-10 00:44:55 -06:00
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:
parent
dedf36169d
commit
e391e7854a
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user