From 528b1bb15ba8e146ae90df5b2c1b9286dca332fe Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Mon, 6 May 2019 21:35:36 +0200 Subject: [PATCH] v6.23 + DietPi-Config | Alignment --- dietpi/dietpi-config | 65 ++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index d5d70d9f08..2a9860be18 100644 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1982,7 +1982,7 @@ More info here: https://www.raspberrypi.org/forums/viewtopic.php?p=105008#p10500 elif (( $G_HW_MODEL == 10 && $G_DISTRO == 3 )); then #REMOVE v6.24 - gpu_mem_current=$((1024-ram_mem_current)) + gpu_mem_current=$((1024-ram_mem_current)) elif (( $G_HW_MODEL == 12 )); then @@ -2027,58 +2027,57 @@ More info here: https://www.raspberrypi.org/forums/viewtopic.php?p=105008#p10500 fi - # Odroid C1 - #REMOVE v6.24 - elif (( $G_HW_MODEL == 10 && $G_DISTRO == 3 )); then + # Odroid C1: REMOVE v6.24 + elif (( $G_HW_MODEL == 10 && $G_DISTRO == 3 )); then - # Odroid HDMI/headless extra data - local display_output_enabled=$(grep -ci -m1 '^setenv hdmioutput "1"' /DietPi/boot.ini) - local display_vpu_enabled=$(grep -ci -m1 '^setenv vpu "1"' /DietPi/boot.ini) - local display_output_text='[On]' - local display_vpu_text='[On]' + # Odroid HDMI/headless extra data + local display_output_enabled=$(grep -ci -m1 '^setenv hdmioutput "1"' /DietPi/boot.ini) + local display_vpu_enabled=$(grep -ci -m1 '^setenv vpu "1"' /DietPi/boot.ini) + local display_output_text='[On]' + local display_vpu_text='[On]' - (( $display_output_enabled )) || display_output_text='[Off]' - (( $display_vpu_enabled )) || display_vpu_text='[Off]' + (( $display_output_enabled )) || display_output_text='[Off]' + (( $display_vpu_enabled )) || display_vpu_text='[Off]' - G_WHIP_MENU_ARRAY=( + G_WHIP_MENU_ARRAY=( - 'Headless' 'HDMI: Disabled | VPU: Disabled' - 'Server' 'HDMI: Enabled | VPU: Disabled' - 'Desktop' 'HDMI: Enabled | VPU: Enabled' + 'Headless' 'HDMI: Disabled | VPU: Disabled' + 'Server' 'HDMI: Enabled | VPU: Disabled' + 'Desktop' 'HDMI: Enabled | VPU: Enabled' - ) + ) - G_WHIP_MENU "Hardware : $G_HW_MODEL_DESCRIPTION \nCurrent : HDMI: $display_output_text | VPU: $display_vpu_text \n Memory : $gpu_mem_current MB GPU | $ram_mem_current MB RAM \n NB: GPU/RAM figures require a reboot after a change is made." - if (( $? == 0 )); then + G_WHIP_MENU "Hardware : $G_HW_MODEL_DESCRIPTION \nCurrent : HDMI: $display_output_text | VPU: $display_vpu_text \n Memory : $gpu_mem_current MB GPU | $ram_mem_current MB RAM \n NB: GPU/RAM figures require a reboot after a change is made." + if (( $? == 0 )); then - REBOOT_REQUIRED=1 + REBOOT_REQUIRED=1 - TARGETMENUID=6 # Return to this menu + TARGETMENUID=6 # Return to this menu - case "$G_WHIP_RETURNED_VALUE" in + case "$G_WHIP_RETURNED_VALUE" in - 'Headless') + 'Headless') - /DietPi/dietpi/func/dietpi-set_hardware headless 1 + /DietPi/dietpi/func/dietpi-set_hardware headless 1 - ;; + ;; - 'Server') + 'Server') - /DietPi/dietpi/func/dietpi-set_hardware headless 0 - G_CONFIG_INJECT 'setenv vpu ' 'setenv vpu "0"' /DietPi/boot.ini + /DietPi/dietpi/func/dietpi-set_hardware headless 0 + G_CONFIG_INJECT 'setenv vpu ' 'setenv vpu "0"' /DietPi/boot.ini - ;; + ;; - 'Desktop') + 'Desktop') - /DietPi/dietpi/func/dietpi-set_hardware headless 0 + /DietPi/dietpi/func/dietpi-set_hardware headless 0 - ;; + ;; - esac + esac - fi + fi # Odroid C2 elif (( $G_HW_MODEL == 12 )); then