Bug 90283 - Please add an option to use a shell to ExecStart
Summary: Please add an option to use a shell to ExecStart
Status: RESOLVED WONTFIX
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: low enhancement
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-02 14:54 UTC by Marc Haber
Modified: 2015-05-03 14:28 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.