[systemd-devel] Accpetance of Environment Variables in Attributes
Ede Wolf
listac at nebelschwaden.de
Thu Jun 25 18:25:52 UTC 2020
Am 25.06.20 um 14:30 schrieb Lennart Poettering:
> Nah, unless you write a shell or templating language I doubt variable
> expansion is a good thing.
I am aware, that discussion here is futile, but this is contradictious,
because:
[Unit]
Description=test service
[Service]
User=%i
Type=oneshot
ExecStart=/bin/sh -c "echo helloWorld > /tmp/test.txt"
[Install]
WantedBy=multi-user.target
Does work, so %i works, $SOMETHING not. Different naming, different way
of invocation, I am aware of that, but in general it still the usage of
variables. And the likes of %H, %m or %v are some form of environment,
aren't they?
> If you want a shell, use a shell.
Given the dominance of systemd, this is only in parts realistic. This is
not meant to critisize systemd itself, just this rather bold statement.
As shown above, variables (specifiers, whatever you call them) are not
shell specific.
Anyway, thanks for answering.
More information about the systemd-devel
mailing list