Skip to content

Add support for enabling OpenRC service on a specific runlevel #1397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: 3.x
Choose a base branch
from

Conversation

sengo4hd
Copy link

@sengo4hd sengo4hd commented Jul 12, 2025

  • Pull request is based on the default branch (3.x at this time)
  • Pull request includes tests for any new/updated operations/facts
  • Pull request includes documentation for any new/updated operations/facts
  • Tests pass (see scripts/dev-test.sh)
  • Type checking & code style passes (see scripts/dev-lint.sh)

Hello and thank you for your work on this project :)
I find the design to be very clear and well-thought, making it easy to engage with contributing.

I want to use pyinfra to enable a nftables service on the boot runlevel with OpenRC. I noticed that the openrc.service operation would always trigger a change on every run even though the service was never really enabled on this runlevel. This is because the change was always happening on the default runlevel, ignoring the configuration.

I would like to propose these changes:

  • A noop message for when a service is already enabled/disabled to help with troubleshooting.
  • Support for enabled/disabling services on a specific runlevel, as expected from the documentation.

I did not find it necessary to update the openrc.service documentation.
I also fixed a small typo in a link in the contributing documentation.

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.

1 participant