[systemd-devel] Query regarding "EnvironmentFile"

Jóhann B. Guðmundsson johannbg at gmail.com
Mon Dec 21 08:30:25 PST 2015



On 12/21/2015 04:02 PM, Michael Biebl wrote:
> 2015-12-21 17:00 GMT+01:00 Jóhann B. Guðmundsson <johannbg at gmail.com>:
>> No what's obvious is it does not add any value not et all
> Well, I can reiterate the points, but I suggest you just read this thread again.
>
> and not all
>> daemons and service support additional environmental options added to them
>> et all so adding an empty environmental line just for the sake of adding it
>> makes even less sense,
> Obviously, if a daemon doesn't support command line (or env) args, you
> would not add a $OPTS.
>
>
>

It's an added work to add the environmental line to begin with and it's 
an equal amount of work for administrators to change the environmental 
line or the Exec= line(s) so the benefit is none
( note that I'm referring to systemd being the only initsystem ).

With environmental files administrators will have to keep tabs on two 
files ( the unit file along with the associated environmental file ) as 
well as their location ( due to distributions locating those files on 
different places ) and upstream would have to support multiple 
distribution specific unit as a results of that or downstream packagers 
carry an additional patch which adds their distribution location to the 
upstream unit file.

In a distribution that does or has to support multiple init systems 
things look quite differently because there the component has to be 
cross compatible with all the shipped/supported init system so you have 
basically no other option but to include an environmental file reference 
in the unit as well as specifying it in any other init system startup 
script and have administrators make their changes there so those changes 
can be retained ( on updates/upgrades ) regardless of which init system 
is or was in use.

In Fedora the plan was to obsolete them altogether since those lines and 
files did not add any benefits since systemd got introduced and 
implemented as the only init system ( this became very clear in in F15 ) .

JBG


More information about the systemd-devel mailing list