Bug 90283

Summary: Please add an option to use a shell to ExecStart
Product: systemd Reporter: Marc Haber <mh+freedesktop-bugzilla>
Component: generalAssignee: systemd-bugs
Status: RESOLVED WONTFIX QA Contact: systemd-bugs
Severity: enhancement    
Priority: low    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Marc Haber 2015-05-02 14:54:09 UTC
Hi,

please consider adding a ExecShell=yes|no option, defaulting to no, which calls the command line given as ExecStart and other options via a shell. This would make, for example, units created from crontabs much easier to read and write, saving a quoting level and seriously reducing quote hell.

Greetings
Marc
Comment 1 Lennart Poettering 2015-05-03 14:28:32 UTC
I am firmly against this. The idea with systemd units is really *not* to be turing complete programs, but purely declarative, hence integrating shell expressions natively is really against their whole idea. I know that Upstart allowed integrated things with shell, but it's a design decision of systemd not to do this.

That said, you can already do what you want, by encoding shell programs in the /bin/sh -c command lines:

ExecStart=/bin/sh -c "...."

Sorry, but I am strongly against adding more support for shell than this.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.