[systemd-devel] macros in systemd unit files question

Tom Gundersen teg at jklm.no
Wed Jul 31 05:26:18 PDT 2013


Hi,

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
> #--------------

Unit files are declarative by design, so the answer to this will
almost certainly be "no". If you really need a proper programming
language, then you'd be better off using a script and pointing
ExecStart to that.

-t


More information about the systemd-devel mailing list