Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jan 2019 08:47:13 -0800 (PST)
From:      "Rodney W. Grimes" <freebsd-rwg@pdx.rh.CN85.dnsmgr.net>
To:        Peter Jeremy <peter@rulingia.com>
Cc:        Baptiste Daroussin <bapt@freebsd.org>, arch@freebsd.org
Subject:   Re: Importing mksh in base
Message-ID:  <201901261647.x0QGlDeG094336@pdx.rh.CN85.dnsmgr.net>
In-Reply-To: <20190126123513.GA27717@server.rulingia.com>

next in thread | previous in thread | raw e-mail | index | archive | help
-- Start of PGP signed section.
> On 2019-Jan-25 17:57:51 +0100, Baptiste Daroussin <bapt@FreeBSD.org> wrote:
> >I would like to import mksh in base, https://www.mirbsd.org/mksh.htm
> 
> What are mksh's advantages/disadvantages compared with the existing /bin/sh.
> Personally, I don't see the point of a 3rd shell in the base system.
> 
> >And make it the default root shell (not necessary in one step)
> 
> Whilst I prefer /bin/sh to /bin/csh as root's shell, changing the
> default would be a significant POLA violation.  My suggestion (as has
> been made elsewhere) is to make the choice of root shell an install
> option.

As voiced elsewhere I'll expand on the "install option" situation.
In my view I agree with the other poster on that issue that we
should try to keep install options to a minimum as it creates an
installer that is too interactive.   However what we can do is
to educate the user that there are many things they may wish to
change about the default install to suit there needs better.
IMHO it is a mistake to try and tweak our default install to
suit any of these varied desires, you can not ever get even
close to satisfying a small percentage, so keep it VERY minimal.

If you want root's shell as an install option, there is that
last screen "Drop to a shell in the installed system?".  This
is a very feature reach installer option system.
Want root to use /bin/sh:  type chsh -s /bin/sh root
Want sshd started on boot: type echo 'sshd_enable="YES"' >>/etc/rc.conf
Do not want that toor account in the password file:
type vipw and remove it

I believe if your network attached at this point you can
even do a "pkg bootstrap && pkg install FOO".

Much of what we have as installer options could be handled
this way and a huge list of things provided to the user
in a simple text document "How to tweak your BSD so it
fits your likes using the installer shell".  We are unix
geeks, lets use our toolbox and not some god forbiden
dialog menu screen system (not that the installer is not
a wonderful thing for new users.)

Personally I have a tarball overlay that I scp and
untar onto the system at this stage, mostly it is
new files, but files I need to alter, like /root/.cshrc
is handled by /tmp/overlay.diff which is simple a patch
rooted at / that does these tweaks (One reason I get
upset about people tweaking on the default config scripts
that we ship, as I have to revise this patch and have
a different version for each release that has different
files, its become a PITA.

No need for /bin/mksh, no need for /root/.shrc,
no need for any aliases in any dot.foo files.
Clean it up and let these areas be the site customizations
they are intended to be and stop trying to make the defaults
work for everyone.

My paint is blue,
I buy it by the rail car,
and I dip paint my bike sheds :-)

-- 
Rod Grimes                                                 rgrimes@freebsd.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901261647.x0QGlDeG094336>