Updated in response to comments from popcornmix

This commit is contained in:
Rob Bishop 2013-05-19 11:09:23 +01:00
parent c714b00b75
commit 3daf906705

View File

@ -509,34 +509,33 @@ if [ -n "${OPT_MEMORY_SPLIT:-}" ]; then
fi fi
do_4() { do_4() {
FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (Raspi-config)" --menu "Internationalisation Options" $LINES $COLUMNS $(($LINES-8)) --cancel-button Back --ok-button Select \ FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "Internationalisation Options" $LINES $COLUMNS $(($LINES-8)) --cancel-button Back --ok-button Select \
"I1 Change Locale" "Set up language and regional settings to match your location" \ "I1 Change Locale" "Set up language and regional settings to match your location" \
"I2 Change Timezone" "Set up timezone to match your location" \ "I2 Change Timezone" "Set up timezone to match your location" \
"I3 Change Keyboard Layout" "Set the keyboard layout to match your keyboard" \ "I3 Change Keyboard Layout" "Set the keyboard layout to match your keyboard" \
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 1 return 0
elif [ $RET -eq 0 ]; then elif [ $RET -eq 0 ]; then
"do_$(echo $FUN | head -c 1)" || whiptail --msgbox "There was an error running option $FUN" 20 60 1 "do_$(echo $FUN | head -c 2)" || whiptail --msgbox "There was an error running option $FUN" 20 60 1
fi fi
} }
do_7() { do_7() {
FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (Raspi-config)" --menu "Advanced Options" $LINES $COLUMNS $(($LINES-8)) --cancel-button Back --o\ FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "Advanced Options" $LINES $COLUMNS $(($LINES-8)) --cancel-button Back --ok-button Select \
k-button Select \
"A1 Overscan" "You may need to configure overscan if black bars are present on display" \ "A1 Overscan" "You may need to configure overscan if black bars are present on display" \
"A2 Hostname" "Set the visibile name for this Pi on a network" \ "A2 Hostname" "Set the visible name for this Pi on a network" \
"A3 Memory Split" "Change the amount of memory made available to the GPU" \ "A3 Memory Split" "Change the amount of memory made available to the GPU" \
"A4 Overclock" "Configure overclocking for your Pi" \ "A4 Overclock" "Configure overclocking for your Pi" \
"A5 SSH" "Enable/Disable SSH server" \ "A5 SSH" "Enable/Disable remote command line access to your Pi using SSH" \
"A6 Update" "Update this tool to the latest version" \ "A6 Update" "Update this tool to the latest version" \
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 1 return 0
elif [ $RET -eq 0 ]; then elif [ $RET -eq 0 ]; then
"do_$(echo $FUN | head -c 1)" || whiptail --msgbox "There was an error running option $FUN" 20 60 1 "do_$(echo $FUN | head -c 2)" || whiptail --msgbox "There was an error running option $FUN" 20 60 1
fi fi
} }
@ -548,7 +547,7 @@ eval `resize`
while true; do while true; do
FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "Setup Options" $LINES $COLUMNS $(($LINES-8)) --cancel-button Finish --ok-button Select \ FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "Setup Options" $LINES $COLUMNS $(($LINES-8)) --cancel-button Finish --ok-button Select \
"1 Expand Filesystem" "Ensures that all of the SD card storage is available to the OS" \ "1 Expand Filesystem" "Ensures that all of the SD card storage is available to the OS" \
"2 Change User Password" "Change password for the default username (pi)" \ "2 Change User Password" "Change password for the default user (pi)" \
"3 Enable Boot to Desktop" "Choose whether to boot into a desktop environment or the command-line" \ "3 Enable Boot to Desktop" "Choose whether to boot into a desktop environment or the command-line" \
"4 Internationalisation Options" "Set up language and regional settings to match your location" \ "4 Internationalisation Options" "Set up language and regional settings to match your location" \
"5 Enable Camera" "Enable this Pi to work with the Raspberry Pi Camera" \ "5 Enable Camera" "Enable this Pi to work with the Raspberry Pi Camera" \