]> xenbits.xensource.com Git - people/royger/freebsd.git/commitdiff
Both simplify bringup of interface after changes and catch errors in debug
authordteske <dteske@FreeBSD.org>
Tue, 13 Dec 2016 02:44:33 +0000 (02:44 +0000)
committerdteske <dteske@FreeBSD.org>
Tue, 13 Dec 2016 02:44:33 +0000 (02:44 +0000)
usr.sbin/bsdinstall/scripts/wlanconfig

index f2829d7d935bb7d215e411612c5700531acdc64c..25d0b31377f7e474a9bdc71fec536e239e13a49e 100755 (executable)
@@ -55,11 +55,10 @@ country_set()
        f_eval_catch -dk error_str wlanconfig ifconfig "ifconfig %s %s" \
                "$WLAN_IFACE" "$ifconfig_args"
        error_str="${error_str#ifconfig: }"
-       if [ "$iface_up" ]; then
-               # Restart wpa_supplicant(8) (should not fail).
-               wpa_supplicant -B -i "$WLAN_IFACE" -c \
-                       "$BSDINSTALL_TMPETC/wpa_supplicant.conf"
-       fi
+       # Restart wpa_supplicant(8) (should not fail).
+       [ "$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
                $DIALOG \
                        --title "$msg_error" \