From owner-freebsd-bugs@FreeBSD.ORG Fri Apr 22 16:50:10 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 16B2E16A4CE for ; Fri, 22 Apr 2005 16:50:10 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64D8543D55 for ; Fri, 22 Apr 2005 16:50:09 +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 j3MGo9DZ042714 for ; Fri, 22 Apr 2005 16:50:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j3MGo9GH042713; Fri, 22 Apr 2005 16:50:09 GMT (envelope-from gnats) Resent-Date: Fri, 22 Apr 2005 16:50:09 GMT Resent-Message-Id: <200504221650.j3MGo9GH042713@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Brian Candler Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 59E2216A4CE for ; Fri, 22 Apr 2005 16:44:40 +0000 (GMT) Received: from orb.pobox.com (orb.pobox.com [207.8.226.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id F28F543D5F for ; Fri, 22 Apr 2005 16:44:39 +0000 (GMT) (envelope-from b.candler@pobox.com) Received: from orb (localhost [127.0.0.1]) by orb.pobox.com (Postfix) with ESMTP id D92F59DF for ; Fri, 22 Apr 2005 12:44:36 -0400 (EDT) Received: from thinkdog.local.linnet.org (dhcp-222-204.ws.afnog.org [196.200.222.204]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by orb.sasl.smtp.pobox.com (Postfix) with ESMTP id BDA4787 for ; Fri, 22 Apr 2005 12:44:22 -0400 (EDT) Received: from brian by thinkdog.local.linnet.org with local (Exim 4.43 (FreeBSD)) id 1DP1G6-000N4c-IT for FreeBSD-gnats-submit@freebsd.org; Fri, 22 Apr 2005 18:44:02 +0200 Message-Id: Date: Fri, 22 Apr 2005 18:44:02 +0200 From: Brian Candler To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: 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: Brian Candler List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2005 16:50:10 -0000 >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: