Bug 1193453
| Summary: | "systemctl show" doesn't show environment variables defined when EnvironmentFile is used | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jack <damnedyankee> |
| Component: | systemd | Assignee: | systemd-maint |
| Status: | CLOSED CANTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 21 | CC: | johannbg, jsynacek, lnykryn, msekleta, s, systemd-maint, vpavlin, zbyszek |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-03-14 16:05:16 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Jack
2015-02-17 11:29:28 UTC
Yes, Environment only refers to the configuration directive. Variables set in EnvironmentFile are separate. A different question is whether systemd should show variables defined in EnvironmentFile Systemd does not show those because EnvironmentFile is actually read late — just before the process is executed. Variable substitution is actually done after a fork and the main systemd process cannot display them, because it does not know their values for some variables. So this is by design, and hard to change. As a partial workaround you can do something like tr '\0' '\n' < /proc/<pid-of-daemon>/environ This will show the environment of the process. |