Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Aug 2001 22:06:38 -0400 (EDT)
From:      Mikhail Teterin <mi@monsta.privatelabs.com>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        jkh@freebsd.org
Subject:   bin/30229: sysinstall ignores the network device name given on command line
Message-ID:  <200108310206.f7V26ct29666@monsta.privatelabs.com>

next in thread | raw e-mail | index | archive | help

>Number:         30229
>Category:       bin
>Synopsis:       sysinstall ignores the network device name given on command line
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 30 19:20:00 PDT 2001
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108310206.f7V26ct29666>