[systemd-devel] macros in systemd unit files question

Kay Sievers kay at vrfy.org
Wed Jul 31 17:20:15 PDT 2013


On Wed, Jul 31, 2013 at 2:14 PM, lux-integ <lux-integ at btconnect.com> wrote:
>
> I am trying to learn systemD. I   scaned through some of the man pages.  I am
> here asking if  systemD unit file synthesis  can  be made to support macros;
> for example of the following type:-
>
> #--------------
> IF mountpoint exists
> /bin/mount /dev/something  $mountpoint
> ELSE
> /bin/mount /dev/something somewherelse
> ENDiF
> #--------------

We don't want to support any language-like flow control in unit files.
It's actually much more of a feature than a limitation that unit files
are *descriptive* and not little programs that run. Things should not
be evaluated at runtime beyond the simple conditions we support.

So no, we don't want anything like macros, pre-processing, or language
constructs in unit files.

Kay


More information about the systemd-devel mailing list