[systemd-devel] Supporting ExecStartPre= and friends in `systemctl set-property` or `systemd-run -p`

Lennart Poettering lennart at poettering.net
Fri May 15 03:10:58 PDT 2015

On Fri, 15.05.15 13:03, Ivan Shapovalov (intelfx100 at gmail.com) wrote:

> > Hmm, what about this: use "--" as separator for multiple unit
> > definitions?
> > 
> > $ systemd-run --name=foo.service /bin/foo -- --name=bar.service -p
> >   Nice=80 /bin/bar -- -p Nice=20 --name=bazz.service /usr/bin/bazz
> > 
> > Alternatively, we could use ";" as separator, similar to 
> > /usr/bin/find
> > does it... But I think "--" is nicer...
> Hm. Actually, usage of *any* token as a command line separator makes it
> impossible to include that token *in* the command line. My original
> idea is even worse as it disallows ever giving "--aux-unit" switch to
> the client program. So I guess I retract that idea...
> What about the second one?

Well, I think this isn't too bad, we could devise a simple escaping
scheme to cover this. For example, if we use "--" as separator, then
we could tell people to escape this as "\--" (which on the shell would
become "\\--") if they actually want it included in the command

I much prefer a syntax like this over reading things from arbitrary
files I must say...


Lennart Poettering, Red Hat

More information about the systemd-devel mailing list