Bug 687893 - RFE: do not abort when 'EnvironmentFile' does not exist
Summary: RFE: do not abort when 'EnvironmentFile' does not exist
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lennart Poettering
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-15 16:45 UTC by Enrico Scholz
Modified: 2011-03-17 00:20 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-17 00:20:44 UTC
Type: ---


Attachments (Terms of Use)

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).


Note You need to log in before you can comment on or make changes to this bug.