From owner-svn-src-all@freebsd.org Sun Dec 6 00:20:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1200A3FB30; Sun, 6 Dec 2015 00:20:46 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF85C1A83; Sun, 6 Dec 2015 00:20:46 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB60KjmK065531; Sun, 6 Dec 2015 00:20:45 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB60KjFB065530; Sun, 6 Dec 2015 00:20:45 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201512060020.tB60KjFB065530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sun, 6 Dec 2015 00:20:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291877 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2015 00:20:47 -0000 Author: nwhitehorn Date: Sun Dec 6 00:20:45 2015 New Revision: 291877 URL: https://svnweb.freebsd.org/changeset/base/291877 Log: Adapt to new wireless scheme where base wlan interfaces do not show up in ifconfig anymore. Modified: head/usr.sbin/bsdinstall/scripts/netconfig Modified: head/usr.sbin/bsdinstall/scripts/netconfig ============================================================================== --- head/usr.sbin/bsdinstall/scripts/netconfig Sat Dec 5 23:59:30 2015 (r291876) +++ head/usr.sbin/bsdinstall/scripts/netconfig Sun Dec 6 00:20:45 2015 (r291877) @@ -41,19 +41,24 @@ DIALOG_TAGS="" : ${DIALOG_ITEM_HELP=4} : ${DIALOG_ESC=255} -# Do a dirty check to see if this a wireless interface -- there should be a -# better way -is_wireless_if() { - ifconfig $1 | grep -q 'media: IEEE 802.11 Wireless' -} - for IF in `ifconfig -l`; do test "$IF" = "lo0" && continue (ifconfig -g wlan | egrep -wq $IF) && continue INTERFACES="$INTERFACES $IF" +done + +INTERFACES="$INTERFACES $(sysctl -in net.wlan.devices)" +is_wireless_if() { + for IF in $(sysctl -in net.wlan.devices); do + if [ $IF = $1 ]; then + return 0 + fi + done + return 1 +} + +for IF in $INTERFACES; do DESC=`sysctl -n dev.$(echo $IF | sed -E 's/([[:alpha:]]*)([[:digit:]]*)/\1.\2/g').%desc` - is_wireless_if $IF && echo $DESC | - grep -iqv wireless && DESC="Wireless $DESC" DIALOG_TAGS="$DIALOG_TAGS $IF \"$DESC\"" done