[systemd-devel] Query regarding "EnvironmentFile"

Reindl Harald h.reindl at thelounge.net
Thu Dec 10 02:41:53 PST 2015



Am 10.12.2015 um 11:15 schrieb Lennart Poettering:
> On Thu, 10.12.15 01:08, Reindl Harald (h.reindl at thelounge.net) wrote:
>
>>
>>
>> Am 09.12.2015 um 20:46 schrieb Lennart Poettering:
>>> I probably should never have added EnvironmentFile= in the first
>>> place. Packagers misunderstand that unit files are subject to admin
>>> configuration and should be treated as such, and that spliting out
>>> configuration of unit files into separate EnvironmentFiles= is a
>>> really non-sensical game of unnecessary indirection
>>
>> i strongly disagree
>>
>> it's the easiest way to not touch/copy the systemd-unit *and*
>> systemd-snippets for just adjust a simple variable - the point here is
>> simple
>
> There are very few things that are easier than "systemctl edit" or
> "systemctl edit --full"... Also, you have to do that anyway, if you
> want to make any changes about the service itself, such as setting a
> memory limit, or adding a dep.

but that few things are fine

>> copy units and/or add own snippets has easily two side effects
>>
>> * don't get well deserved updates for the units
>
> Sometimes this is precisely what you want, hence you have the choice
> between creating a drop-in ("systemctl edit") or copy/edit the full
> file ("systemctl edit --full").

and sometimes you just want something like
EnvironmentFile=-/etc/sysconfig/httpd

[root at testserver:~]$ cat /etc/sysconfig/httpd
OPTIONS="-D testserver"

to share the whole httpd config between multiple servers

>> * or snippets don't play well with later dist-versions of the unit
>>
>> a EnvironmentFile supported by the distributions unit is well better for
>> simple adoptions
>
> Nope, it's an ugly Redhatism... It defeats a good chunk of our
> toolset, include systemctl edit to change things, systemctl cat to see
> the current state or systemd-delta to diff the settings. Hence it
> really was a bad idea to add in the first place.

well, accept that people adopted that Redhatism long before systemd was 
even planned, working only with RHEL/CentOS/Fedora and hence are happy 
with it and don't need or want to use "systemctl edit" while they accept 
that you like it

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20151210/3322d3dc/attachment.sig>


More information about the systemd-devel mailing list