Bug 687893

Summary: RFE: do not abort when 'EnvironmentFile' does not exist
Product: [Fedora] Fedora Reporter: Enrico Scholz <rh-bugzilla>
Component: systemdAssignee: Lennart Poettering <lpoetter>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: johannbg, lpoetter, metherid, mschmidt, notting, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-17 00:20:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Enrico Scholz 2011-03-15 16:45:13 UTC
Description of problem:

Please do not abort when the specified EnvironmentFile does not exist.  E.g. 'tor' has

| Environment = TOR_SHUTDOWN_WAIT=30
| Environment = TOR_NOFILE=4096
| EnvironmentFile = /etc/sysconfig/tor

which tries to set default values of TOR_SHUTDOWN_WAIT and TOR_NOFILE, and allows to override them optionally in /etc/sysconfig/tor.

Bug #684094 indicates, that a missing EnvironmentFile is fatal.

E.g. adding a '-' prefix (--> 'EnvironmentFile = -/etc/sysconfig/tor'), would be a way to mark such optional files.

Comment 1 Lennart Poettering 2011-03-17 00:20:44 UTC
Turns out this is actually support since a while. Use EnvironmentFile=-/foo/bar to import an env file without triggering any warnings.

This is also documented in systemd.exec(5).