aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2024-11-09 01:10:33 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2024-11-19 00:06:16 +0000
commit5399052c63a7a3d2f54615d31bfd092ab887a600 (patch)
tree154e8fa9125d0c1ff344bacf65cd8ff5f08492e8
parentdae64402b3e8ef7488db0df8003361f242573905 (diff)
bsdinstall: wlanconfig: fix interface UP on (re-)starting wpa_supplicant
Make sure an interface is back up before (re-)starting wpa_supplicant in wlanconfig not relying on wpa to UP the interface (though we fixed that). Sponsored by: The FreeBSD Foundation Reviewed by: emaste (in D47491) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D47491
-rwxr-xr-xusr.sbin/bsdinstall/scripts/wlanconfig3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/bsdinstall/scripts/wlanconfig b/usr.sbin/bsdinstall/scripts/wlanconfig
index f044bc1cba98..8ac64858eaba 100755
--- a/usr.sbin/bsdinstall/scripts/wlanconfig
+++ b/usr.sbin/bsdinstall/scripts/wlanconfig
@@ -55,7 +55,8 @@ country_set()
"$WLAN_IFACE" "$ifconfig_args"
error_str="${error_str#ifconfig: }"
# Restart wpa_supplicant(8) (should not fail).
- [ "$iface_up" ] && f_eval_catch -d wlanconfig wpa_supplicant \
+ [ "$iface_up" ] && ifconfig "$WLAN_IFACE" up && \
+ f_eval_catch -d wlanconfig wpa_supplicant \
'wpa_supplicant -B -i "%s" -c "%s/wpa_supplicant.conf"' \
"$WLAN_IFACE" "$BSDINSTALL_TMPETC"
if [ "$error_str" ]; then