Closed iacore closed 6 months ago
The correct behaviour is what is documented (in the dinit-service manpage). The parsing won't ever be POSIX shell compatible, that's definitely a non-goal.
Your example should work if written with double quotes, as:
command = /bin/sh -c "sleep 1 && echo 1"
Thanks for the clarification!
This part is still unclear to me.
• For settings which specify a command with arguments, the value is interpreted as a series of tokens separated by white space, rather than a single string of characters. • Double quotes (") can be used around all or part of a property value, to prevent whitespace collapse and prevent interpretation of other special characters (such as "#") inside the quotes. The quote characters are not considered part of the property value. White space appearing inside quotes does not act as a delimiter for tokens.
I think it means that normally, there's <key> = <token>
on one line, but for commands, it's <key> = <token> <token> <token> <token> ...
.
Maybe we should swap the order of the two bullet points?
Describe the bug & Reproduction
Create a file
dinit.d/a
with this content:Then try to start the service. It fails.
Expected behavior Not sure what is the correct behavior here. Maybe POSIX-compatible shell parsing?
Additional context Add any other context about the problem here.