Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Apr 2005 18:44:02 +0200
From:      Brian Candler <B.Candler@pobox.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:    bin/80256: /rescue/vi doesn't work without terminal database in /usr
Message-ID:  <E1DP1G6-000N4c-IT@thinkdog.local.linnet.org>
Resent-Message-ID: <200504221650.j3MGo9GH042713@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         80256
>Category:       bin
>Synopsis:       /rescue/vi doesn't work without terminal database in /usr
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 22 16:50:08 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Brian Candler
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
>Environment:

5.4-STABLE as of about 2005-04-18

	
>Description:

The usefulness of /rescue/vi is severely curtailed by the fact that it needs
to have /usr mounted before it functions. In that case, you might as well
just use /usr/bin/vi.

	
>How-To-Repeat:

Boot into single-user mode; just the root partition is mounted initially.

# /rescue/vi
vi: No terminal database found
# echo $TERM
cons25
# mount /usr
# /rescue/vi
ex/vi: Error: Unable to create temporary file: Read-only file system
# mount /
# /rescue/vi
Error: /var/tmp/vi.recover: No such file or directory
[but it does continue into vi]
# mount /var
# /rescue/vi
[OK]

	
>Fix:

Since the vast majority of single-user activity is at the console, I'd
suggest that vi have a hardcoded fallback termcap/terminfo entry in the
event that /usr is not mounted.

It might be possible to do this through an environment variable (TERMCAP?) -
however there is already a cons25 entry in /etc/termcap, and that isn't
being used, which makes me think that vi probably only uses terminfo.

Perhaps should set TERMINFO_DIRS and include a few choice terminals in the
root filesystem. e.g. vt100 could be included for the benefit of serial
console users.
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1DP1G6-000N4c-IT>