Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jul 2025 13:36:22 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 9fa537692fa1 - stable/14 - bsdinstall: wlanconfig: ensure the interface is always up for scanning
Message-ID:  <202507221336.56MDaMDP015229@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=9fa537692fa1b3bcb5ce436b8b755e2b6cff5dcb

commit 9fa537692fa1b3bcb5ce436b8b755e2b6cff5dcb
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2025-07-14 18:32:06 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2025-07-22 08:21:53 +0000

    bsdinstall: wlanconfig: ensure the interface is always up for scanning
    
    Sponsored by:   The FreeBSD Foundation
    Reviewed by:    thj (earlier), emaste
    Differential Revision: https://reviews.freebsd.org/D51312
    
    (cherry picked from commit 153e73d782f3f1b06c502a708a3b30236ab332bd)
---
 usr.sbin/bsdinstall/scripts/wlanconfig | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/usr.sbin/bsdinstall/scripts/wlanconfig b/usr.sbin/bsdinstall/scripts/wlanconfig
index 6f44ce1b8410..b5c488b22b2f 100755
--- a/usr.sbin/bsdinstall/scripts/wlanconfig
+++ b/usr.sbin/bsdinstall/scripts/wlanconfig
@@ -200,6 +200,12 @@ fi
 
 while :; do
 	SCANSSID=0
+	# While wpa_supplicant may IFF_UP the interface, we do not want to rely
+	# in this.  In case the script is run manually (outside the installer,
+	# e.g., for testing) wpa_supplicant may be running and the wlanN
+	# interface may be down (especially if dialog_country_select is not
+	# run successfully either) and scanning will not work.
+	f_eval_catch -d wlanconfig ifconfig "ifconfig $WLAN_IFACE up"
 	f_eval_catch -d wlanconfig wpa_cli "wpa_cli scan"
 	f_dialog_title "Scanning"
 	f_dialog_pause "Waiting 5 seconds to scan for wireless networks..." 5 ||



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