-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Safe and readable ExecStart for systemd proposal #154123
Comments
this sounds like a very good idea. not sure about calling the marker attr |
I'm open to many bike shed colors. |
I think this might be a good idea. What I would like to avoid is a UI where we have Perhaps we should call ist startScripts and support defining a script (as text) and the prefix for that only. What is the gain of the args/argv separation other than it being a syscall thing that nobody should have to care about. |
It wouldn't be the only module that provides both a high-level(-ish) interface and a low level one. I agree that this phenomenon can cause confusion and I think the best means we currently have to mitigate this, is to migrate code and documentation to the new way, so the redundant low-level variation can be forgotten. Alternatively, our linters could warn when they see the token
The principles must be different for low-level and high-level interfaces. We should have both and prefer to use high-level when possible.
I'm not opposed to a different name, but I don't see how we can capture the distinction between I suppose we could have a cascade of interfaces to the unit file:
Convey that these aren't bash statements, let alone shell scripts. Script functionality could be added, to the submodule, as an alternative to |
how about this: systemd.services gains new attributes
the *Commands attrs are mutually exclusive with their corresponding script counterparts. |
It didn't occur to me that
This should use
I wish systemd had a more specific term for these lines, but "command" seems to it. "Exec" could be an alternative, but I feel that would just look weird, comparatively.
So, only nitpicking. These are some good decisions you've made. |
not sure how |
Oh, I confused the two. |
Describe the bug
ExecStart
is hard to read and write.script
is only suitable for a subset of use cases. (#135557, maybe other problems?)ExecStart
Expected behavior
enum
s instead of cryptic prefixes (or perhaps add abool
if a prefix can always be combined etc; haven't fully dissected those)It might look like this:
Maybe even s/args/argv. More explicit, but also cryptic if you don't know C.
Additional context
man systemd.service
(Exec* family of fields)man systemd.unit
(substitutions)Notify maintainers
@NixOS/systemd
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.The text was updated successfully, but these errors were encountered: