Skip to content
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

Service argument enhancements #394

Merged
merged 3 commits into from
Oct 18, 2024

Conversation

q66
Copy link
Contributor

@q66 q66 commented Oct 13, 2024

This changes 3 things:

  1. The meta-commands now resolve the service argument. This is useful to set different fields depending on the argument value (by including separate per-arg-value file)
  2. The env-file path itself performs minimal expansion (so you can include different env-files depending on the value of the argument)
  3. Make it possible to have a service that only optionally takes an argument by using the substitution syntax that takes default values instead of always erroring. The syntaxes without a value will still error.

q66 added 3 commits October 13, 2024 22:54
This is especially useful with @include-opt to conditionally
use different fields depending on parameter value.
We want to be able to in some cases substitute a default value
for an argument, e.g. "dhcpcd" without an argument should
manage all ifaces, while with an argument it should manage
the specific iface. For basic syntax without replacements,
leave it as error when it's missing.
@mobin-2008 mobin-2008 added Enhancement/New Feature Improving things or introduce new feature A-Importance: Normal C-dinit-service Things about dinit-service labels Oct 14, 2024
Copy link
Owner

@davmac314 davmac314 left a comment

Choose a reason for hiding this comment

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

Thanks, looks fine

@davmac314 davmac314 merged commit 927bec0 into davmac314:master Oct 18, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Importance: Normal C-dinit-service Things about dinit-service Enhancement/New Feature Improving things or introduce new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants