From mi@monsta.privatelabs.com  Thu Aug 30 19:17:01 2001
Return-Path: <mi@monsta.privatelabs.com>
Received: from monsta.privatelabs.com (monsta.privatelabs.com [66.9.25.172])
	by hub.freebsd.org (Postfix) with ESMTP
	id 0C85437B401; Thu, 30 Aug 2001 19:16:56 -0700 (PDT)
	(envelope-from mi@monsta.privatelabs.com)
Received: (from mi@localhost)
	by monsta.privatelabs.com (8.11.3/8.11.3) id f7V26ct29666;
	Thu, 30 Aug 2001 22:06:38 -0400 (EDT)
	(envelope-from mi)
Message-Id: <200108310206.f7V26ct29666@monsta.privatelabs.com>
Date: Thu, 30 Aug 2001 22:06:38 -0400 (EDT)
From: Mikhail Teterin <mi@monsta.privatelabs.com>
Reply-To: mi@aldan.algebra.com
To: FreeBSD-gnats-submit@freebsd.org
Cc: jkh@freebsd.org
Subject: sysinstall ignores the network device name given on command line
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         30229
>Category:       bin
>Synopsis:       sysinstall ignores the network device name given on command line
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    murray
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 30 19:20:00 PDT 2001
>Closed-Date:    Sun Sep 16 16:49:14 PDT 2001
>Last-Modified:  Sun Sep 16 16:49:29 PDT 2001
>Originator:     Mikhail Teterin
>Release:        FreeBSD 4.3-BETA i386
>Organization:
Private Labs, Inc.
>Environment:
System: FreeBSD monsta.privatelabs.com 4.3-BETA FreeBSD 4.3-BETA #0: Thu Mar 15 14:42:23 EST 2001 mi@minime.privatelabs.com:/raid/src/sys/compile/MONSTA i386


>Description:

	The sysinstall(8) allows to specify various parameters and
	invoke particular subparts of the program from command line.

	Unfortunately, when  the tcpMenuSelect part is  invoked, it will
	only  honor  the  specified  network  interface  (netDev),  when
	non-interactivity is also requested.

	This prevents its use for interactively configuring a _specified_
	interface -- the user first has to select it again from the menu.

>How-To-Repeat:

	sysinstall netDev=dc0 tcpMenuSelect

>Fix:

The logic in  the tcpDeviceSelect() can, probably, be redone  -- it will
look somewhat redundant  after this patch. For that, it  is very simple.
It will cause the count of the  eligible devices to be 1, if the correct
device was already specified (through command or config file). If it was
not, the variable_get() call will return  NULL and the old behavior will
take place:

Index: tcpip.c
===================================================================
RCS file: /net/raidbox/raid/ncvs/src/usr.sbin/sysinstall/tcpip.c,v
retrieving revision 1.116
diff -U2 -r1.116 tcpip.c
--- tcpip.c	2001/07/12 00:01:45	1.116
+++ tcpip.c	2001/08/31 01:10:38
@@ -601,5 +601,5 @@
     int cnt;
 
-    devs = deviceFind(NULL, DEVICE_TYPE_NETWORK);
+    devs = deviceFind(variable_get(VAR_NETWORK_DEVICE), DEVICE_TYPE_NETWORK);
     cnt = deviceCount(devs);
     rval = NULL;
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->jkh 
Responsible-Changed-By: mi 
Responsible-Changed-When: Thu Aug 30 21:06:43 PDT 2001 
Responsible-Changed-Why:  
Sysinstall is Jordan's... :) 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30229 
Responsible-Changed-From-To: jkh->eric 
Responsible-Changed-By: jkh 
Responsible-Changed-When: Thu Aug 30 21:30:19 PDT 2001 
Responsible-Changed-Why:  
Because Eric touched it last 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30229 
State-Changed-From-To: open->analyzed 
State-Changed-By: murray 
State-Changed-When: Wed Sep 5 01:10:09 PDT 2001 
State-Changed-Why:  
Your patch has been committed to -CURRENT, thanks! 



Responsible-Changed-From-To: eric->murray 
Responsible-Changed-By: murray 
Responsible-Changed-When: Wed Sep 5 01:10:09 PDT 2001 
Responsible-Changed-Why:  
My MFC reminder. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30229 
State-Changed-From-To: analyzed->closed 
State-Changed-By: murray 
State-Changed-When: Sun Sep 16 16:49:14 PDT 2001 
State-Changed-Why:  
This functionality has been added to -CURRENT and -STABLE.  Thanks! 


http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30229 
>Unformatted:
