Why isn't /etc/profile.d/ loaded for a non-login shell?
Looking into sourcing a script on shell start between different distributions seemed to be a tricky business. That is putting a shell script in /etc/profile.d/ and have it sourced on shell start.
We've found:
Distribution | Bash(login) | Bash (non-login) | Zsh (login) | Zsh (non-login) |
---|---|---|---|---|
Debian | Yes | No | No | No |
Ubuntu | Yes | No | No | No |
Fedora | Yes | Yes | Yes | Yes |
Alpine | Yes | No | Yes | No |
What's the reason for Alpine not sourcing /etc/profile.d/ when bash and zsh is not started as login shells? To me it seems as Fedora is doing the right thing here and none of the other distributions, but I admit that I might miss something here.