mirror of
https://github.com/brain-hackers/brain-config.git
synced 2024-12-22 20:20:06 +09:00
Correct menu numbering / resurrect the interface menu
This commit is contained in:
parent
bdd36153eb
commit
fa182a3348
34
brain-config
34
brain-config
@ -519,8 +519,8 @@ fi
|
|||||||
do_system_menu() {
|
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 \
|
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" \
|
"S1 Wireless LAN" "Enter SSID and passphrase" \
|
||||||
"S3 Password" "Change password for the '$USER' user" \
|
"S2 Password" "Change password for the '$USER' user" \
|
||||||
"S4 Hostname" "Set name for this computer on a network" \
|
"S3 Hostname" "Set name for this computer on a network" \
|
||||||
3>&1 1>&2 2>&3)
|
3>&1 1>&2 2>&3)
|
||||||
RET=$?
|
RET=$?
|
||||||
if [ $RET -eq 1 ]; then
|
if [ $RET -eq 1 ]; then
|
||||||
@ -528,8 +528,8 @@ do_system_menu() {
|
|||||||
elif [ $RET -eq 0 ]; then
|
elif [ $RET -eq 0 ]; then
|
||||||
case "$FUN" in
|
case "$FUN" in
|
||||||
S1\ *) do_wifi_ssid_passphrase ;;
|
S1\ *) do_wifi_ssid_passphrase ;;
|
||||||
S3\ *) do_change_pass ;;
|
S2\ *) do_change_pass ;;
|
||||||
S4\ *) do_hostname ;;
|
S3\ *) do_hostname ;;
|
||||||
*) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;;
|
*) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;;
|
||||||
esac || whiptail --msgbox "There was an error running option $FUN" 20 60 1
|
esac || whiptail --msgbox "There was an error running option $FUN" 20 60 1
|
||||||
fi
|
fi
|
||||||
@ -537,14 +537,14 @@ do_system_menu() {
|
|||||||
|
|
||||||
do_interface_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 \
|
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)
|
3>&1 1>&2 2>&3)
|
||||||
RET=$?
|
RET=$?
|
||||||
if [ $RET -eq 1 ]; then
|
if [ $RET -eq 1 ]; then
|
||||||
return 0
|
return 0
|
||||||
elif [ $RET -eq 0 ]; then
|
elif [ $RET -eq 0 ]; then
|
||||||
case "$FUN" in
|
case "$FUN" in
|
||||||
I2\ *) do_ssh ;;
|
I1\ *) do_ssh ;;
|
||||||
*) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;;
|
*) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;;
|
||||||
esac || whiptail --msgbox "There was an error running option $FUN" 20 60 1
|
esac || whiptail --msgbox "There was an error running option $FUN" 20 60 1
|
||||||
fi
|
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 \
|
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" \
|
"L1 Locale" "Configure language and regional settings" \
|
||||||
"L2 Timezone" "Configure time zone" \
|
"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)
|
3>&1 1>&2 2>&3)
|
||||||
RET=$?
|
RET=$?
|
||||||
if [ $RET -eq 1 ]; then
|
if [ $RET -eq 1 ]; then
|
||||||
@ -563,7 +563,7 @@ do_internationalisation_menu() {
|
|||||||
case "$FUN" in
|
case "$FUN" in
|
||||||
L1\ *) do_change_locale ;;
|
L1\ *) do_change_locale ;;
|
||||||
L2\ *) do_change_timezone ;;
|
L2\ *) do_change_timezone ;;
|
||||||
L4\ *) do_wifi_country ;;
|
L3\ *) do_wifi_country ;;
|
||||||
*) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;;
|
*) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;;
|
||||||
esac || whiptail --msgbox "There was an error running option $FUN" 20 60 1
|
esac || whiptail --msgbox "There was an error running option $FUN" 20 60 1
|
||||||
fi
|
fi
|
||||||
@ -572,7 +572,7 @@ do_internationalisation_menu() {
|
|||||||
do_advanced_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 \
|
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" \
|
"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)
|
3>&1 1>&2 2>&3)
|
||||||
RET=$?
|
RET=$?
|
||||||
if [ $RET -eq 1 ]; then
|
if [ $RET -eq 1 ]; then
|
||||||
@ -580,7 +580,7 @@ do_advanced_menu() {
|
|||||||
elif [ $RET -eq 0 ]; then
|
elif [ $RET -eq 0 ]; then
|
||||||
case "$FUN" in
|
case "$FUN" in
|
||||||
A1\ *) do_expand_rootfs ;;
|
A1\ *) do_expand_rootfs ;;
|
||||||
A4\ *) do_net_names ;;
|
A2\ *) do_net_names ;;
|
||||||
*) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;;
|
*) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;;
|
||||||
esac || whiptail --msgbox "There was an error running option $FUN" 20 60 1
|
esac || whiptail --msgbox "There was an error running option $FUN" 20 60 1
|
||||||
fi
|
fi
|
||||||
@ -600,9 +600,10 @@ if [ "$INTERACTIVE" = True ]; then
|
|||||||
while true; do
|
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 \
|
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" \
|
"1 System Options" "Configure system settings" \
|
||||||
"5 Localisation Options" "Configure language and regional settings" \
|
"2 Interface Options" "Configure connections to peripherals" \
|
||||||
"6 Advanced Options" "Configure advanced settings" \
|
"3 Localisation Options" "Configure language and regional settings" \
|
||||||
"9 About brain-config" "Information about this configuration tool" \
|
"4 Advanced Options" "Configure advanced settings" \
|
||||||
|
"5 About brain-config" "Information about this configuration tool" \
|
||||||
3>&1 1>&2 2>&3)
|
3>&1 1>&2 2>&3)
|
||||||
RET=$?
|
RET=$?
|
||||||
if [ $RET -eq 1 ]; then
|
if [ $RET -eq 1 ]; then
|
||||||
@ -610,9 +611,10 @@ if [ "$INTERACTIVE" = True ]; then
|
|||||||
elif [ $RET -eq 0 ]; then
|
elif [ $RET -eq 0 ]; then
|
||||||
case "$FUN" in
|
case "$FUN" in
|
||||||
1\ *) do_system_menu ;;
|
1\ *) do_system_menu ;;
|
||||||
5\ *) do_internationalisation_menu ;;
|
2\ *) do_interface_menu ;;
|
||||||
6\ *) do_advanced_menu ;;
|
3\ *) do_internationalisation_menu ;;
|
||||||
9\ *) do_about ;;
|
4\ *) do_advanced_menu ;;
|
||||||
|
5\ *) do_about ;;
|
||||||
*) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;;
|
*) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;;
|
||||||
esac || whiptail --msgbox "There was an error running option $FUN" 20 60 1
|
esac || whiptail --msgbox "There was an error running option $FUN" 20 60 1
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user