Summary: | expand unset environment variables to nothing | ||
---|---|---|---|
Product: | systemd | Reporter: | Dave Reisner <d> |
Component: | general | Assignee: | Lennart Poettering <lennart> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | marti |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Strips quotes in variables read from EnvironmentFile |
Description
Dave Reisner
2010-09-06 15:04:59 UTC
I think I may be misunderstanding the way the ExecStart command is being handled. Is there no environment variable expansion at all? There is env var expansion, in two syntaxes: $foo as a single word will be replaced by the contents of $foo split up at whitespaces as several arguments. And ${foo} may appear as part of another word (or seperately) and will be replaced by the contents for $foo, but not split up. Note however that env var expansion is (currently) not supported on the binary path itself, only on its contents. Created attachment 38523 [details] [review] Strips quotes in variables read from EnvironmentFile Ok, I've narrowed this down to an issue with quoting. In the EnvironmentFile in question, I have: SSHD_ARGS="" ...which is interpreted literally as "". I've attached a patch which fixes this, but it takes a sledgehammer approach to a 10 cent nail. the unquote() function in util.c is probably a better choice, but it doesn't appear to work as I'd like it to (I'm unsure of the behavior of strdup when its passed an empty string). This is fixed in v16. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.