On Thursday, June 25, 2020 11:44:06 PM CEST Ian McInerney wrote:
> On Thu, Jun 25, 2020 at 9:58 PM Kamil Dudka <firstname.lastname@example.org> 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" . 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). 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".
> 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?