Hi folks,
i love bash and use it like my default shell if present; i use it in openwrt too (actually working on an HA cluster composed by 2 raspberry 3B+). After installed bash on my system i pushed my custom .bashrc in $HOME (/root) and i noticed that it's not evaluated.
I suppose that these are the steps after logon with ssh:
/etc/profile(if not failsafe eval:/etc/profile.d/*.sh)- in case of bash package installed ->
/etc/profile.d/sys_bashrc.sh /etc/profile.d/sys_bashrc.sh-> if the shell is bash then ->/etc/bash.bashrc(common system bash conf)- if interactive session ->
/etc/shinit /etc/shinitevaluation (some alias, customizations and rc for ksh)
My proposal is to add this line at the end of /etc/shinit:
[ -z "$BASH" -o \! -s "$HOME/.bashrc" ] || . "$HOME/.bashrc"
here: https://github.com/openwrt/openwrt/blob/main/package/base-files/files/etc/shinit
Of course just successfully tested on my [OpenWrt 24.10.0 (r28427-6df0e3d02a)] env.
Ty