From nathan@rtfm.net Mon Sep 13 12:31:48 1999
Return-Path: <nathan@rtfm.net>
Received: from eterna.binary.net (eterna.binary.net [12.13.84.6])
	by hub.freebsd.org (Postfix) with ESMTP id 532BD14EEE
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 13 Sep 1999 12:31:45 -0700 (PDT)
	(envelope-from nathan@rtfm.net)
Received: from matrix.binary.net (root@matrix.binary.net [12.13.120.2])
	by eterna.binary.net (8.9.1a/8.9.1) with ESMTP id OAA29778
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 13 Sep 1999 14:31:45 -0500 (CDT)
Received: (from nathan@localhost)
	by matrix.binary.net (8.9.3/8.9.1) id OAA15311;
	Mon, 13 Sep 1999 14:31:44 -0500 (CDT)
Message-Id: <199909131931.OAA15311@matrix.binary.net>
Date: Mon, 13 Sep 1999 14:31:44 -0500 (CDT)
From: nathan@rtfm.net
To: FreeBSD-gnats-submit@freebsd.org
Subject: [PATCH] sysinstall incorrectly writes loader.conf
X-Send-Pr-Version: 3.2

>Number:         13738
>Category:       conf
>Synopsis:       [PATCH] sysinstall incorrectly writes loader.conf
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 13 12:40:01 PDT 1999
>Closed-Date:    Mon Sep 13 15:30:47 PDT 1999
>Last-Modified:  Mon Sep 13 15:31:17 PDT 1999
>Originator:     Nathan Dorfman
>Release:        FreeBSD 4.0-CURRENT (August 27 snap install) i386
>Organization:
none
>Environment:

	4.0-1990827 Installation
	i386 machine without monitor/keyboard
	Console on COM1

>Description:

	When you install the system over a serial console, sysinstall
	records this with a line in /boot/loader.conf on the installed
	system:

	console="serial"

	Unfortunately, this is wrong. It should be:

	console="comconsole"

	The impact is that when the newly installed system is rebooted,
	it will not use the serial console, until this line is changed
	(or the -h boot flag is used).

	(P.S. - it would also be nice if either the console="comconsole"
	line or sysinstall itself would spawn a getty on the serial
	console; currently it locks you out of your new system if you
	have not used sysinstall's interface to add a non-root user
	before booting the new system).

>How-To-Repeat:

	Unplug the keyboard, connect a console to COM1, and install the
	OS (the boot floppy will detect and use the comconsole). Afterwards,
	reboot the newly installed system -- the line in /boot/loader.conf
	will be incorrect and the serial console will not be used.

>Fix:
	
--- sysinstall/install.c-dist	Mon Sep 13 15:26:47 1999
+++ sysinstall/install.c	Mon Sep 13 15:26:24 1999
@@ -756,7 +756,7 @@
 			    fprintf(fp, "# -- sysinstall generated deltas -- #\n");
 			    fprintf(fp, "userconfig_script_load=\"YES\"\n");
 			    if (!OnVTY)
-				fprintf(fp, "console=\"serial\"\n");
+				fprintf(fp, "console=\"comconsole\"\n");
 			    fclose(fp);
 			}
 		    }

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed  
State-Changed-By: cpiazza 
State-Changed-When: Mon Sep 13 15:30:47 PDT 1999 
State-Changed-Why:  
jkh fixed this in rev 1.249 of sysinstall/install.c 
>Unformatted:
