Page MenuHomeFreeBSD

Fix bsdinstall/scripts/wlanconfig: allow user to enter WiFi details if no networks found, PR246192.
ClosedPublic

Authored by asiciliano on Feb 2 2022, 11:54 PM.
Tags
None
Referenced Files
F103048936: D34149.id102281.diff
Wed, Nov 20, 6:32 AM
F103044180: D34149.id103367.diff
Wed, Nov 20, 5:08 AM
F103041178: D34149.diff
Wed, Nov 20, 4:14 AM
Unknown Object (File)
Sun, Oct 27, 8:58 PM
Unknown Object (File)
Thu, Oct 24, 11:17 PM
Unknown Object (File)
Thu, Oct 24, 11:17 PM
Unknown Object (File)
Thu, Oct 24, 11:17 PM
Unknown Object (File)
Thu, Oct 24, 10:57 PM
Subscribers

Details

Summary

Fix https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246192

To reproduce the problem setting to true if [ ! "$NETWORKS" ]; then in bsdinstall/scripts/wlanconfig to simulate an empty network list, so with the NO button the script "exit 1" and avoids to set up hidden networks and more.

Replacing "exit 1" with an "else" the DIALOG_CANCEL is matched by the case of the menu so the configuration can proceed.

Off topic / future improvement:
Open the "manual configuration" with a NO/Cancel button is not intuitive, currently dialog does not support menus with zero items so we need the 2 dialogs "if --yesno else --menu".
bsddialog provides already this feature so we could provide only 1 dialog more intuitive in the future:

bsddialog --title "Network Selection" 
--ok-label Select --extra-button --extra-label Rescan 
--cancel-label Manual --help-button --help-label Finish 
--menu "\nSelect a wireless network to connect to." 0 0 0 
Network1 "[WEP]" Network2 "[WPA]" Network3 "[ESS]"

                                                           
                 ┌────────────┤Network Selection├────────────┐                  
                 │                                           │                  
                 │ Select a wireless network to connect to.  │                  
                 │ ┌───────────────────────────────────────┐ │                  
                 │ │            Network1 [WEP]             │ │                  
                 │ │            Network2 [WPA]             │ │                  
                 │ │            Network3 [ESS]             │ │                  
                 │ └───────────────────────────────────────┘ │                  
                 ├───────────────────────────────────────────┤                  
                 │ [Select]   [Rescan]   [Manual]   [Finish] │                  
                 └───────────────────────────────────────────┘
Test Plan

It is just a simple fix described in Summary.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable