Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Apr 2005 21:00:36 GMT
From:      "Simon L. Nielsen" <simon@FreeBSD.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/80256: /rescue/vi doesn't work without terminal database in /usr
Message-ID:  <200504232100.j3NL0afp004564@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/80256; it has been noted by GNATS.

From: "Simon L. Nielsen" <simon@FreeBSD.org>
To: Brian Candler <B.Candler@pobox.com>
Cc: FreeBSD-gnats-submit@FreeBSD.org,
	Tim Kientzle <kientzle@freebsd.org>
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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200504232100.j3NL0afp004564>