From owner-svn-src-all@FreeBSD.ORG Wed Jan 15 08:17:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4EB8A47D; Wed, 15 Jan 2014 08:17:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 201CD16DB; Wed, 15 Jan 2014 08:17:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0F8HVAB029470; Wed, 15 Jan 2014 08:17:31 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0F8HVT8029469; Wed, 15 Jan 2014 08:17:31 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201401150817.s0F8HVT8029469@svn.freebsd.org> From: Devin Teske Date: Wed, 15 Jan 2014 08:17:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260682 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 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.17 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: Wed, 15 Jan 2014 08:17:32 -0000 Author: dteske Date: Wed Jan 15 08:17:31 2014 New Revision: 260682 URL: http://svnweb.freebsd.org/changeset/base/260682 Log: MFC r260261 (gavin): Lower the priority of the "connect to any open wireless network" network description, so guaranteeing that any other defined network will be tried first. MFC r260262 (gavin): Allow bsdinstall to use WPA-Enterprise networks when installing. This only allows basic username/password config, and does not provide the ability to set any of the other WPA options. Regardless, this is generally sufficient to associate. Perhaps in the future this could allow full configuring (e.g. being able to set "anonymous identity", and perhaps some of the more obscure WPA options), though perhaps that will better belong in bsdconfig when that grows wlan config ability. Modified: stable/10/usr.sbin/bsdinstall/scripts/wlanconfig Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/wlanconfig ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/wlanconfig Wed Jan 15 08:12:19 2014 (r260681) +++ stable/10/usr.sbin/bsdinstall/scripts/wlanconfig Wed Jan 15 08:17:31 2014 (r260682) @@ -110,6 +110,29 @@ echo "network={ psk=\"$PASS\" priority=5 }" >> $BSDINSTALL_TMPETC/wpa_supplicant.conf +elif echo $ENCRYPTION | grep -q EAP; then + exec 3>&1 + USERPASS=`dialog --insecure --backtitle "FreeBSD Installer" \ + --title "WPA-Enterprise Setup" --mixedform "" 0 0 0 \ + "SSID" 1 0 "$NETWORK" 1 12 0 0 2 \ + "Username" 2 0 "" 2 12 25 63 0 \ + "Password" 3 0 "" 3 12 25 63 1 \ + 2>&1 1>&3` \ + || exec $0 $@ + exec 3>&- +echo "network={ + ssid=\"$NETWORK\" + key_mgmt=WPA-EAP" >> $BSDINSTALL_TMPETC/wpa_supplicant.conf +echo "$USERPASS" | awk ' +{ + if (NR == 1) { + printf " identity=\"%s\"\n", $1; + } else if (NR == 2) { + printf " password=\"%s\"\n", $1; + } +}' >> $BSDINSTALL_TMPETC/wpa_supplicant.conf +echo " priority=5 +}" >> $BSDINSTALL_TMPETC/wpa_supplicant.conf elif echo $ENCRYPTION | grep -q WEP; then exec 3>&1 WEPKEY=`dialog --insecure --backtitle "FreeBSD Installer" \ @@ -135,7 +158,7 @@ fi # Connect to any open networks policy echo "network={ - priority=5 + priority=0 key_mgmt=NONE }" >> $BSDINSTALL_TMPETC/wpa_supplicant.conf