bin/80256: /rescue/vi doesn't work without terminal database in /usr

Brian Candler B.Candler at pobox.com
Sat Apr 23 12:00:51 PDT 2005


The following reply was made to PR bin/80256; it has been noted by GNATS.

From: Brian Candler <B.Candler at pobox.com>
To: "Simon L. Nielsen" <simon at FreeBSD.org>
Cc: FreeBSD-gnats-submit at 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.


More information about the freebsd-bugs mailing list