wlanconfig: allow to enter WiFi details if no networks found

Improve the installer: wlanconfig allows user to enter WiFi details
if no networks found, useful to connect to a hidden SSID.

PR:			246192
Reported by:		emaste
Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34149
This commit is contained in:
Alfonso S. Siciliano 2022-03-02 00:01:13 +01:00
parent adce4585ca
commit 912df915c2
No known key found for this signature in database
GPG Key ID: 3F9EEFACFD371E37

View File

@ -213,23 +213,22 @@ while :; do
if [ ! "$NETWORKS" ]; then
f_dialog_title "$msg_error"
f_yesno "No wireless networks were found. Rescan?" && continue
exit 1
else
f_dialog_title "Network Selection"
prompt="Select a wireless network to connect to."
f_dialog_menu_size height width rows "$DIALOG_TITLE" \
"$DIALOG_BACKTITLE" "$prompt" "" $menu_list
NETWORK=$( eval $DIALOG \
--title \"\$DIALOG_TITLE\" \
--backtitle \"\$DIALOG_BACKTITLE\" \
--extra-button \
--extra-label \"Rescan\" \
--menu \"\$prompt\" \
$height $width $rows \
$NETWORKS \
2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
)
fi
f_dialog_title "Network Selection"
prompt="Select a wireless network to connect to."
f_dialog_menu_size height width rows "$DIALOG_TITLE" \
"$DIALOG_BACKTITLE" "$prompt" "" $menu_list
NETWORK=$( eval $DIALOG \
--title \"\$DIALOG_TITLE\" \
--backtitle \"\$DIALOG_BACKTITLE\" \
--extra-button \
--extra-label \"Rescan\" \
--menu \"\$prompt\" \
$height $width $rows \
$NETWORKS \
2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
)
retval=$?
f_dialog_data_sanitize NETWORK
case $retval in