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
Unknown Object (File)
Tue, Oct 1, 1:23 PM
Unknown Object (File)
Tue, Oct 1, 7:13 AM
Unknown Object (File)
Mon, Sep 30, 10:41 AM
Unknown Object (File)
Tue, Sep 24, 1:21 PM
Unknown Object (File)
Tue, Sep 24, 12:36 PM
Unknown Object (File)
Tue, Sep 24, 8:39 AM
Unknown Object (File)
Mon, Sep 23, 12:14 PM
Unknown Object (File)
Mon, Sep 23, 1:15 AM
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