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
This commit is contained in:
Bjoern A. Zeeb 2024-11-09 01:10:33 +00:00
parent dae64402b3
commit 5399052c63

View File

@ -55,7 +55,8 @@ country_set()
"$WLAN_IFACE" "$ifconfig_args" "$WLAN_IFACE" "$ifconfig_args"
error_str="${error_str#ifconfig: }" error_str="${error_str#ifconfig: }"
# Restart wpa_supplicant(8) (should not fail). # 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"' \ 'wpa_supplicant -B -i "%s" -c "%s/wpa_supplicant.conf"' \
"$WLAN_IFACE" "$BSDINSTALL_TMPETC" "$WLAN_IFACE" "$BSDINSTALL_TMPETC"
if [ "$error_str" ]; then if [ "$error_str" ]; then