csh to sh migration for root in RELENG_14

From: Garrett Wollman <wollman_at_bimajority.org>
Date: Fri, 17 Nov 2023 19:41:41 UTC
<<On Fri, 17 Nov 2023 13:40:44 -0500, mike tancsa <mike@sentex.net> said:

> I am trying to bring my environment along from previous versions where 
> csh was the default shell and now trying to get used to sh. In the past 
> things like

> sudo su

> would pick up my settings in /root/.cshrc automatically. However, with 
> sh I have to do

> sudo su -l root

> Is there a way to configure it so I dont need the -l as part of the su 
> to get the same behavior ?

See sh(1) section "Invocation", which describes how /bin/sh reads its
initialization files, and in particular, that (as POSIX specifies)
interactive non-login shells do not read any startup files unless the
environment variable `ENV` is set.  This is stupid but required by the
standard.

I would recommend changing root's shell to something that better suits
your needs: either change it back to csh, or install the appropriate
package and set it to bash or zsh, both of which read startup files
for all interactive shells, not just login shells.

-GAWollman