From owner-svn-src-all@freebsd.org Mon Dec 12 18:05:56 2016 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 1B300C74410; Mon, 12 Dec 2016 18:05:56 +0000 (UTC) (envelope-from dteske@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 D105D14D3; Mon, 12 Dec 2016 18:05:55 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBCI5tGv056784; Mon, 12 Dec 2016 18:05:55 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBCI5trH056783; Mon, 12 Dec 2016 18:05:55 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201612121805.uBCI5trH056783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 12 Dec 2016 18:05:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309901 - 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.23 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: Mon, 12 Dec 2016 18:05:56 -0000 Author: dteske Date: Mon Dec 12 18:05:54 2016 New Revision: 309901 URL: https://svnweb.freebsd.org/changeset/base/309901 Log: Comments Modified: head/usr.sbin/bsdinstall/scripts/wlanconfig Modified: head/usr.sbin/bsdinstall/scripts/wlanconfig ============================================================================== --- head/usr.sbin/bsdinstall/scripts/wlanconfig Mon Dec 12 17:58:43 2016 (r309900) +++ head/usr.sbin/bsdinstall/scripts/wlanconfig Mon Dec 12 18:05:54 2016 (r309901) @@ -41,8 +41,10 @@ country_set() local iface_up= local ifconfig_args= + # # Setup what was selected - # NB: do not change order of arguments (or regdomain will be ignored) + # NB: Do not change order of arguments (or regdomain will be ignored) + # if [ ! -z "$2" ]; then ifconfig_args="${ifconfig_args}country $2" fi @@ -74,9 +76,9 @@ country_set() --yes-label Change --no-label Ignore --yesno \ "Error while applying chosen settings ($error_str)" 0 0 if [ $? -eq $DIALOG_OK ]; then - return $FAILURE # Restart + return $FAILURE # Restart else - return $SUCCESS # Skip + return $SUCCESS # Skip fi else : > $BSDINSTALL_TMPETC/rc.conf.net.wlan @@ -97,7 +99,9 @@ dialog_country_select() local regdomain= local country= + # # Parse available countries/regdomains + # input=`ifconfig $WLAN_IFACE list countries | sed 's/DEBUG//gi'` regdomains=`echo $input | sed 's/.*domains://' | tr ' ' '\n' | sort | tr '\n' ' '` @@ -164,8 +168,10 @@ echo "ap_scan=1" >> $BSDINSTALL_TMPETC/w echo "fast_reauth=1" >> $BSDINSTALL_TMPETC/wpa_supplicant.conf echo >> $BSDINSTALL_TMPETC/wpa_supplicant.conf +# # Try to reach wpa_supplicant. If it isn't running and we can modify the # existing system, start it. Otherwise, fail. +# (wpa_cli ping >/dev/null 2>/dev/null || ([ ! -z $BSDINSTALL_CONFIGCURRENT ] && wpa_supplicant -B -i $1 -c $BSDINSTALL_TMPETC/wpa_supplicant.conf)) || (dialog --backtitle "FreeBSD Installer" --title "Error" --msgbox \ @@ -179,8 +185,10 @@ if [ $? -ne 0 -a -z $BSDINSTALL_CONFIGCU exit 1 fi +# # There is no way to check country/regdomain without (possible) # interface state modification +# if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then # Get current country/regdomain for selected interface WLAN_IFACE=`wpa_cli ifname | tail -n 1` @@ -242,10 +250,7 @@ do # here we ask if the user wants to select the network manually f_dialog_title "Network Selection" f_dialog_yesno "Do you want to select the network manually?" || exit 1 - # and take the manual input - # first, take the ssid f_dialog_input NETWORK "Enter SSID" || exit 1 - # then, the encryption ENCRYPTION=$( dialog --backtitle "$DIALOG_BACKTITLE" --title \ "$DIALOG_TITLE" --menu "Select encryption type" 0 0 0 \ "1 WPA/WPA2 PSK" "" "2 WPA/WPA2 EAP" "" "3 WEP" "" "0 None" "" 2>&1 1>&3 ) || exit 1