From owner-freebsd-bugs@FreeBSD.ORG Fri May 28 12:45:59 2010 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 101F51065672; Fri, 28 May 2010 12:45:59 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id C86048FC19; Fri, 28 May 2010 12:45:58 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 4786A35A86B; Fri, 28 May 2010 14:45:57 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1677) id 3C6A117204; Fri, 28 May 2010 14:45:57 +0200 (CEST) Date: Fri, 28 May 2010 14:45:57 +0200 From: Jilles Tjoelker To: Ed Schouten Message-ID: <20100528124557.GA50785@stack.nl> References: <201005281033.o4SAXjlv078228@freefall.freebsd.org> <20100528103618.GJ56080@hoeg.nl> <20100528103830.GK56080@hoeg.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100528103830.GK56080@hoeg.nl> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-bugs@FreeBSD.org, Guy Yur , brucec@FreeBSD.org Subject: Re: bin/146916: [patch] sh(1) uses dumb terminal in single-user mode X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 May 2010 12:45:59 -0000 On Fri, May 28, 2010 at 12:38:30PM +0200, Ed Schouten wrote: > * Ed Schouten 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