From owner-freebsd-bugs@FreeBSD.ORG Sat Apr 23 19:00:51 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C9B816A4CE for ; Sat, 23 Apr 2005 19:00:51 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E58C343D54 for ; Sat, 23 Apr 2005 19:00:50 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j3NJ0o07090543 for ; Sat, 23 Apr 2005 19:00:50 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j3NJ0oDi090542; Sat, 23 Apr 2005 19:00:50 GMT (envelope-from gnats) Date: Sat, 23 Apr 2005 19:00:50 GMT Message-Id: <200504231900.j3NJ0oDi090542@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Brian Candler Subject: Re: bin/80256: /rescue/vi doesn't work without terminal database in /usr X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Brian Candler List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Apr 2005 19:00:51 -0000 The following reply was made to PR bin/80256; it has been noted by GNATS. From: Brian Candler To: "Simon L. Nielsen" Cc: FreeBSD-gnats-submit@FreeBSD.org Subject: Re: bin/80256: /rescue/vi doesn't work without terminal database in /usr Date: Sat, 23 Apr 2005 17:19:17 +0200 On Sat, Apr 23, 2005 at 04:04:59PM +0200, Simon L. Nielsen wrote: > This has been known from when rescue was introduced, see the rescue(7) > manual page: > > BUGS > Most of the rescue tools work even in a fairly crippled system. The most > egregious exception is the rescue version of vi(1), which currently > requires that /usr be mounted so that it can access the termcap(5) files. > Hopefully, a failsafe termcap(3) entry will eventually be added into the > ncurses(3) library, so that /rescue/vi can be used even in a system where > /usr cannot immediately be mounted. In the meantime, the rescue version > of the ed(1) editor can be used from /rescue/ed if you need to edit > files, but cannot mount /usr. Thanks, I hadn't come across that man page. I also see why /etc/termcap didn't work; it's currently just a symlink to /usr/share/misc/termcap I do note however from ncurses(3X): If the ncurses library has been configured with termcap support, ncurses will check for a terminal's description in termcap form if it is not available in the terminfo database. This suggests a very simple solution (untested): --- lib/libncurses/pathnames.h.orig Sat Apr 23 17:17:01 2005 +++ lib/libncurses/pathnames.h Sat Apr 23 17:17:13 2005 @@ -34,5 +34,5 @@ * $FreeBSD: src/lib/libncurses/pathnames.h,v 1.1 1999/08/30 07:57:50 peter Exp $ */ -#define _PATH_DEF ".termcap /usr/share/misc/termcap" +#define _PATH_DEF ".termcap /usr/share/misc/termcap /rescue/termcap" #define _PATH_DEF_SEC "/usr/share/misc/termcap" and then bundle a few termcap entries in /rescue/termcap. Is there any reason why that couldn't be done? Regards, Brian.