On Friday, June 26, 2020 12:07:46 PM CEST Ian McInerney wrote:
On Fri, Jun 26, 2020 at 10:49 AM Kamil Dudka
<kdudka(a)redhat.com> wrote:
> On Thursday, June 25, 2020 11:44:06 PM CEST Ian McInerney wrote:
> > On Thu, Jun 25, 2020 at 9:58 PM Kamil Dudka <kdudka(a)redhat.com> wrote:
> > > ...snip...
> > >
> > > Gentoo Linux uses the /etc/env.d tree to globally set environment
>
> > > variables:
>
https://devmanual.gentoo.org/tasks-reference/environment/index.html
>
> > > It worked there long time before systemd was invented. But clearing
>
> this
>
> > > up in Fedora would ask for a separate system-wide change I guess...
> > >
> > > Kamil
> >
> > Isn't /etc/profile.d more inline with the FHS though?
>
> Could you please provide any reference?
As I mentioned, the FHS calls out the "profile" file in /etc as being the
"Systemwide initialization file for sh shell logins" [1].
/etc/profile may in general contain arbitrary shell code that conditionally
sources other configuration files etc. whereas /etc/env.d on Gentoo is used
solely to initialize environment variables.
While not in the
FHS, it is custom to append ".d" to directories containing multiple
configuration files to parse (as you have even suggested with env.d).
I did not suggest it for Fedora really. I just mentioned that the problem
that _this_ change proposal is facing was already solved in another distro
10+ years ago.
That
is why I said it would be /more inline/ with the FHS (I never said it was
in the FHS currently), since it would then gather the files used by the
"profile" script into the directory "profile.d".
That is what you say. But the specification itself does not say it at all.
Kamil
> The FHS calls out
>
> > /etc/profile as being the "systemwide initialization file for sh shell
> > logins," so the profile.d directory would be the natural extension to
>
> that.
>
> > I don't see a mention of an env or evn.d in the FHS at all.
>
> I see no mention of profile.d in FHS 3.0 either.
But there is no mention of an "env" file that is a systemwide environment
file either. So where does the initial "env" name fit into the FHS better
than the "profile" name?
-Ian
[1]
https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#etcHostspecificSys
temConfiguration