SUMMARY: Using other than Bourne shell for root on Solaris 10
2007-12-25 5:55:00
Thank you to all who replied.
The global consensus seems to be that /sbin/sh is still statically
linked in Solaris 10, though some people suggested the contrary.
Which means that there would still be trouble if we had to boot in
single user mode or had to boot from CD for system recovery and/or /usr
was not accessible.
So, the safest way is to just type "ksh" or "bash" at the interactive
shell, or export SHELL and do an "exec ksh" or an "exec bash" in the
.profile of root.
John Julian suggested to check for the runlevel in the .profile, which
seems the safest solution for me.
RunLevel=`/bin/who -r | awk '{print $3}'`
if [ $RunLevel -eq 3 ] && [ -x /bin/ksh ]
then
if [ ! "$DT" ]
then
SHELL=/bin/ksh
export SHELL
exec /bin/ksh
else
SHELL=/bin/ksh
export SHELL
fi
fi
Rami
Comments
Got something to say?
You must be logged in to post a comment.

