Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Sysinst default root login shell



On 04/11/2012 02:32 AM, David Holland wrote:
> On Wed, Apr 11, 2012 at 09:36:25AM +0200, Johnny Billquist wrote:
>  > >It may have never occured to you if you have grown with csh in time
>  > >when it did have features absent elsewhere. These days the situation
>  > >is reverse. csh is neither more capable nor more useful. It is not
>  > >merely different either. It is alien. User reaction to csh is
>  > >definite, they try to change it, and if the latter is not possible
>  > >the first command they type after login is this:
>  > >
>  > >bash
> 
> I still don't understand why anyone wants to specifically run bash.

[ORTHOGONAL TO THE TOPIC AT HAND -- DISMISS AT YOUR LEISURE. :)]

I was a die-hard csh user, until I ran into 'dsh' (the successor to 'csh'
at the college I attended).  It incorporated such things as rudimentary
tenex-style completions on commands, paths and variables, as well as
kmem-ldav parsing [special permissions required, of course] and in-prompt
escapes [such as current working directory, ldav, exit status of last
command].

When the original maintainers left, I inherited the project.  I almost
had command-line editing in, when I discovered tcsh and subsequently
shelved dsh in 1992.

Not long after that, I started getting tired of typing 'sh' every time
I wanted to test a shell code snippet.  Having used (and having been
asked to implement NIS calls in an archaic version of) ksh and not being
thrilled with its UI syntax [i.e. having to explicitly type 'fg' instead
of '%', it was visibly slower than csh, it didn't support {} expansion,
etc.], I wanted an alternative which would work to least-common-denominator
bourne shell specs.  Well, well -- look, there's BASH.  Can I put the same
stuff in BASH's prompt that I can in tcsh?  Why, YES, I CAN -- and MORE!
[insert wild month-long party of prompt sequence overload followed by
 PS1=": \h;" PS2=':; ' (think cut-and-paste :)].  Couple that with the
fact that the history in-line syntax matches csh, it supports {} notation
from csh AND does all the sh stuff too, it wins for me.

Out with tcsh, in with bash.  Keep in mind that, at that point in time, I'm
using a lot of UNIX systems, the most favourite of which is, by far, NetBSD,
even to this day.

I conditionally exec 'bash -l' as root (dependent upon whether or not it
exists).  If not, no big deal, I get 'csh'.  If I need 'sh' I know where
to find it and how to use it, and I try VERY hard not to have to write
bash scripts [but there is some handy stuff in there].

But 'cd /usr/src/pkg/shells/bash; make && make install' is pretty much
routine for a new system.

>  > So I guess you are constantly logged in to root, and do all your
>  > work there. Furthermore, you indiscriminately copy-paste complex
>  > shell scripts to your prompt, instead of having them in a file.
> 
> The behavior/interface of your root environment should match the
> behavior/interface of your normal environment as much as possible, to
> reduce the chance of making expensive mistakes.

That is a wholly different discussion.  I'm ALWAYS root in production/qa/etc.
The only time I am "me" is on my desktop.  [no centralised user base -- that
becomes a single point of failure which is ill afforded in production use.]


Home | Main Index | Thread Index | Old Index