KEMBAR78
Look up systemctl from $PATH for user session checks by K900 · Pull Request #13157 · microsoft/WSL · GitHub
Skip to content

Conversation

@K900
Copy link
Contributor

@K900 K900 commented Jun 20, 2025

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.

Summary of the Pull Request

PR Checklist

  • Closes: Link to issue #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

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 K900 requested a review from a team as a code owner June 20, 2025 17:53
@benhillis
Copy link
Member

This seems reasonable to me.

Copy link
Collaborator

@OneBlue OneBlue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense. We call systemctl by $PATH in other places so we should do the same here.

@K900: Do you know distributions that put systemctl outside of /usr/bin ?

@K900
Copy link
Contributor Author

K900 commented Jun 20, 2025

NixOS does, and I assume GuixSD too.

@benhillis
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@benhillis benhillis merged commit e391e78 into microsoft:master Jun 20, 2025
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants