after updating 13.3 -> 14.1, root shell sh never reads ~/.profile nor ~/.shrc

Hi there,

I never managed to let root sh shell read ~/.shrc or ~/.profile after updating to 14.1 am I missing something ?

Thanks
 
richardtoohey2, yes i know that, I'm ok with that, my issue is that the SH shell never reads its startup configs. So basically whatever I put in
/root/.shrc or /root/.profile stays completely ignored.
 
Which shell you are using? echo $SHELL

sh(1)

A login shell first reads commands
from the files /etc/profile and then .profile in a user's home direc-
tory, if they exist. If the environment variable ENV is set on entry
to a shell, or is set in the .profile of a login shell, the shell then
subjects its value to parameter expansion and arithmetic expansion and
reads commands from the named file. Therefore, a user should place
commands that are to be executed only at login time in the .profile
file, and commands that are executed for every shell inside the ENV
file. The user can set the ENV variable to some file by placing the
following line in the file .profile in the home directory, substituting
for .shrc the filename desired:

ENV=$HOME/.shrc; export ENV
 
hm ... ok, I will say that one more time. It is "sh", the shell is /bin/sh. The shell for root user is set to /bin/sh.

# echo $SHELL
/bin/sh
# cat /etc/passwd | grep root
root:*:0:0:Charlie &:/root:/bin/sh



# cat ~/.profile
#
HOME=/root
export HOME
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bin
export PATH
TERM=${TERM:-xterm}
export TERM
PAGER=less
export PAGER

# set ENV to a file invoked each time sh is started for interactive use.
ENV=$HOME/.shrc; export ENV

# Query terminal size; useful for serial lines.
if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi

# Uncomment to display a random cookie on each login.
# if [ -x /usr/bin/fortune ] ; then /usr/bin/fortune -s ; fi


Notice that ENV is never set, nor other settings in ~/.profile or ~/.shrc

# echo $ENV

# pwd
/root

# readlink -f ~
/root
 
Back
Top