Richard Elling wrote:
> minor corrections below...
> Robert Neville wrote:
> > On 8/31/07, Roland Mainz <roland.mainz at nrubsig.org> wrote:
[snip]
> > Try this:
> >
> > Q: Why isn't bash the default shell?
> > A1: Solaris uses the Bourne shell as default system shell, /bin/sh, to
> 
> A1: Solaris uses the Bourne shell as default system (root user) shell, 
> /bin/sh, to

Erm, IMO the discussion needs to be split into three items (the term
"default shell" is IMO "fuzzy" (or vague) as everyone uses it with
different meaning):
1. The "default system shell", e.g. /sbin/sh and /usr/bin/sh (which is a
soft-link to /sbin/sh (and /bin is a soft-link to /usr/bin, making
/bin/sh identical to /usr/bin/sh))

2. "root"'s login shell

3. Normal user login shell

Notes:
- [2] and [3] are basically identical except that the "root" account
always exists with "/sbin/sh" as preconfigured default (and the owners
of these accounts are usually picky about their shell and are quite busy
in the persecution of heretics). AFAIK since at least Solaris 10 the
shell for user "root" can be any shell without problems (e.g. if the
binary is missing or unavailable /sbin/sh is used instead), e.g. putting
a better default for [2]+[3] shouldn't be a problem (my recommendation
would be either "bash" or "ksh93" for single-byte locales and "ksh93"
for multibyte locales (e.g. *.UTF-8, zh_CN.GB18030, ja_JP.PCK etc.)).

- [1] is tricky for several reasons. My _STRONG_ preference would be to
declare /sbin/sh+/usr/bin/sh to be a "POSIX shell" (similar to what the
various Linux distributions are slowly moving to, e.g. many of them run
"bash" in POSIX mode when the shell is invoked as /bin/sh).  I am
intentionally not saying "ksh93" or "bash" since the term "POSIX shell"
includes both "ksh93" and a fixed/modified "bash" (= "modified" means
"kill POSIX violations") as possible options (that way we avoid any
version hell in the forseeable future, e.g. putting bash version 3 to
/usr/bin/sh+/sbin/sh would put us in a "version hell" if bash version 4
(as someone else pointed out in a different thread) comes out (likewise
we would have an "escape path" if we put "ksh93" into /sbin/sh's place
and need to replace it in 30 years (which means: ANY decision about the
future of /sbin/sh+/usr/bin/sh should think about what may happen in the
next 30 years!!!)).
Anything which needs features beyond the POSIX shell standard should use
/usr/bin/ksh93 or /usr/bin/bash)).

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

Reply via email to