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

Brian Candler B.Candler at pobox.com
Fri Apr 22 09:50:10 PDT 2005


>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:


More information about the freebsd-bugs mailing list