Subject: Re: CVS commit: src
To: NetBSD-current Discussion List <current-users@netbsd.org>
From: David Maxwell <david@fundy.ca>
List: current-users
Date: 03/17/1999 18:20:56
On Wed, Mar 17, 1999 at 02:25:55AM -0500, Greg A. Woods wrote:
> [ On Tuesday, March 16, 1999 at 23:17:57 (-0400), David Maxwell wrote: ]
> > 1. Principle of least surprise
> This is about the only real argument for *not* changing root's default
> shell to /bin/sh.  But this is just for hysterical reasons....

I don't consider it hysterical. But I'm not arguing that, I want the
contradictory 'good reason' for changing it.

> > 2. Utilitarianism
> I use /bin/sh on almost all machines where there's no ksh (which was all
> NetBSD's that I didn't own up until NetBSD came standard with /bin/ksh).
> 
> The modern *BSD /bin/sh with proper history, command-line editing, and
> aliases, etc. is almost indistinguishable from ksh for every-day
> interactive use.

But those features aren't enabled in the default config. Out of the box,
csh is more friendly. I would think that the best goal in choosing which
shell to ship configured by default would be ease of use. Everyone would
have opinions on that too of course. tcsh would be mine. Also, the command
line editing in sh/ksh is more natural to people with an Emacs background.
Perhaps we can redirect this discussion to decide which goals we are trying
to meet with the shipped shell, then figure out which one meets them best.
 
> I haven't used csh as my login shell for about ten years now.  Proper
> history and command-line editing in proper shells has totally eliminated
> the only real advantage csh ever had for interactive use.

Isn't cursor-up for previous command more intuitive than ^A ?

> > 3. The single user /bin/sh argument
> I my mind that's the best argument *for* changing root's default shell
> to /bin/sh.  I think immediate consistency should always override
> hysterical consistency (eg. this point should override the first point).

I disagree. Following 'immediate consistency' could cause things to flip
back and forth as various changes are made in the system as a whole.
I'd rather see fewer things changed without good cause, rather than
things changed and then changed back and changed again and....

> >   likely because singleuser mode is meant for performing
> > low-level system maintainence. The system is running in a limited
> > fashion, and /bin/sh makes very few assumptions about what may be available.
> 
> No, I don't think that's got anything to do with it....

I think it has a lot to do with it. Every emergency repair instruction
list I've ever seen is written in sh format, that includes everything I've
seen for System X, BSD, Solaris 1/2, SCO...

sh is the most basic shell on the system (rc is a package.) and it seems
best suited for maintainence. I really don't want someone executing history
recall commands in single user mode. Hmm, I disklabeled the disk, and restored
the data onto it. Then I did checked the disk free space, then... then
he does a !d, and wipes the volume again because he really didn't do a df
before, etc. In single user mode, you're there to fix things that can't
be safely done in multi-user mode.

btw, why are we arguing about root's shell when the default install says
"Don't login as root, use su!"

seebs@plethora.net wrote:
>Does it really make any fewer than csh?

I haven't looked at the shell source in about ten years, so I can't say,
but it certainly makes for fewer ambiguities on the command line. csh
has limitations.

-- 
David Maxwell, david@vex.net|david@maxwell.net --> Mastery of UNIX, like
mastery of language, offers real freedom. The price of freedom is always dear,
but there's no substitute. Personally, I'd rather pay for my freedom than live
in a bitmapped, pop-up-happy dungeon like NT. - Thomas Scoville