From bkoenig@cs.tu-berlin.de  Sat Apr 15 07:18:37 2006
Return-Path: <bkoenig@cs.tu-berlin.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 2D51B16A401;
	Sat, 15 Apr 2006 07:18:37 +0000 (UTC)
	(envelope-from bkoenig@cs.tu-berlin.de)
Received: from efacilitas.de (smtp.efacilitas.de [85.10.196.108])
	by mx1.FreeBSD.org (Postfix) with ESMTP id BD74343D46;
	Sat, 15 Apr 2006 07:18:36 +0000 (GMT)
	(envelope-from bkoenig@cs.tu-berlin.de)
Received: from eurystheus.local (port-212-202-38-154.dynamic.qsc.de [212.202.38.154])
	by efacilitas.de (Postfix) with ESMTP id 793EA4CEFD;
	Sat, 15 Apr 2006 09:29:45 +0200 (CEST)
Received: from hoppel.local (eurystheus.local [192.168.1.67])
	by eurystheus.local (Postfix) with SMTP id 56F845285C;
	Sat, 15 Apr 2006 09:18:15 +0200 (CEST)
Received: by hoppel.local (sSMTP sendmail emulation); Sat, 15 Apr 2006 09:18:15 +0200
Message-Id: <20060415071815.56F845285C@eurystheus.local>
Date: Sat, 15 Apr 2006 09:18:15 +0200
From: "Bjrn Knig" <bkoenig@cs.tu-berlin.de>
Reply-To: Bjrn Knig <bkoenig@cs.tu-berlin.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc: qa@freebsd.org
Subject: [patch] environment variable EDITOR is set wrong in fixit mode
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         95792
>Category:       misc
>Synopsis:       [release] [patch] environment variable EDITOR is set wrong in fixit mode
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kensmith
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 15 07:20:12 GMT 2006
>Closed-Date:    Sun Feb 03 05:12:20 UTC 2008
>Last-Modified:  Sun Mar 17 06:34:37 UTC 2013
>Originator:     Bjrn Knig
>Release:        FreeBSD 6.1-RC i386
>Organization:
>Environment:
System: FreeBSD hoppel.local 6.1-RC FreeBSD 6.1-RC #0: Fri Apr 14 20:32:06 CEST 2006 bkoenig@hoppel.local:/home/bkoenig/obj/home/bkoenig/devel/freebsd/RELENG_6_1/src/sys/HOPPEL i386
>Description:
	If you start the fixit mode of disc1 then the
	environment variable EDITOR is set wrong. Its
	value is /mnt2/stand/vi, but vi doesn't exist
	at this place.

	This concerns the variable PAGER likewise.
	
>How-To-Repeat:
	Go to fixit mode:

	Fixit# $EDITOR
	/mnt2/stand/vi: not found

>Fix:
	There are at least two possible solutions.

	First of all /mnt2/stand is a symlink to /rescue,
	but /rescue doesn't exist. It migth be better to
	create a symlink to "rescue" instead of "/rescue".
	In this case /mnt2/stand would be a symlink to
	"rescue", i.e. /mnt2/rescue becomes the real path.
	EDITOR don't need to be changed and vi works. PAGER
	still doesn't work, because more doesn't exist
	in rescue.

	A second approach would be to simply change EDITOR to
	/mnt2/usr/bin/vi resp. PAGER to /mnt/usr/bin/more.

	These two patches deals with the issue. You may
	apply both patches.

--- src-release-Makefile-2006041501.diff begins here ---
--- release/Makefile.orig	Sun Apr  9 06:28:24 2006
+++ release/Makefile	Sat Apr 15 08:55:22 2006
@@ -937,7 +937,7 @@
 	@cp -Rp ${RD}/kernels/GENERIC/ ${CD_LIVEFS}/boot/kernel
 	@rm -f ${CD_LIVEFS}/.profile
 	@cp ${.CURDIR}/fixit.profile ${CD_LIVEFS}/.profile
-	@ln -sf /rescue ${CD_LIVEFS}/stand
+	@ln -sf rescue ${CD_LIVEFS}/stand
 .if ${TARGET} != "pc98"
 	@echo "Setting up CDROM boot area"
 	@rm -f ${CD_LIVEFS}/boot/loader.conf
--- src-release-Makefile-2006041501.diff ends here ---

--- src-release-fixit.profile-2006041501.diff begins here ---
--- release/fixit.profile.orig	Thu Sep  2 15:40:34 2004
+++ release/fixit.profile	Sat Apr 15 08:43:32 2006
@@ -3,8 +3,8 @@
 
 export BLOCKSIZE=K
 export PS1="Fixit# "
-export EDITOR="/mnt2/stand/vi"
-export PAGER="/mnt2/stand/more"
+export EDITOR="/mnt2/usr/bin/vi"
+export PAGER="/mnt2/usr/bin/more"
 export SCSI_MODES="/mnt2/usr/share/misc/scsi_modes"
 # the root MFS doesn't have /dev/nrsa0, pick a better default for mt(1)
 export TAPE=/mnt2/dev/nrsa0
--- src-release-fixit.profile-2006041501.diff ends here ---


>Release-Note:
>Audit-Trail:

Date: Mon, 17 Apr 2006 13:12:19 -0400
From: John Baldwin <jhb@freebsd.org>
To: bug-followup@FreeBSD.org
 
 I think the first patch is better and EDITOR should be
 unchanged.  Perhaps the PAGER should be set only if
 /mnt2/usr/bin/more exists?  If you use the fixit floppy
 instead of the CD I think it won't exist.
 
 --
 John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
 "Power Users Use the Power to Serve"  =  http://www.FreeBSD.org

Responsible-Changed-From-To: freebsd-bugs->kensmith 
Responsible-Changed-By: kensmith 
Responsible-Changed-When: Tue Jan 22 15:22:20 UTC 2008 
Responsible-Changed-Why:  

I made a minimal adjustment to the environment variables in HEAD aimed 
at getting it to work with minimal chance of messing something up this 
close to 7.0-REL, MFC request for that is pending.  I'll look at whether 
to do a better fix or not for 8.X later. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=95792 
State-Changed-From-To: open->closed 
State-Changed-By: kensmith 
State-Changed-When: Sun Feb 3 05:11:50 UTC 2008 
State-Changed-Why:  

Fixed in RELENG_7 and RELENG_6. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=95792 
>Unformatted:
