summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2014-01-15 08:17:31 +0000
committerdteske <dteske@FreeBSD.org>2014-01-15 08:17:31 +0000
commit1f9d47c9f7c5c31e5fc57a6f4f0b4531205b1336 (patch)
treeb78092c11f200546520e6e6ad836d1b31bb70238
parentb12b4da87e82a2337a766db07e96d7b9de3a6860 (diff)
downloadFreeBSD-src-1f9d47c9f7c5c31e5fc57a6f4f0b4531205b1336.zip
FreeBSD-src-1f9d47c9f7c5c31e5fc57a6f4f0b4531205b1336.tar.gz
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.
-rwxr-xr-xusr.sbin/bsdinstall/scripts/wlanconfig25
1 files changed, 24 insertions, 1 deletions
diff --git a/usr.sbin/bsdinstall/scripts/wlanconfig b/usr.sbin/bsdinstall/scripts/wlanconfig
index 4a1f7af..cefc2cb 100755
--- a/usr.sbin/bsdinstall/scripts/wlanconfig
+++ b/usr.sbin/bsdinstall/scripts/wlanconfig
@@ -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
OpenPOWER on IntegriCloud