In the /usr/local/sbin/opnsense-shell script that is used as the shell for the root user, the shell when selecting menu entry 8 is hard-coded to /bin/csh.
I would like to use bash (/usr/local/bin/bash) instead.
Can you please point me to the correct repo for this script so that I can submit a PR? I am thinking of reading a file (e.g. /etc/opnsense-shell) and in case the file exists and has a CMD_SHELL var, it will be used. Otherwise the current default is used. We can discuss the specifics in the PR.
What do you think?
If at all, why not create a setting that is stored in config.xml and can be switched between bash, sh, tcsh and others?
Yes, this is a very nice idea. However, I am great with backend and scripts, but suck at anything with UI and/or frontend.
To answer your question: I don't know how to do that.
How about adding to root's .cshrc something like e.g.
test -x /usr/local/bin/bash && exec /usr/local/bin/bash -l