On 18/11/14 19:21, Eric Valette wrote: > I just mentioned that naively combining User=$TOTO or ${TOTO} TOTO being > defined in an default/package file parsed by EnvironmentFile= does not > seem to work as documented in man pages
To be clear, the environment variable substitution in systemd units' field values is not general: it only works in the fields where it is specifically implemented, which I think is only the ExecWhatever family of fields. That's why it's documented in the descriptions of those fields in systemd.service(5), and not in the general information about units, systemd.unit(5). I think the intention might be to avoid ever getting into recursive expansion. The %x specifiers (%u, etc.) are interpreted in rather more places than environment variables are. Parsing User=$TOTO as "the User is the value of the environment variable TOTO as given by Environment or EnvironmentFile" might be a reasonable feature request, but it is not currently an implemented feature. > systemd for servers systems may still have some way to go for converting > complex init scripts for firewall,openssh,VM's IMHO. If you do need the full power of shell script, you can always keep the LSB init script, or have a native systemd unit where the ExecWhatever lines execute shell scripts. S -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/546ba107.2010...@debian.org