From owner-freebsd-bugs@FreeBSD.ORG Sat Apr 23 21:00:37 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 1674416A4CE for ; Sat, 23 Apr 2005 21:00:37 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B5CF443D68 for ; Sat, 23 Apr 2005 21:00:36 +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 j3NL0aCM004565 for ; Sat, 23 Apr 2005 21:00:36 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j3NL0afp004564; Sat, 23 Apr 2005 21:00:36 GMT (envelope-from gnats) Date: Sat, 23 Apr 2005 21:00:36 GMT Message-Id: <200504232100.j3NL0afp004564@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: "Simon L. Nielsen" 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: "Simon L. Nielsen" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Apr 2005 21:00:37 -0000 The following reply was made to PR bin/80256; it has been noted by GNATS. From: "Simon L. Nielsen" To: Brian Candler Cc: FreeBSD-gnats-submit@FreeBSD.org, Tim Kientzle Subject: Re: bin/80256: /rescue/vi doesn't work without terminal database in /usr Date: Sat, 23 Apr 2005 22:52:15 +0200 --UKNXkkdQCYZ6W5l3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2005.04.23 17:19:17 +0200, Brian Candler wrote: > 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: > >=20 > > BUGS > > Most of the rescue tools work even in a fairly crippled system. T= he 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 in= to the > > ncurses(3) library, so that /rescue/vi can be used even in a syste= m where > > /usr cannot immediately be mounted. In the meantime, the rescue v= ersion > > of the ed(1) editor can be used from /rescue/ed if you need to edit > > files, but cannot mount /usr. >=20 > 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 >=20 > I do note however from ncurses(3X): >=20 > If the ncurses library has been configured with termcap sup= port, > ncurses will check for a terminal's description in termcap fo= rm if > it is not available in the terminfo database. >=20 > This suggests a very simple solution (untested): >=20 > --- 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 pe= ter Exp $ > */ > =20 > -#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" >=20 > and then bundle a few termcap entries in /rescue/termcap. Is there any > reason why that couldn't be done? Without knowing how the code in question works, that does sounds like a simple way to get working vi in a rescue environment. I have CC'ed Tim Kientzle who did the initial rescue work. Tim, do you know if the above suggestion would work, and if it does, do you think we should go that way? --=20 Simon L. Nielsen --UKNXkkdQCYZ6W5l3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFCarV5h9pcDSc1mlERAhxsAJ0dzbjkj1jrFWCKLvKncY2ed9mgdQCfQIJr oZkC/kvZw1BInCJFmHvVuOY= =phqp -----END PGP SIGNATURE----- --UKNXkkdQCYZ6W5l3--