Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Oct 2013 21:20:01 GMT
From:      dfilter@FreeBSD.ORG (dfilter service)
To:        freebsd-sysinstall@FreeBSD.org
Subject:   Re: bin/161547: commit references a PR
Message-ID:  <201310112120.r9BLK1pe025183@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/161547; it has been noted by GNATS.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/161547: commit references a PR
Date: Fri, 11 Oct 2013 21:12:55 +0000 (UTC)

 Author: dteske
 Date: Fri Oct 11 21:12:48 2013
 New Revision: 256347
 URL: http://svnweb.freebsd.org/changeset/base/256347
 
 Log:
   Incorporate PR bin/161547 to detect when an interface is wireless.
   Patch from PR modified slightly for whitespace and style.
   
   PR:		bin/161547
   Submitted by:	Warren Block <wblock@wonkity.com>
   Reviewed by:	Allan Jude <freebsd@allanjude.com>
   Approved by:	re (glebius)
 
 Modified:
   head/usr.sbin/bsdinstall/scripts/netconfig
 
 Modified: head/usr.sbin/bsdinstall/scripts/netconfig
 ==============================================================================
 --- head/usr.sbin/bsdinstall/scripts/netconfig	Fri Oct 11 20:53:25 2013	(r256346)
 +++ head/usr.sbin/bsdinstall/scripts/netconfig	Fri Oct 11 21:12:48 2013	(r256347)
 @@ -41,11 +41,19 @@ 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"
  	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
  
 @@ -63,10 +71,8 @@ exec 3>&-
  
  : > $BSDINSTALL_TMPETC/._rc.conf.net
  
 -# Do a dirty check to see if this a wireless interface -- there should be a
 -# better way
  IFCONFIG_PREFIX=""
 -if ifconfig $INTERFACE | grep -q 'media: IEEE 802.11 Wireless'; then
 +if is_wireless_if $INTERFACE; then
  	NEXT_WLAN_IFACE=wlan0	# XXX
  	echo wlans_$INTERFACE=\"$NEXT_WLAN_IFACE\" >> $BSDINSTALL_TMPETC/._rc.conf.net
  	IFCONFIG_PREFIX="WPA "
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 



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