From: Frederic Crozat Date: Thu, 24 Jan 2013 17:06:00 +0000 (+0100) Subject: man: systemd.exec - explicit Environment assignment X-Git-Tag: v198~418 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=0ae9c92a933869d5695396d067aa555dacbbba08;p=elogind.git man: systemd.exec - explicit Environment assignment Hi all, while working on another bug, I discovered the "strange" way systemd is parsing Environment= in .service and thought it was worth documenting (because I don't expect people to find this syntax by themselves unless they read the parsing code ;) Be more verbose about using space in Environment field and not using value of other variables Fixes https://bugzilla.redhat.com/show_bug.cgi?id=840260 [zj: expand and reformat the example a bit] --- diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml index 8a22ac013..a0fca5996 100644 --- a/man/systemd.exec.xml +++ b/man/systemd.exec.xml @@ -286,9 +286,24 @@ empty string is assigned to this option the list of environment variables is reset, all prior - assignments have no effect. See + assignments have no effect. + Variable expansion is not performed + inside the strings, and $ has no special + meaning. + If you need to assign a value containing spaces + to a variable, use double quotes (") + for the assignment. + + Example: + Environment="VAR1=word1 word2" VAR2=word3 "VAR3=word 5 6" + gives three variables VAR1, + VAR2, VAR3. + + + + See environ7 - for details. + for details about environment variables. EnvironmentFile=