From owner-svn-src-head@FreeBSD.ORG  Thu Jun 10 20:13:11 2010
Return-Path: <owner-svn-src-head@FreeBSD.ORG>
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 176891065768;
	Thu, 10 Jun 2010 20:13:10 +0000 (UTC)
	(envelope-from randi@FreeBSD.org)
Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 49C848FC16;
	Thu, 10 Jun 2010 20:13:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5AKDAhH053059;
	Thu, 10 Jun 2010 20:13:10 GMT (envelope-from randi@svn.freebsd.org)
Received: (from randi@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5AKDA56053057;
	Thu, 10 Jun 2010 20:13:10 GMT (envelope-from randi@svn.freebsd.org)
Message-Id: <201006102013.o5AKDA56053057@svn.freebsd.org>
From: Randi Harper <randi@FreeBSD.org>
Date: Thu, 10 Jun 2010 20:13:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r209004 - head/usr.sbin/sysinstall
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	<svn-src-head.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-head>,
	<mailto:svn-src-head-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head>
List-Post: <mailto:svn-src-head@freebsd.org>
List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-head>,
	<mailto:svn-src-head-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 10 Jun 2010 20:13:11 -0000

Author: randi
Date: Thu Jun 10 20:13:10 2010
New Revision: 209004
URL: http://svn.freebsd.org/changeset/base/209004

Log:
  Fix uninitialized variables that cause a crash when the network is
  initialized and sysinstall is not running as init.
  
  Submitted by: Nick Mills
  Approved by: cperciva (mentor)
  MFC after: 3 days

Modified:
  head/usr.sbin/sysinstall/tcpip.c

Modified: head/usr.sbin/sysinstall/tcpip.c
==============================================================================
--- head/usr.sbin/sysinstall/tcpip.c	Thu Jun 10 20:13:03 2010	(r209003)
+++ head/usr.sbin/sysinstall/tcpip.c	Thu Jun 10 20:13:10 2010	(r209004)
@@ -732,6 +732,9 @@ tcpDeviceSelect(void)
 	return (NULL);
     }
 
+    devs = deviceFind(NULL, DEVICE_TYPE_NETWORK);
+    cnt = deviceCount(devs); 
+
     if ((!RunningAsInit) && (variable_check("NETWORK_CONFIGURED=NO") != TRUE)) {
 	if (!msgYesNo("Running multi-user, assume that the network is already configured?"))
 	    return devs[0];