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)
Mon, Apr 22, 4:11 AM
Unknown Object (File)
Jan 16 2024, 8:38 PM
Unknown Object (File)
Jan 14 2024, 7:42 AM
Unknown Object (File)
Dec 24 2023, 6:36 PM
Unknown Object (File)
Dec 23 2023, 1:55 AM
Unknown Object (File)
Sep 21 2023, 11:20 PM
Unknown Object (File)
Aug 15 2023, 9:54 PM
Unknown Object (File)
Jul 22 2023, 10:29 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