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.
K900 committed
Jun 21, 2025 at 00:09 UTC
e391e7854afb0f6ea3fba3ee99dea0beaceab1fa
1 file changed
+2
-2
src/linux/init/config.cpp
+2
-2
@@ -2704,7 +2704,7 @@ try
2704
2705
if (Config.BootInitTimeout > 0)
2706
{
2707
- auto cmd = std::format("/usr/bin/systemctl is-active user@{}.service", Uid);
2707
+ auto cmd = std::format("systemctl is-active user@{}.service", Uid);
2708
try
2709
{
2710
return wsl::shared::retry::RetryWithTimeout<bool>(
@@ -2739,4 +2739,4 @@ catch (...)
2739
{
2740
LOG_CAUGHT_EXCEPTION();
2741
return false;
2742
-}
\ No newline at end of file
2742
+}