bin/146916: [patch] sh(1) uses dumb terminal in single-user mode

Jilles Tjoelker jilles at stack.nl
Fri May 28 12:45:59 UTC 2010


On Fri, May 28, 2010 at 12:38:30PM +0200, Ed Schouten wrote:
> * Ed Schouten <ed at 80386.nl> wrote:
> > Why should the shell be responsible for this? Shouldn't we put stuff
> > like this in /sbin/init?

> Oh wait. Never mind. I understand the issue. Jilles, what do you think
> about this?

Yes, I think init(8) should attempt to pass a suitable TERM to the
single-user shell. This value could be hard-coded (TERM=xterm will
usually be close enough) or taken from /etc/ttys somehow.

The sh(1) patch to allow updating libedit's TERM looks OK, although it
probably should not react to TERM changes in subshells.

I do not plan to revert r206182, putting 'set -o emacs' in root's shell
startup files instead. I did 'set -o emacs' in the shell itself so that
it works even if there are no startup files at all, such as 'make
buildenv' and chroot shells.

-- 
Jilles Tjoelker


More information about the freebsd-bugs mailing list