Running commands with "su -l" does not cause the shell to run the login scripts (.profile or .bash_profile). Tested with both /bin/sh and /bin/bash as the user shell (in /etc/passwd).
$configure --enable-board=intel-x86-64 --enable-rootfs=glibc_std --enable-kernel=standard $ make -C build bash.patch Apply patch for LIN6-9533 to ensure bash runs login scripts. $ make -C build bash $ make fs $ make start-target Log in as root # echo "echo profile" > .profile # echo "echo bash_profile" > .bash_profile # echo "echo bashrc" > .bashrc Test normal login (log out first) and ".profile" is displayed when logging in as expected. Use "chsh" to change the user shell to "/bin/bash" and re-test logging in and you get ".bash_profile" displayed as expected. Run bash as non-login and "bashrc" is displayed as expected. Now test su: # su root -l bash -c "echo success" success # Note that neither bash_profile nor profile is displayed as would be expected (depending on user's shell). Running the test case for LIN6-9533 does work though: # exec -l bash -c "echo success; sleep 100" bash_profile success #