From fa182a33488e21152cc217329ea8404c93cecce5 Mon Sep 17 00:00:00 2001 From: Takumi Sueda Date: Tue, 21 Mar 2023 19:45:43 +0900 Subject: [PATCH] Correct menu numbering / resurrect the interface menu --- brain-config | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/brain-config b/brain-config index 50b0e0e..58a6f74 100755 --- a/brain-config +++ b/brain-config @@ -519,8 +519,8 @@ fi do_system_menu() { FUN=$(whiptail --title "SHARP Brain Software Configuration Tool (brain-config)" --menu "System Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Back --ok-button Select \ "S1 Wireless LAN" "Enter SSID and passphrase" \ - "S3 Password" "Change password for the '$USER' user" \ - "S4 Hostname" "Set name for this computer on a network" \ + "S2 Password" "Change password for the '$USER' user" \ + "S3 Hostname" "Set name for this computer on a network" \ 3>&1 1>&2 2>&3) RET=$? if [ $RET -eq 1 ]; then @@ -528,8 +528,8 @@ do_system_menu() { elif [ $RET -eq 0 ]; then case "$FUN" in S1\ *) do_wifi_ssid_passphrase ;; - S3\ *) do_change_pass ;; - S4\ *) do_hostname ;; + S2\ *) do_change_pass ;; + S3\ *) do_hostname ;; *) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;; esac || whiptail --msgbox "There was an error running option $FUN" 20 60 1 fi @@ -537,14 +537,14 @@ do_system_menu() { do_interface_menu() { FUN=$(whiptail --title "SHARP Brain Software Configuration Tool (brain-config)" --menu "Interfacing Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Back --ok-button Select \ - "I2 SSH" "Enable/disable remote command line access using SSH" \ + "I1 SSH" "Enable/disable remote command line access using SSH" \ 3>&1 1>&2 2>&3) RET=$? if [ $RET -eq 1 ]; then return 0 elif [ $RET -eq 0 ]; then case "$FUN" in - I2\ *) do_ssh ;; + I1\ *) do_ssh ;; *) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;; esac || whiptail --msgbox "There was an error running option $FUN" 20 60 1 fi @@ -554,7 +554,7 @@ do_internationalisation_menu() { FUN=$(whiptail --title "SHARP Brain Software Configuration Tool (brain-config)" --menu "Localisation Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Back --ok-button Select \ "L1 Locale" "Configure language and regional settings" \ "L2 Timezone" "Configure time zone" \ - "L4 WLAN Country" "Set legal wireless channels for your country" \ + "L3 WLAN Country" "Set legal wireless channels for your country" \ 3>&1 1>&2 2>&3) RET=$? if [ $RET -eq 1 ]; then @@ -563,7 +563,7 @@ do_internationalisation_menu() { case "$FUN" in L1\ *) do_change_locale ;; L2\ *) do_change_timezone ;; - L4\ *) do_wifi_country ;; + L3\ *) do_wifi_country ;; *) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;; esac || whiptail --msgbox "There was an error running option $FUN" 20 60 1 fi @@ -572,7 +572,7 @@ do_internationalisation_menu() { do_advanced_menu() { FUN=$(whiptail --title "SHARP Brain Software Configuration Tool (brain-config)" --menu "Advanced Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Back --ok-button Select \ "A1 Expand Filesystem" "Ensures that all of the SD card is available" \ - "A4 Network Interface Names" "Enable/disable predictable network i/f names" \ + "A2 Network Interface Names" "Enable/disable predictable network i/f names" \ 3>&1 1>&2 2>&3) RET=$? if [ $RET -eq 1 ]; then @@ -580,7 +580,7 @@ do_advanced_menu() { elif [ $RET -eq 0 ]; then case "$FUN" in A1\ *) do_expand_rootfs ;; - A4\ *) do_net_names ;; + A2\ *) do_net_names ;; *) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;; esac || whiptail --msgbox "There was an error running option $FUN" 20 60 1 fi @@ -600,9 +600,10 @@ if [ "$INTERACTIVE" = True ]; then while true; do FUN=$(whiptail --title "SHARP Brain Software Configuration Tool (brain-config)" --menu "Setup Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Finish --ok-button Select \ "1 System Options" "Configure system settings" \ - "5 Localisation Options" "Configure language and regional settings" \ - "6 Advanced Options" "Configure advanced settings" \ - "9 About brain-config" "Information about this configuration tool" \ + "2 Interface Options" "Configure connections to peripherals" \ + "3 Localisation Options" "Configure language and regional settings" \ + "4 Advanced Options" "Configure advanced settings" \ + "5 About brain-config" "Information about this configuration tool" \ 3>&1 1>&2 2>&3) RET=$? if [ $RET -eq 1 ]; then @@ -610,9 +611,10 @@ if [ "$INTERACTIVE" = True ]; then elif [ $RET -eq 0 ]; then case "$FUN" in 1\ *) do_system_menu ;; - 5\ *) do_internationalisation_menu ;; - 6\ *) do_advanced_menu ;; - 9\ *) do_about ;; + 2\ *) do_interface_menu ;; + 3\ *) do_internationalisation_menu ;; + 4\ *) do_advanced_menu ;; + 5\ *) do_about ;; *) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;; esac || whiptail --msgbox "There was an error running option $FUN" 20 60 1 else