From owner-freebsd-bugs@FreeBSD.ORG Mon May 24 13:00:11 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E2661065676 for ; Mon, 24 May 2010 13:00:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (unknown [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7D7F48FC1C for ; Mon, 24 May 2010 13:00:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o4OD0Bej003685 for ; Mon, 24 May 2010 13:00:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o4OD0BBw003676; Mon, 24 May 2010 13:00:11 GMT (envelope-from gnats) Date: Mon, 24 May 2010 13:00:11 GMT Message-Id: <201005241300.o4OD0BBw003676@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Guy Yur Cc: 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 Reply-To: Guy Yur List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 May 2010 13:00:11 -0000 The following reply was made to PR bin/146916; it has been noted by GNATS. From: Guy Yur To: bug-followup@FreeBSD.org, guyyur@gmail.com Cc: Subject: Re: bin/146916: [patch] sh(1) uses dumb terminal in single-user mode Date: Mon, 24 May 2010 15:30:54 +0300 the spacing for the Fix field was lost, reformatted below Fix: looking in NetBSD, /bin/sh calls setenv/unsetenv for "TERM" before el_init() and calls el_set(el, EL_TERMINAL, term) when TERM changes. I have made patches using the changes against bin/sh in NetBSD. Only the TERM support changes are included in the patches. The patches are against head, svn revision 208452 cd /usr/src/bin/sh patch < /path/to/patch.txt possible fixes to revision 206182 'bin/sh/options.c' 1. add the "dumb" entry to etc/termcap.small to silence el_init() 2. instead of enabling -o emacs in 'bin/sh/options.c', create /usr/src/etc/root/dot.shrc with set -o emacs add to /usr/src/etc/root/dot.profile ENV=$HOME/.shrc export ENV this way -o emacs will be called after /.profile has set a valid TERM already done this way in /usr/src/share/skel