From a7eb923f03ac3848791049830b962cc0939727ce Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Thu, 4 Jul 2019 13:56:12 +0200 Subject: [PATCH 001/184] v6.26 + DietPi-Software | Gitea: Install ARMv6 binaries on ARMv7 systems since ARMv7 builds/binaries are known to fail, thus do not exist for v1.8.X currently --- dietpi/dietpi-software | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index eabc16b4d9..52469bf456 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -1105,18 +1105,18 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 #------------------ - software_id=161 - aSOFTWARE_WHIP_NAME[$software_id]='FuguHub' - aSOFTWARE_WHIP_DESC[$software_id]='Lightweight WebDAV cloud (eg: dropbox) with a CMS' - aSOFTWARE_CATEGORY_INDEX[$software_id]=4 + software_id=161 + aSOFTWARE_WHIP_NAME[$software_id]='FuguHub' + aSOFTWARE_WHIP_DESC[$software_id]='Lightweight WebDAV cloud (eg: dropbox) with a CMS' + aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=0 - # - ARMv8 - aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,3]=0 + # - ARMv8 + aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,3]=0 - #------------------ - software_id=165 + #------------------ + software_id=165 aSOFTWARE_WHIP_NAME[$software_id]='Gitea' aSOFTWARE_WHIP_DESC[$software_id]='Git with a cup of tea' @@ -6121,7 +6121,7 @@ Pin-Priority: -1' > /etc/apt/preferences.d/dietpi-docker_fix # armv7 elif (( $G_HW_ARCH == 2 )); then - INSTALL_URL_ADDRESS+='linux-arm-7' + INSTALL_URL_ADDRESS+='linux-arm-6' # Workaround since ARMv7 binaries are missing/fail on v1.8.X: https://github.com/MichaIng/DietPi/issues/2959 # armv8 elif (( $G_HW_ARCH == 3 )); then From 88318e3001b3009f80b619a3001550e2c8980ea4 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Thu, 4 Jul 2019 14:01:18 +0200 Subject: [PATCH 002/184] v6.26 + CHANGELOG | Init v6.26 entries + CHANGELOG | Gitea: Install failure on ARMv7: #2959 --- CHANGELOG.txt | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 6e4e50bc55..27252317a6 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,24 @@ +v6.26 +(XX/08/19) + +Bug Fixes: +- DietPi-Software | Gitea: Resolved an issue where install fails on ARMv7 systems. Many thanks to @maschiw for reporting this issue: https://github.com/MichaIng/DietPi/issues/2959 + +As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/XXXX + +Known/Outstanding Issues: +- DietPi-Config | Enabling WiFi + Ethernet adapters, both on different subnets, breaks WiFi connection in some cases: https://github.com/MichaIng/DietPi/issues/2103 +- RPi | LXAppearance (on LXDE desktop) hangs on dbus-launch: https://github.com/MichaIng/DietPi/issues/1791 +- Odroid C2 | Some WiFi adapters do no work as hotspot: https://github.com/MichaIng/DietPi/issues/1955 +- Odroid XU4 | Kodi freezes shortly on video playback: https://github.com/MichaIng/DietPi/issues/2584 +- Rock64 | 3.5mm A/V jack is currently not functional: https://github.com/MichaIng/DietPi/issues/2522 +- DietPi-Software | Node-RED: Pre-installed modules cannot be updated via web UI: https://github.com/MichaIng/DietPi/issues/2073 +- DietPi-Software | Raspimjpeg: With Lighttpd, streaming mjpeg does not work: https://github.com/MichaIng/DietPi/issues/1747 + +For all additional issues that may appear after release, please see the following link for active tickets: https://github.com/MichaIng/DietPi/issues + +----------------------------------------------------------------------------------------------------------- + v6.25 (03/07/19) @@ -49,17 +70,6 @@ Bug Fixes: As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/2950 -Known/Outstanding Issues: -- DietPi-Config | Enabling WiFi + Ethernet adapters, both on different subnets, breaks WiFi connection in some cases: https://github.com/MichaIng/DietPi/issues/2103 -- RPi | LXAppearance (on LXDE desktop) hangs on dbus-launch: https://github.com/MichaIng/DietPi/issues/1791 -- Odroid C2 | Some WiFi adapters do no work as hotspot: https://github.com/MichaIng/DietPi/issues/1955 -- Odroid XU4 | Kodi freezes shortly on video playback: https://github.com/MichaIng/DietPi/issues/2584 -- Rock64 | 3.5mm A/V jack is currently not functional: https://github.com/MichaIng/DietPi/issues/2522 -- DietPi-Software | Node-RED: Pre-installed modules cannot be updated via web UI: https://github.com/MichaIng/DietPi/issues/2073 -- DietPi-Software | Raspimjpeg: With Lighttpd, streaming mjpeg does not work: https://github.com/MichaIng/DietPi/issues/1747 - -For all additional issues that may appear after release, please see the following link for active tickets: https://github.com/MichaIng/DietPi/issues - ----------------------------------------------------------------------------------------------------------- v6.24.1 From 3a272ee06cc3932ab18394509e3ad999d3b1589a Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sat, 6 Jul 2019 01:20:13 +0200 Subject: [PATCH 003/184] v6.26 + DietPi-PREP | Tiny spelling and remove double empty lines --- PREP_SYSTEM_FOR_DIETPI.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index c24ffbb5bd..897e40340f 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -199,7 +199,7 @@ G_GITOWNER=$GITOWNER; unset GITOWNER G_GITBRANCH=$GITBRANCH; unset GITBRANCH - # - Detect the the Debian version of this operating system. + # - Detect the Debian version of this operating system. if grep -q 'jessie' /etc/os-release; then G_DISTRO=3 @@ -222,7 +222,7 @@ fi - # - Detect the the hardware architecture of this operating system. + # - Detect the hardware architecture of this operating system. G_HW_ARCH_DESCRIPTION=$(uname -m) if [[ $G_HW_ARCH_DESCRIPTION == 'armv6l' ]]; then @@ -496,7 +496,6 @@ (( $G_HW_MODEL == 20 )) && G_WHIP_DEFAULT_ITEM=0 if G_WHIP_MENU 'Please select an option:'; then - WIFI_REQUIRED=$G_WHIP_RETURNED_VALUE else @@ -1527,7 +1526,6 @@ _EOF_ # - ARMbian increase console verbose [[ -f '/boot/armbianEnv.txt' ]] && sed -i '/verbosity=/c\verbosity=7' /boot/armbianEnv.txt - #------------------------------------------------------------------------------------------------ echo '' G_DIETPI-NOTIFY 2 '-----------------------------------------------------------------------------------' From b27cdd6dc0b0f1407d83621f5e51e20a58dd4958 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sat, 6 Jul 2019 14:56:15 +0200 Subject: [PATCH 004/184] v6.25 (#2961) + DietPi-Patch | Little hotfix (on master patch_file) for ARMv7 Gitea installs, since ARMv7 binaries are not available for v1.8.X but ARMv6 binaries are backwards compatible. It is fixed dietpi-software code-wise for v6.26. --- dietpi/patch_file | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dietpi/patch_file b/dietpi/patch_file index ce6a0dd5c0..85719903ab 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2132,6 +2132,8 @@ A backup will be created to "/etc/mympd/mympd.conf.bak_DDMMYYY_N" from where you [[ -f '/lib/systemd/system/mympd.service' ]] && rm /lib/systemd/system/mympd.service fi + # - Little hotfix for ARMv7 Gitea installs, since ARMv7 binaries are not available for v1.8.X but ARMv6 binaries are backwards compatible + sed -i 's/arm-7/arm-6/' /DietPi/dietpi/dietpi-software /DietPi/dietpi/dietpi-software reinstall 129 148 165 fi From 70cf117fc978cf4e4ad66141cfba3663b5a10991 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 7 Jul 2019 16:56:36 +0200 Subject: [PATCH 005/184] v6.26 (#2967) + DietPi-Config | RPi: Fix incorrect I2C baudrate handling on RPi, which as ineffective since the correct config.txt entry is a dtparam + General | Raise subversion string to init and allow v6.26 patches --- CHANGELOG.txt | 1 + config.txt | 4 ++-- dietpi/dietpi-config | 14 +++++++------- dietpi/func/dietpi-globals | 4 ++-- dietpi/func/dietpi-set_hardware | 13 ++++++++----- dietpi/patch_file | 7 +++++++ dietpi/server_version-6 | 4 ++-- 7 files changed, 29 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 27252317a6..79f084da6c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,6 +2,7 @@ v6.26 (XX/08/19) Bug Fixes: +- DietPi-Config | Resolved an issue on RPi where I2C baudrate was not applied correctly, thus selection was ineffective. Many thanks to @flashspys for reporting this issue: https://github.com/MichaIng/DietPi/issues/2966 - DietPi-Software | Gitea: Resolved an issue where install fails on ARMv7 systems. Many thanks to @maschiw for reporting this issue: https://github.com/MichaIng/DietPi/issues/2959 As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/XXXX diff --git a/config.txt b/config.txt index 3da45b4351..43f7dce412 100644 --- a/config.txt +++ b/config.txt @@ -72,14 +72,14 @@ dtparam=audio=off #-------I²C------------- dtparam=i2c_arm=off dtparam=i2c1=off -i2c_arm_baudrate=100000 +#dtparam=i2c_arm_baudrate=100000 #-------SPI------------- dtparam=spi=off #-------Serial/UART----- # NB: Enabled for 1st run only, if you want to keep this setting, please set CONFIG_SERIAL_CONSOLE_ENABLE=1 in /DietPi/dietpi.txt. -# NB: "enable_uart=1" will forcefully set "core_freq=250" unless "force_turbo=1" is set as well. +# NB: "enable_uart=1" will forcefully set "core_freq=250" on WiFi/BT-capable RPi models, unless "force_turbo=1" is set as well. enable_uart=1 #-------Overclock------- diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 079224706d..0ddc14db58 100644 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1404,19 +1404,19 @@ NB: You now need to run "apt update" or "G_AGUP" once after each reboot, before if (( $G_HW_MODEL < 10 )); then # I2C state - local rpi_i2c_enabled=$(grep -c -m1 '^[[:blank:]]*dtparam=i2c_arm=on' /DietPi/config.txt) + local rpi_i2c_enabled=$(grep -cm1 '^[[:blank:]]*dtparam=i2c_arm=on' /DietPi/config.txt) local rpi_i2c_text='Off' (( $rpi_i2c_enabled )) && rpi_i2c_text='On' G_WHIP_MENU_ARRAY+=('I2C state' ": [$rpi_i2c_text]") # I2C baudrate - local rpi_i2cbaudrate_hz=$(grep -m1 '^[[:blank:]]*i2c_arm_baudrate=' /DietPi/config.txt | sed 's/^[^=]*=//') + local rpi_i2cbaudrate_hz=$(grep -m1 '^[[:blank:]]*dtparam=i2c_arm_baudrate=' /DietPi/config.txt | sed 's/^.*=//') # - Allow commented/non-existent entry, using default value: https://github.com/raspberrypi/firmware/blob/d69aadedb7c146ba5d3b0b45a661e5669a9141c4/boot/overlays/README#L115-L116 rpi_i2cbaudrate_hz="$(( ${rpi_i2cbaudrate_hz:-100000} / 1000 )) kHz" G_WHIP_MENU_ARRAY+=('I2C frequency' ": [$rpi_i2cbaudrate_hz]") # USB max current - local usb_max_current_enabled=$(grep -c -m1 '^[[:blank:]]*max_usb_current=1' /DietPi/config.txt) + local usb_max_current_enabled=$(grep -cm1 '^[[:blank:]]*max_usb_current=1' /DietPi/config.txt) local rpi_usbmaxcurrent_text='Off' (( $usb_max_current_enabled )) && rpi_usbmaxcurrent_text='On' G_WHIP_MENU_ARRAY+=('Max USB current' ": [$rpi_usbmaxcurrent_text]") @@ -1424,7 +1424,7 @@ NB: You now need to run "apt update" or "G_AGUP" once after each reboot, before # USB boot option: RPi3 only and not required for RPi3+: https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md if [[ $G_HW_MODEL == 3 && $G_HW_MODEL_DESCRIPTION != *'+'* ]]; then - local rpi3_usb_boot_bit_enabled=$(vcgencmd otp_dump | grep -m1 -ci '17:3020000a') + local rpi3_usb_boot_bit_enabled=$(vcgencmd otp_dump | grep -cm1 '17:3020000a') local rpi3_usb_boot_bit_enabled_text='Off' (( $rpi3_usb_boot_bit_enabled )) && rpi3_usb_boot_bit_enabled_text='On' G_WHIP_MENU_ARRAY+=('USB boot support' ": [$rpi3_usb_boot_bit_enabled_text]") @@ -1544,7 +1544,7 @@ Please choose whether your device have an active RTC or requires "fake-hwclock": if G_WHIP_YESNO "Current setting: $rpi_usbmaxcurrent_text (1.2AMP)\nWould you like to disable this setting? \nOnce Disabled:\n - Max USB current will be limited to 0.6AMP.\n - Shared by all USB ports."; then - sed -i '/max_usb_current=/c\max_usb_current=0' /DietPi/config.txt + G_CONFIG_INJECT 'max_usb_current=' 'max_usb_current=0' /DietPi/config.txt REBOOT_REQUIRED=1 fi @@ -1555,7 +1555,7 @@ Please choose whether your device have an active RTC or requires "fake-hwclock": if G_WHIP_YESNO "Current setting: $rpi_usbmaxcurrent_text (0.6AMP)\nWould you like to enable this setting? \nOnce Enabled:\n - Max USB current will be set to 1.2AMP.\n - Shared by all USB ports."; then - sed -i '/max_usb_current=/c\max_usb_current=1' /DietPi/config.txt + G_CONFIG_INJECT 'max_usb_current=' 'max_usb_current=1' /DietPi/config.txt REBOOT_REQUIRED=1 fi @@ -1581,7 +1581,7 @@ Please choose whether your device have an active RTC or requires "fake-hwclock": G_WHIP_DEFAULT_ITEM=${rpi_i2cbaudrate_hz% kHz} if G_WHIP_INPUTBOX 'Please enter the required I2C baudrate frequency (kHz).' && G_CHECK_VALIDINT "$G_WHIP_RETURNED_VALUE" 0; then - /DietPi/dietpi/func/dietpi-set_hardware i2c "$G_WHIP_RETURNED_VALUE" + /DietPi/dietpi/func/dietpi-set_hardware i2c $G_WHIP_RETURNED_VALUE REBOOT_REQUIRED=1 fi diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index f4b8d63d0d..ad26475181 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -43,8 +43,8 @@ # DietPi Versions/Branch G_DIETPI_VERSION_CORE=${G_DIETPI_VERSION_CORE:-6} - G_DIETPI_VERSION_SUB=${G_DIETPI_VERSION_SUB:-25} - G_DIETPI_VERSION_RC=${G_DIETPI_VERSION_RC:-3} + G_DIETPI_VERSION_SUB=${G_DIETPI_VERSION_SUB:-26} + G_DIETPI_VERSION_RC=${G_DIETPI_VERSION_RC:-0} G_GITBRANCH=${G_GITBRANCH:-master} G_GITOWNER=${G_GITOWNER:-MichaIng} [[ -f '/DietPi/dietpi/.version' && $( Date: Sun, 7 Jul 2019 17:43:45 +0200 Subject: [PATCH 006/184] v6.26 + DietPi-Config | Allow audio options on VM, since VirtualBox and VMware have virtual sound card emulators which can be used to output and even record sound through the host systems devices + DietPi-Config | Minor coding --- dietpi/dietpi-config | 70 ++++++++++++++++---------------------------- 1 file changed, 26 insertions(+), 44 deletions(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 0ddc14db58..9fe43793b9 100644 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -9,7 +9,7 @@ #//////////////////////////////////// # # Info: - # - filename /DietPi/dietpi/dietpi-config + # - Filename: /{DietPi,boot}/dietpi/dietpi-config # # Usage: # dietpi-config iMENUINDEX iEXITONBACK @@ -71,14 +71,9 @@ # TARGETMENUID=0 Menu_Main(){ - G_WHIP_MENU_ARRAY=('1' ': Display Options') - # Hide Audio and Performance Options on VM - (( $G_HW_MODEL == 20 )) || G_WHIP_MENU_ARRAY+=( - - '2' ': Audio Options' - '3' ': Performance Options' - - ) + G_WHIP_MENU_ARRAY=('1' ': Display Options' '2' ': Audio Options') + # Hide performance options on VM + (( $G_HW_MODEL == 20 )) || G_WHIP_MENU_ARRAY+=('3' ': Performance Options') G_WHIP_MENU_ARRAY+=( '4' ': Advanced Options' @@ -1410,24 +1405,24 @@ NB: You now need to run "apt update" or "G_AGUP" once after each reboot, before G_WHIP_MENU_ARRAY+=('I2C state' ": [$rpi_i2c_text]") # I2C baudrate - local rpi_i2cbaudrate_hz=$(grep -m1 '^[[:blank:]]*dtparam=i2c_arm_baudrate=' /DietPi/config.txt | sed 's/^.*=//') + local rpi_i2c_baudrate=$(grep -m1 '^[[:blank:]]*dtparam=i2c_arm_baudrate=' /DietPi/config.txt | sed 's/^.*=//') # - Allow commented/non-existent entry, using default value: https://github.com/raspberrypi/firmware/blob/d69aadedb7c146ba5d3b0b45a661e5669a9141c4/boot/overlays/README#L115-L116 - rpi_i2cbaudrate_hz="$(( ${rpi_i2cbaudrate_hz:-100000} / 1000 )) kHz" - G_WHIP_MENU_ARRAY+=('I2C frequency' ": [$rpi_i2cbaudrate_hz]") + rpi_i2c_baudrate=$(( ${rpi_i2c_baudrate:-100000} / 1000 )) + G_WHIP_MENU_ARRAY+=('I2C frequency' ": [$rpi_i2c_baudrate kHz]") # USB max current - local usb_max_current_enabled=$(grep -cm1 '^[[:blank:]]*max_usb_current=1' /DietPi/config.txt) - local rpi_usbmaxcurrent_text='Off' - (( $usb_max_current_enabled )) && rpi_usbmaxcurrent_text='On' - G_WHIP_MENU_ARRAY+=('Max USB current' ": [$rpi_usbmaxcurrent_text]") + local rpi_max_usb_current_enabled=$(grep -cm1 '^[[:blank:]]*max_usb_current=1' /DietPi/config.txt) + local rpi_max_usb_current_text='Off' + (( $rpi_max_usb_current_enabled )) && rpi_max_usb_current_text='On' + G_WHIP_MENU_ARRAY+=('Max USB current' ": [$rpi_max_usb_current_text]") # USB boot option: RPi3 only and not required for RPi3+: https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md if [[ $G_HW_MODEL == 3 && $G_HW_MODEL_DESCRIPTION != *'+'* ]]; then local rpi3_usb_boot_bit_enabled=$(vcgencmd otp_dump | grep -cm1 '17:3020000a') - local rpi3_usb_boot_bit_enabled_text='Off' - (( $rpi3_usb_boot_bit_enabled )) && rpi3_usb_boot_bit_enabled_text='On' - G_WHIP_MENU_ARRAY+=('USB boot support' ": [$rpi3_usb_boot_bit_enabled_text]") + local rpi3_usb_boot_bit_text='Off' + (( $rpi3_usb_boot_bit_enabled )) && rpi3_usb_boot_bit_text='On' + G_WHIP_MENU_ARRAY+=('USB boot support' ": [$rpi3_usb_boot_bit_text]") fi @@ -1538,10 +1533,9 @@ Please choose whether your device have an active RTC or requires "fake-hwclock": elif [[ $G_WHIP_RETURNED_VALUE == 'Max USB current' ]]; then - # Enabled - if (( $usb_max_current_enabled == 1 )); then + if (( $rpi_max_usb_current_enabled )); then - if G_WHIP_YESNO "Current setting: $rpi_usbmaxcurrent_text (1.2AMP)\nWould you like to disable this setting? + if G_WHIP_YESNO "Current setting: [$rpi_max_usb_current_text] (1.2AMP)\nWould you like to disable this setting? \nOnce Disabled:\n - Max USB current will be limited to 0.6AMP.\n - Shared by all USB ports."; then G_CONFIG_INJECT 'max_usb_current=' 'max_usb_current=0' /DietPi/config.txt @@ -1549,16 +1543,11 @@ Please choose whether your device have an active RTC or requires "fake-hwclock": fi - # Disabled - elif (( $usb_max_current_enabled == 0 )); then - - if G_WHIP_YESNO "Current setting: $rpi_usbmaxcurrent_text (0.6AMP)\nWould you like to enable this setting? + elif G_WHIP_YESNO "Current setting: [$rpi_max_usb_current_text] (0.6AMP)\nWould you like to enable this setting? \nOnce Enabled:\n - Max USB current will be set to 1.2AMP.\n - Shared by all USB ports."; then - G_CONFIG_INJECT 'max_usb_current=' 'max_usb_current=1' /DietPi/config.txt - REBOOT_REQUIRED=1 - - fi + G_CONFIG_INJECT 'max_usb_current=' 'max_usb_current=1' /DietPi/config.txt + REBOOT_REQUIRED=1 fi @@ -1578,7 +1567,7 @@ Please choose whether your device have an active RTC or requires "fake-hwclock": elif [[ $G_WHIP_RETURNED_VALUE == 'I2C frequency' ]]; then # Remove kHz from current - G_WHIP_DEFAULT_ITEM=${rpi_i2cbaudrate_hz% kHz} + G_WHIP_DEFAULT_ITEM=$rpi_i2c_baudrate if G_WHIP_INPUTBOX 'Please enter the required I2C baudrate frequency (kHz).' && G_CHECK_VALIDINT "$G_WHIP_RETURNED_VALUE" 0; then /DietPi/dietpi/func/dietpi-set_hardware i2c $G_WHIP_RETURNED_VALUE @@ -1602,25 +1591,18 @@ Please choose whether your device have an active RTC or requires "fake-hwclock": fi - elif [[ $G_WHIP_RETURNED_VALUE == 'USB boot support' ]]; then - - if (( ! $rpi3_usb_boot_bit_enabled )); then - - if G_WHIP_YESNO 'The following will enable the RPi 3 to boot from USB mass storage devices. A hardware bit "17:3020000a", specific to the device is set to enable the feature. + elif [[ $G_WHIP_RETURNED_VALUE == 'USB boot support' && $rpi3_usb_boot_bit_enabled == 0 ]] && + G_WHIP_YESNO 'The following will enable the RPi 3 to boot from USB mass storage devices. A hardware bit "17:3020000a", specific to the device is set to enable the feature. \nNB:\n - Not all USB mass storage devices are supported\n - The HW bit which enables this setting is non-reversible \nDo you wish to enable USB mass storage boot support?'; then - /DietPi/dietpi/func/dietpi-set_hardware rpi3_usb_boot enable - REBOOT_REQUIRED=1 + /DietPi/dietpi/func/dietpi-set_hardware rpi3_usb_boot enable + REBOOT_REQUIRED=1 - # Reboot now? - G_WHIP_YESNO 'A reboot is required to apply this setting.\n + # Reboot now? + G_WHIP_YESNO 'A reboot is required to apply this setting.\n Please reboot this system once, the HW bit which allows USB boot support will then be set. After which, USB mass storage devices can be used for booting.\n\nWould you like to reboot the system now?' && reboot - fi - - fi - fi fi From 26ecfbbc2a1982d691e44dda5e0ff6a8969a65cc Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 7 Jul 2019 18:12:22 +0200 Subject: [PATCH 007/184] v6.26 + DietPi-Patch | Merge DietPi-Survey settings patches --- dietpi/patch_file | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/dietpi/patch_file b/dietpi/patch_file index cebde646f0..bb1ead65b5 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -658,10 +658,6 @@ _EOF_ fi #------------------------------------------------------------------------------- - #Reset DietPi-Survey settings file due to rework with v6.9 and v6.10 - # - pre-v6.17 dietpi-update rerun assures, dietpi-survey is called after update has finished - [[ -f /DietPi/dietpi/.dietpi-survey ]] && rm /DietPi/dietpi/.dietpi-survey - #------------------------------------------------------------------------------- elif (( $G_DIETPI_VERSION_SUB == 10 )); then @@ -1600,14 +1596,6 @@ _EOF_ rm /etc/X11/xorg.conf G_AGI --reinstall firmware-samsung xf86-video-armsoc-odroid malit628-odroid - fi - #------------------------------------------------------------------------------- - #DietPi-Survey: Remove survey sent count from settings file: https://github.com/MichaIng/DietPi/pull/2626 - if [[ -f '/DietPi/dietpi/.dietpi-survey' ]]; then - - local survey_opted_in=$(sed -n 1p /DietPi/dietpi/.dietpi-survey) - echo $survey_opted_in > /DietPi/dietpi/.dietpi-survey - fi #------------------------------------------------------------------------------- #RPi | Remove "framebuffer_depth" handling: https://github.com/MichaIng/DietPi/pull/2635 @@ -2022,7 +2010,7 @@ Use "dietpi-config" to adjust these settings to your needs.' # DietPi-Survey now uses dietpi.txt for opt in/out state if [[ -f '/DietPi/dietpi/.dietpi-survey' ]]; then - G_CONFIG_INJECT 'SURVEY_OPTED_IN=' "SURVEY_OPTED_IN=$( /etc/environment - [[ -f /etc/default/locale ]] && rm /etc/default/locale + [[ -f '/etc/default/locale' ]] && rm /etc/default/locale # - NB: DEV, any changes here must be also rolled into function '/DietPi/dietpi/func/dietpi-set_software locale', for future script use echo 'en_GB.UTF-8 UTF-8' > /etc/locale.gen @@ -153,8 +153,6 @@ ) - grep -qi 'jessie' /etc/os-release && aWHIP_BRANCH+=( 'jessie-support' 'EOS') #REMOVE v6.24 - if GITBRANCH=$(whiptail --title "$G_PROGRAM_NAME" --menu 'Please select the Git branch the installer should use:' --default-item 'master' --ok-button 'Ok' --cancel-button 'Exit' --backtitle "$G_PROGRAM_NAME" 12 80 3 "${aWHIP_BRANCH[@]}" 3>&1 1>&2 2>&3); then unset aWHIP_BRANCH @@ -259,7 +257,7 @@ ((SETUP_STEP++)) G_DIETPI-NOTIFY 2 '-----------------------------------------------------------------------------------' #------------------------------------------------------------------------------------------------ - if [[ -d /DietPi/dietpi || -d /boot/dietpi ]]; then + if [[ -d '/DietPi/dietpi' || -d '/boot/dietpi' ]]; then G_DIETPI-NOTIFY 2 'DietPi system found, removing the old files and stopping services. (pre-prep)' @@ -395,19 +393,19 @@ '22' ': Generic device (unknown to DietPi)' '' '●─ SBC─(Core devices, with GPU support) ' '52' ': ASUS Tinker Board' - '10' ': Odroid C1' '12' ': Odroid C2' '11' ': Odroid XU3/XU4/HC1/HC2' '44' ': Pinebook 1080p' '0' ': Raspberry Pi (All models)' - # '1' ': Raspberry Pi 1/Zero (512mb)' - # '2' ': Raspberry Pi 2' - # '3' ': Raspberry Pi 3/3+' - # '4' ': Raspberry Pi 4' + #'1' ': Raspberry Pi 1/Zero (512mb)' + #'2' ': Raspberry Pi 2' + #'3' ': Raspberry Pi 3/3+' + #'4' ': Raspberry Pi 4' '' '●─ PC ' '21' ': x86_64 Native PC' - '20' ': x86_64 VMware/VirtualBox' + '20' ': x86_64 Virtual Machine' '' '●─ SBC─(Limited support devices, no GPU support) ' + '10' ': Odroid C1' '53' ': BananaPi (sinovoip)' '51' ': BananaPi Pro (Lemaker)' '50' ': BananaPi M2+ (sinovoip)' @@ -512,9 +510,8 @@ # Distro Selection DISTRO_LIST_ARRAY=( - '3' ': jessie-support' #REMOVE v6.24 '4' ': Stretch (current stable release, recommended)' - '5' ': Buster (testing only, not officially supported)' + '5' ': Buster (next stable release)' ) @@ -578,11 +575,7 @@ done - if (( $DISTRO_TARGET == 3 )); then #REMOVE v6.24 - - DISTRO_TARGET_NAME='jessie' - - elif (( $DISTRO_TARGET == 4 )); then + if (( $DISTRO_TARGET == 4 )); then DISTRO_TARGET_NAME='stretch' @@ -615,7 +608,7 @@ l_message='Extracting DietPi sourcecode' G_RUN_CMD unzip package.zip rm package.zip - [[ -d /boot ]] || l_message='Creating /boot' G_RUN_CMD mkdir -p /boot + [[ -d '/boot' ]] || l_message='Creating /boot' G_RUN_CMD mkdir -p /boot G_DIETPI-NOTIFY 2 'Moving kernel and boot configuration to /boot' @@ -947,18 +940,15 @@ _EOF_ # - Distro is now target (for APT purposes and G_AGX support due to installed binary, its here, instead of after G_AGUP) G_DISTRO=$DISTRO_TARGET G_DISTRO_NAME=$DISTRO_TARGET_NAME + unset DISTRO_TARGET DISTRO_TARGET_NAME G_DIETPI-NOTIFY 2 'Installing core DietPi pre-req APT packages' G_AGI ${aPACKAGES_REQUIRED_INSTALL[@]} - unset aPACKAGES_REQUIRED_INSTALL G_AGA - # Reenable HTTPS for deb.debian.org, since system was dist-upgraded to Stretch+ - (( $G_HW_MODEL > 9 )) && sed -i 's/http:/https:/g' /etc/apt/sources.list - #------------------------------------------------------------------------------------------------ echo '' G_DIETPI-NOTIFY 2 '-----------------------------------------------------------------------------------' @@ -1027,12 +1017,9 @@ _EOF_ for j in /etc/init.d/$i /{etc,lib,usr/lib}/systemd/system/$i.service{,.d} do - if [[ -e $j ]]; then - - [[ -f $j ]] && systemctl disable --now ${j##*/} - rm -R $j - - fi + [[ -e $j ]] || continue + [[ -f $j ]] && systemctl disable --now ${j##*/} + rm -R $j done @@ -1355,8 +1342,7 @@ _EOF_ systemctl mask getty-static # - logind features disabled by default. Usually not needed and all features besides auto getty creation are not available without libpam-systemd package. # - It will be unmasked/enabled, automatically if libpam-systemd got installed during dietpi-software install, usually with desktops. - systemctl stop systemd-logind - systemctl disable systemd-logind &> /dev/null + systemctl disable --now systemd-logind &> /dev/null systemctl mask systemd-logind G_DIETPI-NOTIFY 2 'Configuring regional settings (TZdata):' @@ -1511,12 +1497,12 @@ _EOF_ rm -f /etc/apt/preferences.d/meveric* cat << _EOF_ > /etc/apt/preferences.d/dietpi-meveric-backports Package: * -Pin: release a=jessie-backports +Pin: release a=stretch-backports Pin: origin "fuzon.co.uk" Pin-Priority: 99 Package: * -Pin: release a=jessie-backports +Pin: release a=stretch-backports Pin: origin "oph.mdrjr.net" Pin-Priority: 99 _EOF_ @@ -1566,7 +1552,7 @@ _EOF_ G_DIETPI-NOTIFY 2 'Resetting boot.ini, config.txt, cmdline.txt etc' # - PineA64 - delete ethaddr from uEnv.txt file - (( $G_HW_MODEL == 40 )) && [[ -f /boot/uEnv.txt ]] && sed -i '/^ethaddr/ d' /boot/uEnv.txt + [[ $G_HW_MODEL == 40 && -f '/boot/uEnv.txt' ]] && sed -i '/^ethaddr/ d' /boot/uEnv.txt # - Set Pi cmdline.txt back to normal [[ -f '/boot/cmdline.txt' ]] && sed -i 's/ rootdelay=10//g' /boot/cmdline.txt diff --git a/dietpi/boot b/dietpi/boot index 187bd84b54..000d1c5f4e 100644 --- a/dietpi/boot +++ b/dietpi/boot @@ -9,7 +9,7 @@ #//////////////////////////////////// # # Info: - # - Filename: /DietPi/dietpi/boot + # - Filename: /{DietPi,boot}/dietpi/boot # - Activates on boot from dietpi-boot.service #//////////////////////////////////// @@ -62,9 +62,6 @@ command -v iw &> /dev/null && iw reg set "$(grep -m1 '^[[:blank:]]*CONFIG_WIFI_COUNTRY_CODE=' /DietPi/dietpi.txt | sed 's/^[^=]*=//')" & #---------------------------------------------------------------- # Network failure workarounds - # - Jessie service fails to start: https://github.com/MichaIng/DietPi/issues/2075#issuecomment-424747579 - (( $G_DISTRO == 3 )) && systemctl start networking - # - Failsafe, bring up interfaces, if somehow not done by networking.service. If those are up already, nothing will happen. if grep -qiE '^[[:blank:]]*(allow-hotplug|auto)[[:blank:]]+wlan' /etc/network/interfaces; then diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 9fe43793b9..d1a5e4b23c 100644 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -387,8 +387,7 @@ elif (( $G_WHIP_RETURNED_VALUE == 2 )); then - if (( $G_HW_MODEL < 10 || $G_HW_MODEL == 12 || - ( $G_HW_MODEL == 10 && $G_DISTRO == 3 ) )); then # REMOVE v6.24 + if (( $G_HW_MODEL < 10 || $G_HW_MODEL == 12 )); then G_WHIP_MSG 'GPU/RAM Memory splits are pre-configured and applied during DietPi-Software setup.\n\nThe split value is optimized based on your software installs, however, feel free to tweak them.' TARGETMENUID=6 @@ -974,69 +973,6 @@ 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 - - # Get Current Values - local current_resolution=$(mawk -F '"' '/setenv m "/ {print $2;exit}' /DietPi/boot.ini) - - G_WHIP_MENU_ARRAY=( - - '1080p' ': 1920 x 1080' - '720p' ': 1280 x 720' - '480p' ': 720 x 480' - 'VU7+' ': 1024 x 600' - 'PC1' ': 1024 x 768' - - ) - - G_WHIP_DEFAULT_ITEM=$current_resolution - if G_WHIP_MENU "Hardware : $G_HW_MODEL_DESCRIPTION\nCurrent: $current_resolution"; then - - REBOOT_REQUIRED=1 - - TARGETMENUID=2 # Return to this menu - - # - Always reset to HDMI - sed -i '/setenv vout_mode /c\setenv vout_mode "hdmi"' /DietPi/boot.ini - - case "$G_WHIP_RETURNED_VALUE" in - - '1080p') - - sed -i '/setenv m /c\setenv m "1080p"' /DietPi/boot.ini - - ;; - - '720p') - - sed -i '/setenv m /c\setenv m "720p"' /DietPi/boot.ini - - ;; - - '480p') - - sed -i '/setenv m /c\setenv m "480p"' /DietPi/boot.ini - - ;; - - 'PC1') - - sed -i '/setenv m /c\setenv m "1024x768"' /DietPi/boot.ini - - ;; - - 'VU7+') - - sed -i '/setenv m /c\setenv m "1024x600"' /DietPi/boot.ini - sed -i '/setenv vout_mode /c\setenv vout_mode "dvi"' /DietPi/boot.ini - - ;; - - esac - - fi - # Odroid XU3/4 elif (( $G_HW_MODEL == 11 )); then @@ -2012,10 +1948,6 @@ Current setting: $user_frequency_min_text" && G_CONFIG_INJECT 'CONFIG_CPU_MIN_FR gpu_mem_current=$(grep -m1 '^[[:blank:]]*gpu_mem_1024=' /DietPi/config.txt | sed 's/^[^=]*=//') ram_mem_current=$((ram_mem_total-gpu_mem_current)) - elif (( $G_HW_MODEL == 10 && $G_DISTRO == 3 )); then # REMOVE v6.24 - - gpu_mem_current=$((1024-ram_mem_current)) - elif (( $G_HW_MODEL == 12 )); then gpu_mem_current=$((2048-ram_mem_current)) @@ -2059,58 +1991,6 @@ Current setting: $user_frequency_min_text" && G_CONFIG_INJECT 'CONFIG_CPU_MIN_FR fi - # 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' - - (( $display_output_enabled )) || display_output_text='Off' - (( $display_vpu_enabled )) || display_vpu_text='Off' - - G_WHIP_MENU_ARRAY=( - - '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]\nMemory : $gpu_mem_current MB GPU | $ram_mem_current MB RAM\nNB: GPU/RAM figures require a reboot after a change is made." - if (( $? == 0 )); then - - REBOOT_REQUIRED=1 - - TARGETMENUID=6 # Return to this menu - - case "$G_WHIP_RETURNED_VALUE" in - - 'Headless') - - /DietPi/dietpi/func/dietpi-set_hardware headless 1 - - ;; - - 'Server') - - /DietPi/dietpi/func/dietpi-set_hardware headless 0 - G_CONFIG_INJECT 'setenv vpu ' 'setenv vpu "0"' /DietPi/boot.ini - - ;; - - 'Desktop') - - /DietPi/dietpi/func/dietpi-set_hardware headless 0 - - ;; - - esac - - fi - # Odroid C2 elif (( $G_HW_MODEL == 12 )); then @@ -3229,15 +3109,13 @@ Would you like to disable WiFi? \n - (NOTICE) Connections may drop!'; then WiFi_Monitor_Disable(){ - systemctl stop dietpi-wifi-monitor - systemctl disable dietpi-wifi-monitor + systemctl disable --now dietpi-wifi-monitor } WiFi_Monitor_Enable(){ - systemctl enable dietpi-wifi-monitor - G_RUN_CMD systemctl start dietpi-wifi-monitor + G_RUN_CMD systemctl enable --now dietpi-wifi-monitor } @@ -4125,8 +4003,7 @@ The following will now be applied:\n - CPU gov = Powersave\n - HDMI output = Dis fi # - C2 - if (( $G_HW_MODEL == 12 || - ( $G_HW_MODEL == 10 && $G_DISTRO == 3 ) )); then # REMOVE v6.24 + if (( $G_HW_MODEL == 12 )); then G_WHIP_MENU_ARRAY+=('odroid-hifishield-plus' ': Odroid HiFi Shield 1/Plus') G_WHIP_MENU_ARRAY+=('odroid-hifishield-2' ': Odroid HiFi Shield 2') @@ -4467,17 +4344,6 @@ Please enter a value between $min and $max." && G_CHECK_VALIDINT "$G_WHIP_RETURN 'APT Mirror') - # Jessie ARMv8: https://github.com/MichaIng/DietPi/issues/2665#issuecomment-477348864 - if (( $G_HW_ARCH == 3 && $G_DISTRO < 4 )); then - - G_WHIP_MSG '[ INFO ] Debian has dropped the Jessie ARMv8 branch from the official APT repository.\n -Related packages are now available only from the archive: http://archive.debian.org/debian/\n -This has been applied to your APT sources.list during DietPi update to v6.23 and it cannot be changed.\n -Aborting...' - return - - fi - local failure='' while : do diff --git a/dietpi/dietpi-drive_manager b/dietpi/dietpi-drive_manager index 6ceb8fa38d..c4de3df553 100644 --- a/dietpi/dietpi-drive_manager +++ b/dietpi/dietpi-drive_manager @@ -768,8 +768,7 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return sed -i "s#$rootfstype_current#rootfstype=${aDRIVE_FSTYPE[$MENU_DRIVE_INDEX]}#g" /boot/cmdline.txt # C2/XU4 | /DietPi/boot.ini - elif (( $G_HW_MODEL == 11 || $G_HW_MODEL == 12 || - ( $G_HW_MODEL == 10 && $G_DISTRO == 3 ) )); then # REMOVE v6.24 + elif (( $G_HW_MODEL == 11 || $G_HW_MODEL == 12 )); then # - Find current root= to replace local rootfs_current=$(mawk '{for(i=1;i<=NF;i++) {print $i} }' /DietPi/boot.ini | grep -m1 'root=' | sed 's/\"//') diff --git a/dietpi/dietpi-letsencrypt b/dietpi/dietpi-letsencrypt index 52d7f6dbf9..cdbf94e4ed 100644 --- a/dietpi/dietpi-letsencrypt +++ b/dietpi/dietpi-letsencrypt @@ -9,13 +9,13 @@ #//////////////////////////////////// # # Info: - # - filename /DietPi/dietpi/dietpi-letsencrypt + # - Filename: /{DietPi,boot}/dietpi/dietpi-letsencrypt # - Menu Frontend for Letsencrypt with CLI options for use on DietPi systems. # - # usage: - # - /DietPi/dietpi/dietpi-letsencrypt = Menu - # - /DietPi/dietpi/dietpi-letsencrypt 1 = Create/Renew/Apply cert - #//////////////////////////////////// + USAGE='DietPi-LetsEncrypt usage: + - dietpi-letsencrypt => Open whiptail menu + - dietpi-letsencrypt 1 => Create/Renew/Apply certs non-interactively +' #//////////////////////////////////// # Import DietPi-Globals -------------------------------------------------------------- . /DietPi/dietpi/func/dietpi-globals @@ -32,17 +32,12 @@ # Globals #///////////////////////////////////////////////////////////////////////////////////// FP_LOGFILE='/var/log/dietpi-letsencrypt.log' - - # On Stretch+ the APT package installs a systemd unit for cert renewal. - FP_RENEWAL='/etc/systemd/system/certbot.service.d' - # On Jessie- we install the CertBot from GitHub directly and add a cron job for renewal. - (( $G_DISTRO < 4 )) && FP_RENEWAL='/etc/cron.weekly/dietpi-letsencrypt' - FP_BINARY='/usr/bin/certbot' - (( $G_DISTRO < 4 )) && FP_BINARY='/etc/certbot_scripts/certbot-auto' - [[ -f $FP_BINARY ]] && LETSENCRYPT_INSTALLED=1 || LETSENCRYPT_INSTALLED=0 + # Add post-renewal tasks via systemd unit drop-in + FP_RENEWAL='/etc/systemd/system/certbot.service.d' + LETSENCRYPT_DOMAIN='mydomain.com' LETSENCRYPT_EMAIL='myemail@email.com' LETSENCRYPT_REDIRECT=0 @@ -87,7 +82,7 @@ fi if (( $exit_code )); then - echo "[FAILED] CertBot failed with error code ($exit_code), please check it's terminal output. Aborting..." | tee "$FP_LOGFILE" + echo "[FAILED] CertBot failed with error code ($exit_code), please check it's terminal output. Aborting..." | tee $FP_LOGFILE (( $INPUT )) || G_WHIP_MSG "[FAILURE] CertBot failed with error code ($exit_code), please check it's terminal output. Aborting..." return 1 @@ -113,7 +108,7 @@ fi if (( $exit_code )); then - echo "[FAILED] CertBot failed with error code ($exit_code), please check it's terminal output. Aborting..." | tee "$FP_LOGFILE" + echo "[FAILED] CertBot failed with error code ($exit_code), please check it's terminal output. Aborting..." | tee $FP_LOGFILE (( $INPUT )) || G_WHIP_MSG "[FAILURE] CertBot failed with error code ($exit_code), please check it's terminal output. Aborting..." return 1 @@ -123,23 +118,19 @@ cat "$fp_cert_dir/privkey.pem" "$fp_cert_dir/cert.pem" > "$fp_cert_dir/combined.pem" if [[ ! -f $fp_cert_dir/combined.pem ]]; then - echo "[FAILED] $fp_cert_dir/combined.pem could not be created. Please check existence of privkey.pem and cert.pem within this folder, as result of CertBot execution. Aborting..." | tee "$FP_LOGFILE" + echo "[FAILED] $fp_cert_dir/combined.pem could not be created. Please check existence of privkey.pem and cert.pem within this folder, as result of CertBot execution. Aborting..." | tee $FP_LOGFILE (( $INPUT )) || G_WHIP_MSG "[FAILED] $fp_cert_dir/combined.pem could not be created. Please check existence of privkey.pem and cert.pem within this folder, as result of CertBot execution. Aborting..." return 1 fi # - Add Lighttpd renewal to certbot systemd service - if (( $G_DISTRO > 3 )); then - - [[ -d $FP_RENEWAL ]] || mkdir "$FP_RENEWAL" - cat << _EOF_ > "$FP_RENEWAL"/dietpi-lighttpd.conf + [[ -d $FP_RENEWAL ]] || mkdir "$FP_RENEWAL" + cat << _EOF_ > "$FP_RENEWAL"/dietpi-lighttpd.conf [Service] ExecStartPost=/bin/dash -c 'cat "$fp_cert_dir/privkey.pem" "$fp_cert_dir/cert.pem" > "$fp_cert_dir/combined.pem"' _EOF_ - fi - # - Allow adding environment variables via: setenv.add-environment G_CONFIG_INJECT '"mod_setenv"' ' "mod_setenv",' /etc/lighttpd/lighttpd.conf '"mod_.+",' @@ -176,7 +167,7 @@ _EOF_ (( $G_DISTRO > 4 )) && sed -i '1i\server.modules += ( "mod_openssl" )\n' /etc/lighttpd/conf-enabled/letsencrypt.conf # - Redirect - [[ -f /etc/lighttpd/conf-enabled/redirect.conf ]] && rm /etc/lighttpd/conf-enabled/redirect.conf + [[ -f '/etc/lighttpd/conf-enabled/redirect.conf' ]] && rm /etc/lighttpd/conf-enabled/redirect.conf if (( $LETSENCRYPT_REDIRECT )); then cat << _EOF_ > /etc/lighttpd/conf-enabled/redirect.conf @@ -201,7 +192,7 @@ _EOF_ _EOF_ lighttpd-enable-mod dietpi-hsts - elif [[ -f /etc/lighttpd/conf-available/99-dietpi-hsts.conf ]]; then + elif [[ -f '/etc/lighttpd/conf-available/99-dietpi-hsts.conf' ]]; then lighttpd-disable-mod dietpi-hsts rm /etc/lighttpd/conf-available/99-dietpi-hsts.conf @@ -226,7 +217,7 @@ _EOF_ (( $LETSENCRYPT_HSTS )) && options+=' --hsts' # - Cert me up Nginx - if [[ -f $fp_cert_dir/cert.pem ]]; then + if [[ -f $fp_cert_dir'/cert.pem' ]]; then $FP_BINARY renew local exit_code=$? @@ -239,7 +230,7 @@ _EOF_ fi if (( $exit_code )); then - echo "[FAILURE] CertBot failed with error code ($exit_code), please check it's terminal output. Aborting..." | tee "$FP_LOGFILE" + echo "[FAILURE] CertBot failed with error code ($exit_code), please check it's terminal output. Aborting..." | tee $FP_LOGFILE (( $INPUT )) || G_WHIP_MSG "[FAILURE] CertBot failed with error code ($exit_code), please check it's terminal output. Aborting..." return 1 @@ -248,8 +239,8 @@ _EOF_ # - Apply HSTS header to ownCloud/Nextcloud config if (( $LETSENCRYPT_HSTS )); then - [[ -f /etc/nginx/sites-dietpi/dietpi-owncloud.conf ]] && sed -i 's/#add_header Strict-Transport-Security/add_header Strict-Transport-Security/g' /etc/nginx/sites-dietpi/dietpi-owncloud.conf - [[ -f /etc/nginx/sites-dietpi/dietpi-nextcloud.conf ]] && sed -i 's/#add_header Strict-Transport-Security/add_header Strict-Transport-Security/g' /etc/nginx/sites-dietpi/dietpi-nextcloud.conf + [[ -f '/etc/nginx/sites-dietpi/dietpi-owncloud.conf' ]] && sed -i 's/#add_header Strict-Transport-Security/add_header Strict-Transport-Security/g' /etc/nginx/sites-dietpi/dietpi-owncloud.conf + [[ -f '/etc/nginx/sites-dietpi/dietpi-nextcloud.conf' ]] && sed -i 's/#add_header Strict-Transport-Security/add_header Strict-Transport-Security/g' /etc/nginx/sites-dietpi/dietpi-nextcloud.conf fi @@ -261,7 +252,7 @@ _EOF_ # - Cert me up /DietPi/dietpi/dietpi-services stop - if [[ -f $fp_cert_dir/cert.pem ]]; then + if [[ -f $fp_cert_dir'/cert.pem' ]]; then $FP_BINARY renew local exit_code=$? @@ -274,7 +265,7 @@ _EOF_ fi if (( $exit_code )); then - echo "[FAILURE] CertBot failed with error code ($exit_code), please check it's terminal output. Aborting..." | tee "$FP_LOGFILE" + echo "[FAILURE] CertBot failed with error code ($exit_code), please check it's terminal output. Aborting..." | tee $FP_LOGFILE (( $INPUT )) || G_WHIP_MSG "[FAILURE] CertBot failed with error code ($exit_code), please check it's terminal output. Aborting..." return 1 @@ -326,21 +317,17 @@ _EOF_ G_RUN_CMD chmod +x /home/minio-user/.minio/dietpi-cert-renewl.sh # Add Minio renewal to certbot system service - if (( $G_DISTRO > 3 )); then - - [[ -d $FP_RENEWAL ]] || mkdir "$FP_RENEWAL" - cat << _EOF_ > "$FP_RENEWAL"/dietpi-minio.conf + [[ -d $FP_RENEWAL ]] || mkdir "$FP_RENEWAL" + cat << _EOF_ > "$FP_RENEWAL"/dietpi-minio.conf [Service] ExecStartPost=/home/minio-user/.minio/dietpi-cert-renewl.sh &>> $FP_LOGFILE _EOF_ - fi - - echo '[ INFO ] HTTPS redirect and HSTS is not supported for Minio, thus will be ignored.' | tee "$FP_LOGFILE" + echo '[ INFO ] HTTPS redirect and HSTS is not supported for Minio, thus will be ignored.' | tee $FP_LOGFILE else - echo '[FAILURE] No compatible and/or active webserver was found. Aborting...' | tee "$FP_LOGFILE" + echo '[FAILURE] No compatible and/or active webserver was found. Aborting...' | tee $FP_LOGFILE (( $INPUT )) || G_WHIP_YESNO '[FAILURE] No compatible and/or active webserver was found.\n Currently DietPi-LetsEncrypt configures the following web applications: - Apache2 (webserver) @@ -352,50 +339,16 @@ Would you like to switch to DietPi-Software, to install one of the above?' && /D fi - # ALL | Create cert renewal cron job on Jessie-: - if (( $G_DISTRO < 4 )); then - - cat << _EOF_ > "$FP_RENEWAL" -#!/bin/bash -{ - #//////////////////////////////////// - # DietPi-LetsEncrypt Autorenew script - # - #//////////////////////////////////// - # - # Info: - # - Location $FP_RENEWAL - # - #//////////////////////////////////// - - #---------------------------------------------------------------- - # Main Loop - #---------------------------------------------------------------- - - $FP_BINARY -q renew &>> $FP_LOGFILE - [[ -f /home/minio-user/.minio/dietpi-cert-renewl.sh ]] && /home/minio-user/.minio/dietpi-cert-renewl.sh &>> $FP_LOGFILE - [[ -f $fp_cert_dir/combined.pem ]] && cat "$fp_cert_dir/privkey.pem" "$fp_cert_dir/cert.pem" > "$fp_cert_dir/combined.pem" 2>> $FP_LOGFILE - - #---------------------------------------------------------------- - exit - #---------------------------------------------------------------- -} -_EOF_ - G_RUN_CMD chmod +x "$FP_RENEWAL" - - else - - systemctl daemon-reload - - fi + # ALL | Relead systemd daemon to apply unit changes + systemctl daemon-reload #------------------------------------------------------------------------------------------------------ if (( ! $INPUT )); then - echo '' - read -p 'Press any key to continue...' - echo '' + read -p ' +Press any key to continue... +' fi @@ -437,17 +390,7 @@ _EOF_ Menu_Exit(){ G_WHIP_SIZE_X_MAX=50 - if G_WHIP_YESNO "Exit $G_PROGRAM_NAME?"; then - - # Exit - TARGETMENUID=-1 - - else - - # Return to Main Menu - TARGETMENUID=0 - - fi + G_WHIP_YESNO "Exit $G_PROGRAM_NAME?" && TARGETMENUID=-1 # Exit } @@ -470,7 +413,7 @@ _EOF_ } - #TARGETMENUID=0 + # TARGETMENUID=0 Menu_Main(){ local hsts_text='[Off] | No HTTP Strict Transport Security' @@ -565,8 +508,8 @@ Are you sure that you want to enable HTTP Strict Transport Security?' && LETSENC - Automatically apply and enable your SSL cert - NB: This process can take a long time, please be patient. - NB: HTTPS will automatically be applied to the webserver and applications which use "/var/www/*". - Applications which use their own webserver (these usually have their own :port number), will not be available under HTTPS, and, these will need to be configured manually.\n -Would you like to continue?'; then + Applications which use their own webserver (these usually have their own :port number), will not be available under HTTPS, and, these will need to be configured manually. +\nWould you like to continue?'; then Write_Settings_File Run_Lets_Encrypt @@ -580,7 +523,6 @@ Would you like to continue?'; then else - # Exit Menu_Exit fi @@ -610,11 +552,11 @@ Would you like to continue?'; then G_DIETPI-NOTIFY 1 "CertBot binary not found ( $FP_BINARY )" G_DIETPI-NOTIFY 2 'Please install CertBot with DietPi-Software before running this program.' - read -p 'Press any key to continue.....' + read -p 'Press any key to continue...' else - echo "[FAILURE] CertBot binary not found ( $FP_BINARY ), please install it with DietPi-Software. Aborting..." | tee "$FP_LOGFILE" + echo "[FAILURE] CertBot binary not found ( $FP_BINARY ), please install it with DietPi-Software. Aborting..." | tee $FP_LOGFILE fi @@ -625,8 +567,7 @@ Would you like to continue?'; then while (( $TARGETMENUID > -1 )); do printf '\ec' # clear current terminal screen - - (( $TARGETMENUID == 0 )) && Menu_Main + Menu_Main done @@ -639,9 +580,8 @@ Would you like to continue?'; then else - G_DIETPI-NOTIFY 2 'DietPi-LetsEncrypt usage:' - G_DIETPI-NOTIFY 2 ' dietpi-letsencrypt => Open whiptail menu' - G_DIETPI-NOTIFY 2 ' dietpi-letsencrypt 1 => Create/Renew/Apply certs non-interactively' + G_DIETPI-NOTIFY 1 "Invalid input argument +\n$USAGE" fi diff --git a/dietpi/dietpi-services b/dietpi/dietpi-services index 81147ac86d..1ce13705cd 100644 --- a/dietpi/dietpi-services +++ b/dietpi/dietpi-services @@ -73,7 +73,6 @@ Available services: # - Databases 'redis-server' 'mariadb' - #'mysql' # Applied on Jessie systems during availability check: https://github.com/MichaIng/DietPi/issues/1000#issuecomment-30776051 # - PHP 'php5-fpm' @@ -332,9 +331,6 @@ _EOF_ [[ ${aSERVICE_NAME[$i]} ]] || { unset aSERVICE_NAME[$i]; continue; } # Failsafe - # Below Stretch, "mariadb" systemd service does not exist, thus "mysql" init.d service will be used. - (( $G_DISTRO < 4 )) && [[ ${aSERVICE_NAME[$i]} == 'mariadb' ]] && aSERVICE_NAME[$i]='mysql' - for j in /{etc,lib,usr/lib}/systemd/system/"${aSERVICE_NAME[$i]}.service" /etc/init.d/"${aSERVICE_NAME[$i]}" do @@ -1293,13 +1289,13 @@ NB: This only has an effect on drives handled by the CFQ scheduler."; then while (( $MENU_TARGETID > -1 )) do - if (( $MENU_TARGETID == 0 )); then + if (( $MENU_TARGETID == 1 )); then - Menu_Main + Menu_Service - elif (( $MENU_TARGETID == 1 )); then + else - Menu_Service + Menu_Main fi diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 52469bf456..3ee1e952fa 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -214,9 +214,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it # - and distro specific MariaDB service name FP_PHP_BASE_DIR='/etc/php/7.3' PHP_NAME='php7.3' - # MariaDB: On Jessie it is still shipped with /etc/init.d/mysql only - MARIADB_SERVICE='mariadb' - (( $G_DISTRO < 4 )) && MARIADB_SERVICE='mysql' USBDRIVE=0 @@ -408,27 +405,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it # Remote Desktops #-------------------------------------------------------------------------------- - software_id=27 - - aSOFTWARE_WHIP_NAME[$software_id]='TightVNC Server' - aSOFTWARE_WHIP_DESC[$software_id]='desktop for remote connection' - aSOFTWARE_CATEGORY_INDEX[$software_id]=1 - aSOFTWARE_TYPE[$software_id]=0 - aSOFTWARE_REQUIRES_DESKTOP[$software_id]=1 - aSOFTWARE_ONLINEDOC_URL[$software_id]='p=408#p408' - - # - ARMv8 - aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,3]=0 - - # - Stretch+: Replaced by TigerVNC (VNC4) - for ((i=4; i<=$MAX_G_DISTRO; i++)) - do - - aSOFTWARE_AVAIL_G_DISTRO[$software_id,$i]=0 - - done - - #------------------ software_id=28 aSOFTWARE_WHIP_NAME[$software_id]='VNC4 Server' @@ -500,7 +476,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,52]=1 # - C1 Stretch - (( $G_DISTRO > 3 )) & aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,10]=0 + aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,10]=0 #------------------ software_id=32 @@ -628,9 +604,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it # - ARMv6: https://github.com/MichaIng/DietPi/issues/534#issuecomment-416405968 aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0 - # - ARM on Jessie: https://github.com/MichaIng/DietPi/issues/2521 - (( $G_DISTRO < 4 )) && aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,2]=0 && aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,3]=0 - #------------------ software_id=42 @@ -1172,7 +1145,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it # + x86_64 aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,21]=1 - #------------------ software_id=112 @@ -1353,9 +1325,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it done - # - Jessie: https://github.com/MichaIng/DietPi/pull/1992#issuecomment-410772255 - aSOFTWARE_AVAIL_G_DISTRO[$software_id,3]=0 - #------------------ # Camera @@ -1389,9 +1358,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_FFMPEG[$software_id]=1 aSOFTWARE_REQUIRES_BUILDESSENTIAL[$software_id]=1 - # - Jessie - aSOFTWARE_AVAIL_G_DISTRO[$software_id,3]=0 - #------------------ # WiFi Hotspot @@ -1461,7 +1427,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=9 aSOFTWARE_TYPE[$software_id]=0 # Node.js only required for our custom package - (( $G_DISTRO < 4 || ( $G_HW_MODEL < 10 && $G_DISTRO < 5 ) )) && aSOFTWARE_REQUIRES_NODEJS[$software_id]=1 + (( $G_HW_MODEL < 10 && $G_DISTRO < 5 )) && aSOFTWARE_REQUIRES_NODEJS[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1611#p1611' #------------------ @@ -2059,9 +2025,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_ONLINEDOC_URL[$software_id]='p=6630#p6630' aSOFTWARE_REQUIRES_RSYSLOG[$software_id]=1 # Not required, but comes in as package dep - # - ARMv8 on Jessie: https://github.com/MichaIng/DietPi/issues/855#issuecomment-292712002 - (( $G_DISTRO == 3 )) && aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,3]=0 - #------------------ software_id=153 @@ -2323,9 +2286,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_WHIP_DESC[$software_id]='heavily refactored vim fork' aSOFTWARE_CATEGORY_INDEX[$software_id]=7 aSOFTWARE_TYPE[$software_id]=1 - - # - Jessie - aSOFTWARE_AVAIL_G_DISTRO[$software_id,3]=0 #------------------ # Desktop Utilities @@ -2461,7 +2421,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it # Additional software that requires VNC4 Server # - XRDP: https://github.com/MichaIng/DietPi/issues/1727 software_id=28 - if (( $G_DISTRO > 3 && ${aSOFTWARE_INSTALL_STATE[29]} == 1 )); then + if (( ${aSOFTWARE_INSTALL_STATE[29]} == 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" @@ -2519,19 +2479,15 @@ DietPi-Software will decrypt and use it for software installs. You can change it # Software that requires LibSSL1.0.0, Stretch+ only # - Jackett (147) - if (( $G_DISTRO > 3 )); then - - software_id=126 - if (( ${aSOFTWARE_INSTALL_STATE[37]} == 1 || - ${aSOFTWARE_INSTALL_STATE[60]} == 1 || - ${aSOFTWARE_INSTALL_STATE[97]} == 1 || - ${aSOFTWARE_INSTALL_STATE[134]} == 1 || - ${aSOFTWARE_INSTALL_STATE[147]} == 1 )); then - - aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + software_id=126 + if (( ${aSOFTWARE_INSTALL_STATE[37]} == 1 || + ${aSOFTWARE_INSTALL_STATE[60]} == 1 || + ${aSOFTWARE_INSTALL_STATE[97]} == 1 || + ${aSOFTWARE_INSTALL_STATE[134]} == 1 || + ${aSOFTWARE_INSTALL_STATE[147]} == 1 )); then - fi + aSOFTWARE_INSTALL_STATE[$software_id]=1 + G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" fi @@ -3316,13 +3272,7 @@ Package: *php7.3*\nPin: release *\nPin-Priority: -1' > /etc/apt/preferences.d/di if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then Banner_Installing - - local package_list='nfs-kernel-server rpcbind' - - # On Jessie, nfs-kernel-server does not depend on netbase, which is needed for NFS server to start: https://packages.debian.org/jessie/nfs-kernel-server - (( $G_DISTRO < 4 )) && package_list+=' netbase' - - G_AGI $package_list + G_AGI nfs-kernel-server rpcbind fi @@ -3332,7 +3282,7 @@ Package: *php7.3*\nPin: release *\nPin-Priority: -1' > /etc/apt/preferences.d/di Banner_Installing local package_list='apache2' # - Install certbot module on Stretch+, if certbot was already installed - (( ${aSOFTWARE_INSTALL_STATE[92]} == 2 && $G_DISTRO > 3 )) && package_list+=' python-certbot-apache' + (( ${aSOFTWARE_INSTALL_STATE[92]} == 2 )) && package_list+=' python-certbot-apache' G_AGI $package_list fi @@ -3343,7 +3293,7 @@ Package: *php7.3*\nPin: release *\nPin-Priority: -1' > /etc/apt/preferences.d/di Banner_Installing local package_list='nginx-light' # - Install certbot module on Stretch+, if certbot was already installed - (( ${aSOFTWARE_INSTALL_STATE[92]} == 2 && $G_DISTRO > 3 )) && package_list+=' python-certbot-nginx' + (( ${aSOFTWARE_INSTALL_STATE[92]} == 2 )) && package_list+=' python-certbot-nginx' G_AGI $package_list fi @@ -3396,7 +3346,7 @@ Package: *php7.3*\nPin: release *\nPin-Priority: -1' > /etc/apt/preferences.d/di G_AGI "$package_list" # - Remove mysql.service as we use mariadb.service, both cannot exist: https://github.com/MichaIng/DietPi/issues/1913#issuecomment-441343798 - if [[ -f '/etc/init.d/mysql' ]] && (( $G_DISTRO > 3 )); then + if [[ -f '/etc/init.d/mysql' ]]; then G_DIETPI-NOTIFY 2 'Switching from /etc/init.d/mysql to mariadb.service' systemctl stop mysql @@ -3427,19 +3377,6 @@ Package: *php7.3*\nPin: release *\nPin-Priority: -1' > /etc/apt/preferences.d/di (( ${aSOFTWARE_INSTALL_STATE[89]} == 2 )) && package_list+=" $PHP_NAME-redis" G_AGI $package_list - # Fix wrong permissions from Jessie package: https://github.com/MichaIng/DietPi/issues/2736 - # - /run/redis is created but on boot as well with wrong root:root permissions, so we need to fix that via ExecStartPre - if (( $G_DISTRO < 4 )); then - - mkdir -p /etc/systemd/system/redis-server.service.d - echo "[Service] -PermissionsStartOnly=true -ExecStartPre=$(command -v mkdir) -p /run/redis /var/lib/redis -ExecStartPre=$(command -v chown) -R redis:redis /run/redis /var/lib/redis" > /etc/systemd/system/redis-server.service.d/dietpi-fix_permissions.conf - systemctl daemon-reload - - fi - fi software_id=89 # PHP @@ -3447,7 +3384,7 @@ ExecStartPre=$(command -v chown) -R redis:redis /run/redis /var/lib/redis" > /et Banner_Installing - # Jessie + Stretch: Add Ondrejs PHP repository for latest PHP version (currently PHP7.3) + # Stretch: Add Ondrejs PHP repository for latest PHP version (currently PHP7.3) if (( $G_DISTRO < 5 )); then # - Debian (+sury.org) armhf is not ARMv6 compatible: https://github.com/MichaIng/DietPi/issues/2794 @@ -3456,8 +3393,6 @@ ExecStartPre=$(command -v chown) -R redis:redis /run/redis /var/lib/redis" > /et INSTALL_URL_ADDRESS='http://raspbian.raspberrypi.org/raspbian' # - Actually we do not support any non-RPi ARMv6 devices currently, but lets be failsafe here (( $G_HW_MODEL > 9 )) && INSTALL_URL_ADDRESS='https://deb.debian.org/debian/' - # - Jessie does not like https://deb.debian.org - (( $G_DISTRO < 4 )) && INSTALL_URL_ADDRESS=${INSTALL_URL_ADDRESS/https/http} # - APT source echo "deb $INSTALL_URL_ADDRESS buster main" > /etc/apt/sources.list.d/dietpi-php.list @@ -3471,32 +3406,6 @@ Package: *\nPin: release n=buster\nPin-Priority: 100' > /etc/apt/preferences.d/d else - # Jessie: https://github.com/MichaIng/DietPi/issues/1620#issuecomment-373086888 - if (( $G_DISTRO < 4 )); then - - INSTALL_URL_ADDRESS='https://dietpi.com/downloads/binaries/all/libssl1.1_1.1.0f-3+deb9u1_' - - # - ARMv7 - if (( $G_HW_ARCH < 3 )); then - - INSTALL_URL_ADDRESS+='armhf.deb' - - # - ARM64 - elif (( $G_HW_ARCH == 3 )); then - - INSTALL_URL_ADDRESS+='arm64.deb' - - # - x86_64 - elif (( $G_HW_ARCH == 10 )); then - - INSTALL_URL_ADDRESS+='amd64.deb' - - fi - - Download_Install "$INSTALL_URL_ADDRESS" - - fi - # - Check URL INSTALL_URL_ADDRESS='https://packages.sury.org/php/apt.gpg' G_CHECK_URL "$INSTALL_URL_ADDRESS" @@ -3555,7 +3464,7 @@ Package: openssl libssl*\nPin: origin packages.sury.org\nPin-Priority: -1' > /et Banner_Installing # MariaDB must be running during install to allow debconf setup. - G_RUN_CMD systemctl start $MARIADB_SERVICE + G_RUN_CMD systemctl start mariadb # Set password parameters before installing debconf-set-selections <<< 'phpmyadmin phpmyadmin/dbconfig-install boolean true' @@ -3589,24 +3498,8 @@ We work around this error by running APT a second time. Please do not worry and Banner_Installing - # Jessie- - if (( $G_DISTRO < 4 )); then - - # MPD not available in Jessie repo for ARMv8 - if (( $G_HW_ARCH == 3 )); then - - # libupnp6 for net discov with upnp/avahi - DEPS_LIST='libupnp6 libwrap0 libmpdclient2 libao-common libao4 libasyncns0 libaudiofile1 libavahi-client3 libavahi-common-data libavahi-common3 libavcodec56 libavformat56 libavresample2 libavutil54 libbinio1ldbl libcaca0 libcdio-cdda1 libcdio-paranoia1 libcdio13 libcups2 libcurl3-gnutls libdirectfb-1.2-9 libdnet libfaad2 libflac8 libfluidsynth1 libgme0 libgomp1 libgsm1 libice6 libid3tag0 libiso9660-8 libjack-jackd2-0 libjson-c2 libldb1 libmad0 libmikmod3 libmms0 libmodplug1 libmp3lame0 libmpcdec6 libmpg123-0 libnfs4 libntdb1 libogg0 libopenal-data libopenal1 libopenjpeg5 libopus0 liborc-0.4-0 libpulse0 libresid-builder0c2a libroar2 libsamplerate0 libschroedinger-1.0-0 libsdl1.2debian libshout3 libsidplay2 libsidutils0 libslp1 libsm6 libsmbclient libsndfile1 libsoxr0 libspeex1 libspeexdsp1 libsqlite3-0 libtalloc2 libtdb1 libtevent0 libtheora0 libva1 libvorbis0a libvorbisenc2 libvorbisfile3 libvpx1 libwavpack1 libwbclient0 libwildmidi-config libwildmidi1 libx11-6 libx11-data libx11-xcb1 libx264-142 libxau6 libxcb1 libxdmcp6 libxext6 libxi6 libxtst6 libxvidcore4 libyajl2 libzzip-0-13 mime-support python python-talloc python2.7 samba-libs x11-common file' - Download_Install 'https://dietpi.com/downloads/binaries/all/mpd_0.20.23-1_aarch64.deb' - - else - - G_AGI mpd - - fi - # Stretch - elif (( $G_DISTRO == 4 )); then + if (( $G_DISTRO < 5 )); then DEPS_LIST='libnfs8 libsmbclient libsqlite3-0 libupnp6 libwrap0 libmpdclient2 libflac8 libyajl2 libavahi-client3 libvorbisfile3 libwavpack1 libmad0 libmpg123-0 libopus0 libavformat57 libfaad2 libcdio-paranoia1 libiso9660-8 libshout3 libid3tag0' Download_Install "https://dietpi.com/downloads/binaries/all/mpd_0.20.23-1_$G_HW_ARCH_DESCRIPTION.deb" @@ -3803,32 +3696,6 @@ _EOF_ Banner_Installing - # Jessie: https://github.com/MichaIng/DietPi/issues/1620#issuecomment-373086888 - if (( $G_DISTRO == 3 )); then - - INSTALL_URL_ADDRESS='https://dietpi.com/downloads/binaries/all/libssl1.1_1.1.0f-3+deb9u1_' - - # - ARMv7 - if (( $G_HW_ARCH < 3 )); then - - INSTALL_URL_ADDRESS+='armhf.deb' - - # - ARM64 - elif (( $G_HW_ARCH == 3 )); then - - INSTALL_URL_ADDRESS+='arm64.deb' - - # - x86_64 - elif (( $G_HW_ARCH == 10 )); then - - INSTALL_URL_ADDRESS+='amd64.deb' - - fi - - Download_Install "$INSTALL_URL_ADDRESS" - - fi - Download_Install 'https://dietpi.com/downloads/binaries/all/ympd_1.2.3.7z' local binary_name='ympd_' @@ -3854,16 +3721,8 @@ _EOF_ fi - # Buster workaround, since we have no Buster binaries yet - if (( $G_DISTRO > 3 )); then - - binary_name+='_stretch' - - else - - binary_name+="_$G_DISTRO_NAME" - - fi + # We have no Buster binaries yet, so always use Stretch binaries + binary_name+='_stretch' mv $binary_name /usr/bin/ympd chmod +x /usr/bin/ympd @@ -3967,16 +3826,8 @@ _EOF_ [[ -f '/etc/mopidy/mopidy.conf' ]] || dps_index=$software_id Download_Install 'mopidy.conf' /etc/mopidy/mopidy.conf curl -sSL "$INSTALL_URL_ADDRESS" | apt-key add - - # No Buster list available yet, use stretch.list for testing: - if (( $G_DISTRO > 3 )); then - - wget https://apt.mopidy.com/stretch.list -O /etc/apt/sources.list.d/mopidy.list - - else - - wget https://apt.mopidy.com/"$G_DISTRO_NAME".list -O /etc/apt/sources.list.d/mopidy.list - - fi + # No Buster list available yet, use stretch.list always instead + wget https://apt.mopidy.com/stretch.list -O /etc/apt/sources.list.d/mopidy.list G_AGUP G_AGI mopidy gstreamer1.0-alsa @@ -4021,11 +3872,7 @@ _EOF_ package_list+=' libcurl3-gnutls' # - NFS/CEC support - if (( $G_DISTRO < 4 )); then - - package_list+=' libnfs4 libcec3v4' - - elif (( $G_DISTRO == 4 )); then + if (( $G_DISTRO < 5 )); then package_list+=' libnfs8 libcec4' @@ -4484,14 +4331,6 @@ _EOF_ # Packages local apackages=() - # - Jessie: Requires Stretch packages - if (( $G_DISTRO < 4 )); then - - apackages+=("https://dietpi.com/downloads/binaries/jessie/gcc-6-base_$G_HW_ARCH_DESCRIPTION.deb") - apackages+=("https://dietpi.com/downloads/binaries/jessie/libstdc++6_$G_HW_ARCH_DESCRIPTION.deb") - - fi - # - ARMv6/7 if (( $G_HW_ARCH < 3 )); then @@ -4643,25 +4482,11 @@ _EOF_ fi - software_id=27 # TightVNC Server - if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then - - Banner_Installing - G_AGI tightvncserver x11vnc - - fi - software_id=28 # VNC4 Server if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then Banner_Installing - - local package_list='vnc4server x11vnc' - - # Stretch+ - (( $G_DISTRO > 3 )) && package_list+=' tigervnc-common' - - G_AGI $package_list + G_AGI 'vnc4server x11vnc tigervnc-common' fi @@ -4704,17 +4529,7 @@ port = ssh port = ssh _EOF_ - if (( $G_DISTRO > 3 )); then - - G_AGI python3-systemd fail2ban - - # On Jessie, the systemd backend is not yet supported, so we install the Stretch package manually - else - - DEPS_LIST='python3-systemd' - Download_Install 'https://dietpi.com/downloads/binaries/all/fail2ban.deb' - - fi + G_AGI python3-systemd fail2ban fi @@ -4878,11 +4693,6 @@ _EOF_ kernel_packages='raspberrypi-bootloader raspberrypi-kernel libraspberrypi-bin libraspberrypi0 raspberrypi-kernel-headers' - # - Odroid C1: REMOVE v6.24 - elif (( $G_HW_MODEL == 10 && $G_DISTRO == 3 )); then - - kernel_packages='linux-image-armhf-odroid-c1 linux-headers-armhf-odroid-c1' - # - Odroid XU4 elif (( $G_HW_MODEL == 11 )); then @@ -4957,34 +4767,17 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior Banner_Installing - if (( $G_DISTRO > 3 )); then - - if (( ${aSOFTWARE_INSTALL_STATE[83]} > 0 )); then - - G_AGI certbot python-certbot-apache - - elif (( ${aSOFTWARE_INSTALL_STATE[85]} > 0 )); then - - G_AGI certbot python-certbot-nginx + if (( ${aSOFTWARE_INSTALL_STATE[83]} > 0 )); then - else + G_AGI certbot python-certbot-apache - G_AGI certbot + elif (( ${aSOFTWARE_INSTALL_STATE[85]} > 0 )); then - fi + G_AGI certbot python-certbot-nginx else - # - Remove/Update existing certbot installer scripts - [[ -d '/etc/certbot_scripts' ]] && rm -R /etc/certbot_scripts - - Download_Install 'https://github.com/certbot/certbot/archive/master.zip' /etc - mv /etc/certbot* /etc/certbot_scripts - - # - Install packages - cd /etc/certbot_scripts - ./certbot-auto -n --os-packages-only - cd /tmp/$G_PROGRAM_NAME + G_AGI certbot fi @@ -5162,7 +4955,7 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior # Netdata v1.12 available on Debian stretch-backports and Raspbian/Debian Buster # => Only install our custom package on Jessie and RPi Stretch - if (( $G_DISTRO < 4 || ( $G_HW_MODEL < 10 && $G_DISTRO < 5 ) )); then + if (( $G_HW_MODEL < 10 && $G_DISTRO < 5 )); then DEPS_LIST='zlib1g-dev' Download_Install "https://dietpi.com/downloads/binaries/all/netdata_1.11.1-1_$G_HW_ARCH_DESCRIPTION.deb" @@ -5346,8 +5139,6 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior DEPS_LIST='rtorrent mediainfo' # On Buster, no "screen" is required to run rTorrent as daemon: https://github.com/rakshasa/rtorrent/wiki/Daemon_Mode (( $G_DISTRO < 5 )) && DEPS_LIST+=' screen' - # On Jessie, nginx-full is required for SCGI module: https://github.com/MichaIng/DietPi/issues/1240 - (( $G_DISTRO < 4 && ${aSOFTWARE_INSTALL_STATE[85]} > 0 )) && DEPS_LIST+=' nginx-full' # Install ruTorrent: Web UI for rTorrent # - Get current version string @@ -5383,49 +5174,10 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior Banner_Installing - if (( $G_DISTRO > 3 )); then - - G_AGI aria2 - - else - - # aria2c binary - INSTALL_URL_ADDRESS='https://dietpi.com/downloads/binaries/all/aria2_' - - # - armv6 - if (( $G_HW_ARCH == 1 )); then - - INSTALL_URL_ADDRESS+='armv6.7z' - - # - armv7+ - elif (( $G_HW_ARCH == 2 )); then - - INSTALL_URL_ADDRESS+='armv7.7z' - - # - arm64 - elif (( $G_HW_ARCH == 3 )); then - - INSTALL_URL_ADDRESS+='arm64.7z' - - # - x86_64 - elif (( $G_HW_ARCH == 10 )); then - - INSTALL_URL_ADDRESS+='x86_64.7z' - - fi - - # - prereqs - DEPS_LIST='libc-ares2' - Download_Install "$INSTALL_URL_ADDRESS" - - mv aria2_* /usr/local/bin/aria2c - chmod +x /usr/local/bin/aria2c - - fi + G_AGI aria2 # Web interface Download_Install 'https://github.com/ziahamza/webui-aria2/archive/master.zip' - cp -R webui-aria2-master /var/www/aria2 rm -R webui-aria2-master @@ -5436,8 +5188,7 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior Banner_Installing - DEPS_LIST='mediainfo python' - (( $G_DISTRO > 3 )) && DEPS_LIST+='3' + DEPS_LIST='mediainfo python3' if [[ -d $G_FP_DIETPI_USERDATA/medusa ]]; then @@ -5515,7 +5266,7 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior elif (( $G_HW_ARCH == 10 )); then INSTALL_URL_ADDRESS1='https://dietpi.com/downloads/binaries/all/libjpeg8_8d1-2_amd64.deb' - (( $G_DISTRO > 3 )) && INSTALL_URL_ADDRESS2='https://dietpi.com/downloads/binaries/all/libpng12-0_1.2.50-2+deb8u3_amd64.deb' || DEPS_LIST+=' libpng12-0' + INSTALL_URL_ADDRESS2='https://dietpi.com/downloads/binaries/all/libpng12-0_1.2.50-2+deb8u3_amd64.deb' || DEPS_LIST+=' libpng12-0' INSTALL_URL_ADDRESS3='https://www.tonido.com/download.php?tonido64.tar.gz' fi @@ -5536,58 +5287,13 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior # Pre-reqs G_AG_CHECK_INSTALL_PREREQ lsb-release - # Stretch+ via APT - if (( $G_DISTRO > 3 )); then - - if (( $G_HW_MODEL < 10 )); then - - G_AGI chromium-browser - - else - - G_AGI chromium + if (( $G_HW_MODEL < 10 )); then - fi + G_AGI chromium-browser else - # ARMv6/7 - if (( $G_HW_ARCH == 1 || $G_HW_ARCH == 2 )); then - - INSTALL_URL_ADDRESS='https://dietpi.com/downloads/binaries/all/chromium_52.0.2743.116-1-deb8u1.1_armhf.deb' - - # ARMv8 - elif (( $G_HW_ARCH == 3 )); then - - INSTALL_URL_ADDRESS='https://dietpi.com/downloads/binaries/all/chromium_52.0.2743.116-1-deb8u1.1_arm64.deb' - - fi - - # Odroids, 'apt-get -f install' removes chromium package, rather than install required deps... - if (( $G_HW_MODEL > 9 && $G_HW_MODEL < 20 )); then - - DEPS_LIST='libgnome-keyring0 libnspr4 libnss3 libnss3-1d libspeechd2 libxslt1.1 libxss1 xdg-utils libgnome-keyring-common libltdl7' - - fi - - Download_Install "$INSTALL_URL_ADDRESS" - - Download_Install 'https://dietpi.com/downloads/binaries/all/chromium-l10n_52.0.2743.116-1-deb8u1.1_all.deb' - - # ARMv6/7 - if (( $G_HW_ARCH == 1 || $G_HW_ARCH == 2 )); then - - Download_Install 'https://dietpi.com/downloads/binaries/all/chromedriver_52.0.2743.116-1-deb8u1.1_armhf.deb' - - # ARMv8 - elif (( $G_HW_ARCH == 3 )); then - - Download_Install 'https://dietpi.com/downloads/binaries/all/chromedriver_52.0.2743.116-1-deb8u1.1_arm64.deb' - - fi - - # Prevent Debian repo from replacing our chromium packages: https://github.com/MichaIng/DietPi/issues/658 - apt-mark hold chromium chromedriver + G_AGI chromium fi @@ -5610,28 +5316,7 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then Banner_Installing - - if (( $G_DISTRO == 3 )); then # https://github.com/MichaIng/DietPi/issues/855#issuecomment-292712002 - - # Apply APT key - INSTALL_URL_ADDRESS='https://davesteele.github.io/key-366150CE.pub.txt' - G_CHECK_URL "$INSTALL_URL_ADDRESS" - curl -sSL "$INSTALL_URL_ADDRESS" | apt-key add - - - # Apply APT repo - echo 'deb https://davesteele.github.io/cloudprint-service/repo cloudprint-jessie main' > /etc/apt/sources.list.d/cloudprint.list - - # Update APT lists - G_AGUP - - # Install CloudPrint - G_AGI cloudprint-service - - else - - G_AGI cloudprint-service - - fi + G_AGI cloudprint-service fi @@ -5867,18 +5552,14 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior if (( $G_HW_ARCH != 1 )); then DEPS_LIST='liblttng-ust0' - if (( $G_DISTRO < 4 )); then + if (( $G_DISTRO > 4 )); then - DEPS_LIST+=' libicu52' + DEPS_LIST+=' libicu63' - elif (( $G_DISTRO == 4 )); then + else DEPS_LIST+=' libicu57' - elif (( $G_DISTRO > 4 )); then - - DEPS_LIST+=' libicu63' - fi fi @@ -6159,7 +5840,7 @@ Pin-Priority: -1' > /etc/apt/preferences.d/dietpi-docker_fix Banner_Installing - # Stretch + Jessie: Use our updated package + # Stretch: Use our updated package if (( $G_DISTRO < 5 )); then INSTALL_URL_ADDRESS='https://dietpi.com/downloads/binaries/all/gmrender_1_' @@ -6366,32 +6047,28 @@ Mycroft AI requires at least 2 GiB memory on first start. We will now increase y Banner_Installing # - Stretch+, libssl1.0.0 no longer available: https://github.com/MichaIng/DietPi/issues/1299 - if (( $G_DISTRO > 3 )); then + INSTALL_URL_ADDRESS='https://dietpi.com/downloads/binaries/all/' - INSTALL_URL_ADDRESS='https://dietpi.com/downloads/binaries/all/' - - # - ARMv6/7 - if (( $G_HW_ARCH == 1 || $G_HW_ARCH == 2 )); then - - INSTALL_URL_ADDRESS+='libssl1.0.0_1.0.1t-1+deb8u7_armhf.deb' - - # - ARM64 - elif (( $G_HW_ARCH == 3 )); then + # - ARMv6/7 + if (( $G_HW_ARCH == 1 || $G_HW_ARCH == 2 )); then - INSTALL_URL_ADDRESS+='libssl1.0.0_1.0.1t-1+deb8u7_arm64.deb' + INSTALL_URL_ADDRESS+='libssl1.0.0_1.0.1t-1+deb8u7_armhf.deb' - # - x86_64 - elif (( $G_HW_ARCH == 10 )); then + # - ARM64 + elif (( $G_HW_ARCH == 3 )); then - INSTALL_URL_ADDRESS+='libssl1.0.0_1.0.1t-1+deb8u7_amd64.deb' + INSTALL_URL_ADDRESS+='libssl1.0.0_1.0.1t-1+deb8u7_arm64.deb' - fi + # - x86_64 + elif (( $G_HW_ARCH == 10 )); then - DEPS_LIST='multiarch-support' - Download_Install "$INSTALL_URL_ADDRESS" + INSTALL_URL_ADDRESS+='libssl1.0.0_1.0.1t-1+deb8u7_amd64.deb' fi + DEPS_LIST='multiarch-support' + Download_Install "$INSTALL_URL_ADDRESS" + fi software_id=6 # Xserver @@ -6427,13 +6104,6 @@ Mycroft AI requires at least 2 GiB memory on first start. We will now increase y G_AGI firmware-samsung xf86-video-armsoc-odroid malit628-odroid - # Odroid C1: REMOVE v6.24 - elif (( $G_HW_MODEL == 10 && $G_DISTRO == 3 )); then - - DEPS_LIST='aml-libs-odroid xf86-video-mali-odroid libump-odroid mali450-odroid' - G_BACKUP_FP /etc/X11/xorg.conf - dps_index=$software_id Download_Install 'xorg_c1.conf' /etc/X11/xorg.conf - # Pine64 elif (( $G_HW_MODEL == 40 )); then @@ -6691,18 +6361,8 @@ Mycroft AI requires at least 2 GiB memory on first start. We will now increase y # Stop OpenSSH service to unbind port 22 systemctl -q is-active ssh && systemctl stop ssh - # On Stretch+ Dropbear packages have been split, install "dropbear-run" only, to have active service, but "skip dropbear-initramfs" - if (( $G_DISTRO < 4 )); then - - G_AGI dropbear - # ECDSA key is not generated (or converted from OpenSSH) automatically on Jessie - [[ -f /etc/dropbear/dropbear_ecdsa_host_key ]] || dropbearkey -t ecdsa -f /etc/dropbear/dropbear_ecdsa_host_key - - else - - G_AGI dropbear-run - - fi + # On Stretch+ Dropbear packages have been split, install "dropbear-run" only, to have active service, but skip "dropbear-initramfs" + G_AGI dropbear-run # Enable Dropbear daemon G_CONFIG_INJECT 'NO_START=' 'NO_START=0' /etc/default/dropbear @@ -6802,27 +6462,13 @@ Mycroft AI requires at least 2 GiB memory on first start. We will now increase y Banner_Installing - # On Jessie we need to our self-hosted packages: - if (( $G_DISTRO < 4 )); then - - Download_Install "https://dietpi.com/downloads/binaries/jessie/openjdk-8-jre_$G_HW_ARCH_DESCRIPTION.7z" - Download_Install "https://dietpi.com/downloads/binaries/jessie/openjdk-8-jdk_$G_HW_ARCH_DESCRIPTION.7z" - dpkg --force-hold,confdef,confold -i ca-certificates-java.deb openjdk-8-jre-headless.deb openjdk-8-jdk-headless.deb - G_AGF - rm ca-certificates-java.deb openjdk-8-jre-headless.deb openjdk-8-jdk-headless.deb - - - else - - local version=8 - (( $G_DISTRO == 5 )) && version=11 - - local packages="ca-certificates-java openjdk-$version-jre-headless openjdk-$version-jdk-headless" - # Workaround for ARM install issue: https://github.com/MichaIng/DietPi/issues/2524 - apt-get install -y -qq $packages - G_AGI $packages + local version=8 + (( $G_DISTRO == 5 )) && version=11 - fi + local packages="ca-certificates-java openjdk-$version-jre-headless openjdk-$version-jdk-headless" + # Workaround for ARM install issue: https://github.com/MichaIng/DietPi/issues/2524 + apt-get install -y -qq $packages + G_AGI $packages fi @@ -6942,16 +6588,7 @@ Mycroft AI requires at least 2 GiB memory on first start. We will now increase y G_DIETPI-NOTIFY 2 "ha_python_version: $ha_python_version" # Install needed libraries - G_AGI cmake daemon gcc nmap net-tools swig uuid-dev libc-ares-dev libgnutls28-dev libgnutlsxx28 libglib2.0-dev libudev-dev libusb-1.0-0 libssl-dev libffi-dev libbz2-dev zlib1g-dev libreadline-dev libsqlite3-dev libncurses5-dev libncursesw5-dev - if (( $G_DISTRO < 4 )); then - - G_AGI libmysqlclient-dev - - else - - G_AGI libmariadbclient-dev - - fi + G_AGI cmake daemon gcc nmap net-tools swig uuid-dev libc-ares-dev libgnutls28-dev libgnutlsxx28 libglib2.0-dev libudev-dev libusb-1.0-0 libssl-dev libffi-dev libbz2-dev zlib1g-dev libreadline-dev libsqlite3-dev libncurses5-dev libncursesw5-dev libmariadbclient-dev # Setup the user account information adduser --system $ha_user @@ -7469,17 +7106,6 @@ _EOF_ Banner_Configuration - # On Jessie assure unix_socket authentication: - if (( $G_DISTRO < 4 )); then - - G_RUN_CMD systemctl start $MARIADB_SERVICE - mysql -e "install plugin unix_socket soname 'auth_socket';" &> /dev/null - mysql -e "grant all privileges on *.* to 'root'@'localhost' identified via unix_socket with grant option;flush privileges" - # Drop unnecessary root user children. - mysql -e "drop user 'root'@'dietpi';drop user 'root'@'127.0.0.1';drop user 'root'@'::1'" &> /dev/null - - fi - ### Also for MariaDB? # Optimise for reduced memory use: https://github.com/MichaIng/DietPi/issues/605#issue-188930987 #cat << _EOF_ > /etc/mysql/mariadb.conf.d/99-dietpi.cnf @@ -7509,7 +7135,7 @@ _EOF_ # Due to MariaDB unix_socket authentication, "root" cannot be used to login the web ui. # Thus default "phpmyadmin" user need to be used, who on Jessie does not have all privileges: # https://dietpi.com/phpbb/viewtopic.php?p=54#p54 - systemctl start $MARIADB_SERVICE + systemctl start mariadb mysql -e 'grant all privileges on *.* to phpmyadmin@localhost with grant option' fi @@ -7650,9 +7276,7 @@ _EOF_ Banner_Configuration G_DIETPI-NOTIFY 2 'Enabling needed PHP modules.' # https://doc.owncloud.org/server/administration_manual/installation/manual_installation.html#php-extensions - phpenmod curl gd intl json pdo_mysql opcache apcu redis - # Following modules are switchable since Stretch: - (( $G_DISTRO > 3 )) && phpenmod ctype dom fileinfo iconv mbstring posix simplexml xmlwriter xmlreader zip exif + phpenmod curl gd intl json pdo_mysql opcache apcu redis ctype dom fileinfo iconv mbstring posix simplexml xmlwriter xmlreader zip exif G_DIETPI-NOTIFY 2 'Enabling APCu memory cache for PHP command line usage (CLI) as well, including ownCloud occ command and cron jobs.' echo -e '; ownCloud PHP settngs\n; priority=99\napc.enable_cli=1' > $FP_PHP_BASE_DIR/mods-available/dietpi-owncloud.ini @@ -7688,15 +7312,7 @@ Redirect permanent /.well-known/caldav /owncloud/remote.php/dav' > /etc/apache2/ # Enable required modules G_CONFIG_INJECT '"mod_access",' ' "mod_access",' /etc/lighttpd/lighttpd.conf '"mod_.+",' G_CONFIG_INJECT '"mod_setenv",' ' "mod_setenv",' /etc/lighttpd/lighttpd.conf '"mod_.+",' - if (( $G_DISTRO < 4 )); then - - G_CONFIG_INJECT '"mod_rewrite",' ' "mod_rewrite",' /etc/lighttpd/lighttpd.conf '"mod_.+",' - - else - - lighttpd-enable-mod rewrite - - fi + lighttpd-enable-mod rewrite # Move ownCloud configuration file in place and activate it owncloud_conf='/etc/lighttpd/conf-available/99-dietpi-owncloud.conf' @@ -7734,9 +7350,6 @@ url.redirect += ( dps_index=$software_id Download_Install 'nginx.owncloud.conf' $owncloud_conf - # Stretch: Set 'fastcgi_request_buffering off'; - (( $G_DISTRO > 3 )) && sed -i 's/#fastcgi_request_buffering off;/fastcgi_request_buffering off;/g' $owncloud_conf - # Uncomment HSTS header, if chosen via dietpi-letsencrypt and HTTPS connection test succeeds (incl. self-singed cert => exit code 5) if [[ -f /DietPi/dietpi/.dietpi-letsencrypt && $(sed -n 4p /DietPi/dietpi/.dietpi-letsencrypt) == 1 ]]; then @@ -7768,10 +7381,7 @@ location = /.well-known/caldav { fi G_DIETPI-NOTIFY 2 'Enable 4-byte support for MariaDB.' # https://doc.owncloud.org/server/administration_manual/configuration/database/linux_database_configuration.html#configure-mysql-for-4-byte-unicode-support - local fp_mariadb_conf='/etc/mysql/mariadb.conf.d' - # On Jessie (MariaDB 10.0), /etc/mysql/mariadb.conf.d does not yet exist - (( $G_DISTRO < 4 )) && fp_mariadb_conf='/etc/mysql/conf.d' - cat << _EOF_ > $fp_mariadb_conf/99-dietpi-4byte.cnf + cat << _EOF_ > /etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf [mysqld] innodb_large_prefix=1 innodb_file_format=barracuda @@ -7784,11 +7394,11 @@ _EOF_ # - innodb_file_format: https://mariadb.com/kb/en/library/innodb-system-variables/#innodb_file_format if (( $G_DISTRO > 4 )); then - sed -i '/innodb_large_prefix/d' $fp_mariadb_conf/99-dietpi-4byte.cnf - sed -i '/innodb_file_format/d' $fp_mariadb_conf/99-dietpi-4byte.cnf + sed -i '/innodb_large_prefix/d' /etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf + sed -i '/innodb_file_format/d' /etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf fi - G_RUN_CMD systemctl restart $MARIADB_SERVICE + G_RUN_CMD systemctl restart mariadb # Start redis-server, which is required for ncc command: G_RUN_CMD systemctl start redis-server @@ -7915,9 +7525,7 @@ _EOF_ Banner_Configuration G_DIETPI-NOTIFY 2 'Enabling required PHP modules.' # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation - phpenmod curl gd intl json pdo_mysql opcache apcu redis - # Following modules are switchable since Stretch: - (( $G_DISTRO > 3 )) && phpenmod ctype dom fileinfo iconv mbstring posix simplexml xmlwriter xmlreader zip exif + phpenmod curl gd intl json pdo_mysql opcache apcu redis ctype dom fileinfo iconv mbstring posix simplexml xmlwriter xmlreader zip exif G_DIETPI-NOTIFY 2 'Optimising APCu and OPcache modules for Nextcloud.' # https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/server_tuning.html#enable-php-opcache echo -e '; Nextcloud PHP settngs\n; priority=99\napc.enable_cli=1\nopcache.enable=1\nopcache.interned_strings_buffer=8 @@ -7954,15 +7562,7 @@ Redirect permanent /.well-known/caldav /nextcloud/remote.php/dav' > /etc/apache2 # Enable required modules G_CONFIG_INJECT '"mod_access",' ' "mod_access",' /etc/lighttpd/lighttpd.conf '"mod_.+",' G_CONFIG_INJECT '"mod_setenv",' ' "mod_setenv",' /etc/lighttpd/lighttpd.conf '"mod_.+",' - if (( $G_DISTRO < 4 )); then - - G_CONFIG_INJECT '"mod_rewrite",' ' "mod_rewrite",' /etc/lighttpd/lighttpd.conf '"mod_.+",' - - else - - lighttpd-enable-mod rewrite - - fi + lighttpd-enable-mod rewrite # Move Nextcloud configuration file in place and activate it nextcloud_conf='/etc/lighttpd/conf-available/99-dietpi-nextcloud.conf' @@ -7999,9 +7599,6 @@ url.redirect += ( fi dps_index=$software_id Download_Install 'nginx.nextcloud.conf' $nextcloud_conf - # Stretch: Set 'fastcgi_request_buffering off'; - (( $G_DISTRO > 3 )) && sed -i 's/#fastcgi_request_buffering off;/fastcgi_request_buffering off;/g' $nextcloud_conf - # Uncomment HSTS header, if chosen via dietpi-letsencrypt and HTTPS connection test succeeds (incl. self-singed cert => exit code 5) if [[ -f /DietPi/dietpi/.dietpi-letsencrypt && $(sed -n 4p /DietPi/dietpi/.dietpi-letsencrypt) == 1 ]]; then @@ -8033,10 +7630,7 @@ location = /.well-known/caldav { fi G_DIETPI-NOTIFY 2 'Enable 4-byte support for MariaDB' # https://docs.nextcloud.com/server/stable/admin_manual/configuration_database/mysql_4byte_support.html - local fp_mariadb_conf='/etc/mysql/mariadb.conf.d' - # On Jessie (MariaDB 10.0), /etc/mysql/mariadb.conf.d does not yet exist - (( $G_DISTRO < 4 )) && fp_mariadb_conf='/etc/mysql/conf.d' - cat << _EOF_ > $fp_mariadb_conf/99-dietpi-4byte.cnf + cat << _EOF_ > /etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf [mysqld] innodb_large_prefix=1 innodb_file_format=barracuda @@ -8049,11 +7643,11 @@ _EOF_ # - innodb_file_format: https://mariadb.com/kb/en/library/innodb-system-variables/#innodb_file_format if (( $G_DISTRO > 4 )); then - sed -i '/innodb_large_prefix/d' $fp_mariadb_conf/99-dietpi-4byte.cnf - sed -i '/innodb_file_format/d' $fp_mariadb_conf/99-dietpi-4byte.cnf + sed -i '/innodb_large_prefix/d' /etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf + sed -i '/innodb_file_format/d' /etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf fi - G_RUN_CMD systemctl restart $MARIADB_SERVICE + G_RUN_CMD systemctl restart mariadb # Start redis-server, which is required for ncc command: G_RUN_CMD systemctl start redis-server @@ -8124,7 +7718,7 @@ The install script will now exit. After applying one of the the above, rerun die fi # Workaround Nextcloud 14.0.3 throwing an error, when data dir path contains a symlink: https://github.com/nextcloud/server/issues/12247 - if (( $G_DISTRO > 3 )) && [[ $(readlink -f $datadir) != $datadir ]]; then + if [[ $(readlink -f $datadir) != $datadir ]]; then G_ERROR_HANDLER_RESET # Install with this error does not copy over skeleton @@ -8313,7 +7907,7 @@ NB: This port needs to be forwarded by your router and/or opened in your firewal fi # Install Nextcloud Talk app - G_RUN_CMD systemctl start $MARIADB_SERVICE + G_RUN_CMD systemctl start mariadb G_RUN_CMD systemctl start redis-server G_RUN_CMD ncc maintenance:mode --off [[ -d '/var/www/nextcloud/apps/spreed' ]] || G_RUN_CMD ncc app:install spreed @@ -8469,16 +8063,6 @@ WantedBy=multi-user.target Also=mpd.socket _EOF_ - # - Jessie: Remove unsupported systemd unit settings - if (( $G_DISTRO < 4 )); then - - sed -i '/ProtectKernelTunables/d' /lib/systemd/system/mpd.service - sed -i '/ProtectControlGroups/d' /lib/systemd/system/mpd.service - sed -i '/ProtectKernelModules/d' /lib/systemd/system/mpd.service - sed -i '/RestrictNamespaces/d' /lib/systemd/system/mpd.service - - fi - # JustBoom specials if grep -qi '^[[:blank:]]*CONFIG_SOUNDCARD=justboom' /DietPi/dietpi.txt; then @@ -9439,8 +9023,7 @@ _EOF_ Banner_Configuration # Enable required PHP modules: https://github.com/FreshRSS/FreshRSS#requirements - phpenmod curl gmp intl json pdo_mysql - (( $G_DISTRO > 3 )) && phpenmod ctype dom mbstring xml zip + phpenmod curl gmp intl json pdo_mysql ctype dom mbstring xml zip # Apache configuration if (( ${aSOFTWARE_INSTALL_STATE[83]} > 0 )); then @@ -9484,10 +9067,8 @@ _EOF_ fi - #software_id=27/28/120 # TightVNC/VNC4/RealVNC Server - Shared setup - if (( ${aSOFTWARE_INSTALL_STATE[27]} == 1 || - ${aSOFTWARE_INSTALL_STATE[28]} == 1 || - ${aSOFTWARE_INSTALL_STATE[120]} == 1 )); then + #software_id=28/120 # VNC4/RealVNC Server - Shared setup + if (( ${aSOFTWARE_INSTALL_STATE[28]} == 1 || ${aSOFTWARE_INSTALL_STATE[120]} == 1 )); then #Banner_Configuration @@ -9609,11 +9190,7 @@ _EOF_ fi # - Stretch + TigerVNC: Disable Localhost only by default - if (( $G_DISTRO > 3 )); then - - echo '$localhost = "no";' >> /etc/vnc.conf - - fi + echo '$localhost = "no";' >> /etc/vnc.conf fi @@ -9816,7 +9393,7 @@ _EOF_ chmod -R +x /etc/openvpn/easy-rsa cd /etc/openvpn/easy-rsa # - https://github.com/MichaIng/DietPi/issues/1450#issuecomment-362608574 - (( $G_DISTRO > 3 )) && cp -a openssl-1.0.0.cnf openssl.cnf + cp -a openssl-1.0.0.cnf openssl.cnf . ./vars ./clean-all @@ -10272,8 +9849,7 @@ _EOF_ Banner_Configuration # PHP configuration - phpenmod apcu gd intl pdo_mysql - (( $G_DISTRO > 3 )) && phpenmod dom mbstring xml + phpenmod apcu gd intl pdo_mysql dom mbstring xml # Webserver config # - Apache2 @@ -10292,16 +9868,7 @@ _EOF_ # - Enable Lighttpd setenv, access and rewrite modules G_CONFIG_INJECT '"mod_access",' ' "mod_access",' /etc/lighttpd/lighttpd.conf '"mod_.+",' G_CONFIG_INJECT '"mod_setenv",' ' "mod_setenv",' /etc/lighttpd/lighttpd.conf '"mod_.+",' - # - On Jessie rewrite.ini is not available, thus "lighttpd-enable-mod rewrite" does not work. - if (( $G_DISTRO < 4 )); then - - G_CONFIG_INJECT '"mod_rewrite",' ' "mod_rewrite",' /etc/lighttpd/lighttpd.conf '"mod_.+",' - - else - - lighttpd-enable-mod rewrite - - fi + lighttpd-enable-mod rewrite # - Move Pydio Lighttpd config in place dps_index=$software_id Download_Install 'lighttpd.pydio.conf' /etc/lighttpd/conf-available/99-dietpi-pydio.conf @@ -10456,17 +10023,10 @@ _EOF_ Banner_Configuration # Only required for our custom package, leave defaults for Debian APT package otherwise - if (( $G_DISTRO < 4 || ( $G_HW_MODEL < 10 && $G_DISTRO < 5 ) )); then + if (( $G_HW_MODEL < 10 && $G_DISTRO < 5 )); then # - Service dps_index=$software_id Download_Install 'netdata.service' /etc/systemd/system/netdata.service - # Workaround for Jessie - if (( $G_DISTRO < 4 )); then - - sed -i '\#ExecStartPre=/bin/chown -R netdata:netdata /var/run/netdata#d' /etc/systemd/system/netdata.service - sed -Ei '\#ProtectKernel(Modules|Tunables)=no#d' /etc/systemd/system/netdata.service - - fi # - User local usercmd='useradd -rm' @@ -10804,9 +10364,6 @@ enabled=false program= _EOF_ - # - Jessie WebUI\Password_ha1 breaks login with m5dsum generated pw, revert to default 'adminadmin': https://github.com/MichaIng/DietPi/issues/1499#issuecomment-364769146 - (( $G_DISTRO < 4 )) && sed -i '/Password_ha1=/d' /root/.config/qBittorrent/qBittorrent.conf - # Service cat << _EOF_ > /etc/systemd/system/qbittorrent.service [Unit] @@ -11245,9 +10802,7 @@ _EOF_ # Service cp $G_FP_DIETPI_USERDATA/medusa/runscripts/init.systemd /etc/systemd/system/medusa.service G_CONFIG_INJECT 'Group=' 'Group=dietpi' /etc/systemd/system/medusa.service '\[Service\]' - local python_bin='python' - (( $G_DISTRO > 3 )) && python_bin+='3' - G_CONFIG_INJECT 'ExecStart=' "ExecStart=$(command -v $python_bin) $G_FP_DIETPI_USERDATA/medusa/start.py -q --nolaunch --datadir=$G_FP_DIETPI_USERDATA/medusa" /etc/systemd/system/medusa.service + G_CONFIG_INJECT 'ExecStart=' "ExecStart=$(command -v python3) $G_FP_DIETPI_USERDATA/medusa/start.py -q --nolaunch --datadir=$G_FP_DIETPI_USERDATA/medusa" /etc/systemd/system/medusa.service fi @@ -11397,10 +10952,10 @@ _EOF_ # Database will be migrated automatically, so only create new on fresh install, using local override config as flag if [[ ! -f '/var/www/ompd/include/config.local.inc.php' ]]; then - G_RUN_CMD systemctl start $MARIADB_SERVICE + G_RUN_CMD systemctl start mariadb # - Create database user only, database will be created automatically mysql -e "grant all privileges on ompd.* to ompd@localhost identified by '$GLOBAL_PW';" - systemctl stop $MARIADB_SERVICE + systemctl stop mariadb cat << _EOF_ > /var/www/ompd/include/config.local.inc.php /dev/null # - Perform database backup if existent, otherwise skip to not overwrite existing one @@ -12785,7 +12332,7 @@ _EOF_ G_AGP coturn [[ -f '/etc/turnserver.conf' ]] && rm /etc/turnserver.conf [[ -d '/etc/systemd/system/coturn.service.d' ]] && rm -R /etc/systemd/system/coturn.service.d - systemctl start $MARIADB_SERVICE + systemctl start mariadb systemctl start redis-server ncc maintenance:mode --off ncc app:disable spreed @@ -12814,7 +12361,7 @@ _EOF_ # - Find datadir for backups local datadir=$(grep -m1 "^[[:blank:]]*'datadirectory'" /var/www/nextcloud/config/config.php | mawk '{print $3}' | sed "s/[',]//g") [[ $datadir ]] || datadir=$G_FP_DIETPI_USERDATA/nextcloud_data - systemctl start $MARIADB_SERVICE + systemctl start mariadb mysql -e "drop user $dbuser@$dbhost" mysql -e "drop user $dbuser" 2> /dev/null # - Perform database backup if existent, otherwise skip to not overwrite existing one @@ -12912,7 +12459,7 @@ _EOF_ if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then Banner_Uninstalling - systemctl start $MARIADB_SERVICE + systemctl start mariadb mysqladmin drop phpmyadmin -f mysql -e "drop user 'phpmyadmin'@'localhost'" G_AGP phpmyadmin @@ -12923,7 +12470,7 @@ _EOF_ if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then Banner_Uninstalling - systemctl start $MARIADB_SERVICE + systemctl start mariadb mysqladmin drop phpbb3 -f mysql -e "drop user 'phpbb3'@'localhost'" [[ -d '/var/www/phpBB3' ]] && rm -R /var/www/phpBB3 @@ -13062,7 +12609,7 @@ _EOF_ rm /etc/lighttpd/conf-available/99-dietpi-ompd.conf fi - systemctl start $MARIADB_SERVICE + systemctl start mariadb mysqladmin drop ompd -f mysql -e 'drop user ompd@localhost' @@ -13166,7 +12713,6 @@ _EOF_ Banner_Uninstalling G_AGP cloudprint-service - (( $G_DISTRO < 4 )) && rm /etc/apt/sources.list.d/cloudprint.list fi @@ -13229,7 +12775,7 @@ _EOF_ userdel -rf koel - systemctl start $MARIADB_SERVICE + systemctl start mariadb mysqladmin drop koel -f mysql -e 'drop user koel@localhost' @@ -13664,7 +13210,7 @@ _EOF_ if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then Banner_Uninstalling - systemctl start $MARIADB_SERVICE + systemctl start mariadb mysqladmin drop wordpress -f mysql -e "drop user 'wordpress'@'localhost'" @@ -13682,7 +13228,7 @@ _EOF_ a2disconf dietpi-freshrss &> /dev/null rm /etc/apache2/conf-available/dietpi-freshrss.conf &> /dev/null - systemctl start $MARIADB_SERVICE + systemctl start mariadb mysqladmin drop freshrss -f mysql -e "drop user 'freshrss'@'localhost'" @@ -13692,13 +13238,11 @@ _EOF_ fi - software_id=27 - if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )) || - (( ${aSOFTWARE_INSTALL_STATE[28]} == -1 )) || - (( ${aSOFTWARE_INSTALL_STATE[120]} == -1 )); then + software_id=28 + if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 || ${aSOFTWARE_INSTALL_STATE[120]} == -1 )); then Banner_Uninstalling - G_AGP tightvncserver tigervnc-* vnc4server x11vnc realvnc-vnc-server + G_AGP tigervnc-* vnc4server x11vnc realvnc-vnc-server rm /etc/systemd/system/vncserver.service rm /etc/init.d/vncserver @@ -13745,7 +13289,7 @@ _EOF_ [[ -d '/var/www/ampache' ]] && rm -R /var/www/ampache # Drop database - systemctl start $MARIADB_SERVICE + systemctl start mariadb mysqladmin drop ampache -f mysql -e 'drop user ampache@localhost' @@ -13795,21 +13339,9 @@ _EOF_ if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then Banner_Uninstalling - if (( $G_DISTRO > 3 )); then - - G_AGP python-certbot-apache python-certbot-nginx certbot - [[ -f '/etc/systemd/system/certbot.service' ]] && rm /etc/systemd/system/certbot.service - [[ -d '/etc/systemd/system/certbot.service.d' ]] && rm -R /etc/systemd/system/certbot.service.d - - else - - # Pre-reqs: https://github.com/certbot/certbot/blob/master/certbot-auto#L390-L399 - #apt-mark auto python python-dev virtualenv python-virtualenv gcc libaugeas0 augeas-lenses libssl-dev openssl libffi-dev ca-certificates - [[ -d '/etc/certbot_scripts' ]] && rm -R /etc/certbot_scripts - [[ -f '/etc/cron.weekly/dietpi-letsencrypt' ]] && rm /etc/cron.weekly/dietpi-letsencrypt - [[ -f '/home/minio-user/.minio/dietpi-cert-renewl.sh' ]] && rm /home/minio-user/.minio/dietpi-cert-renewl.sh - - fi + G_AGP python-certbot-apache python-certbot-nginx certbot + [[ -f '/etc/systemd/system/certbot.service' ]] && rm /etc/systemd/system/certbot.service + [[ -d '/etc/systemd/system/certbot.service.d' ]] && rm -R /etc/systemd/system/certbot.service.d fi @@ -13922,7 +13454,7 @@ _EOF_ [[ -f '/etc/lighttpd/conf-available/99-dietpi-pydio.conf' ]] && rm /etc/lighttpd/conf-available/99-dietpi-pydio.conf # Drop database - systemctl start $MARIADB_SERVICE + systemctl start mariadb mysqladmin drop pydio -f mysql -e "drop user pydio@localhost" @@ -13964,7 +13496,7 @@ _EOF_ rm -R /var/www/baikal #drop database - systemctl start $MARIADB_SERVICE + systemctl start mariadb mysqladmin drop baikal -f mysql -e "drop user 'baikal'@'localhost'" @@ -14087,7 +13619,7 @@ _EOF_ rm /etc/systemd/system/gogs.service rm -R /var/log/gogs - systemctl start $MARIADB_SERVICE + systemctl start mariadb mysqladmin drop gogs -f mysql -e "drop user 'gogs'@'localhost'" @@ -14244,7 +13776,7 @@ _EOF_ [[ -d '/var/log/gitea' ]] && rm -R /var/log/gitea # Drop/delete database - systemctl start $MARIADB_SERVICE + systemctl start mariadb mysqladmin drop gitea -f mysql -e 'drop user gitea@localhost' @@ -14412,7 +13944,7 @@ _EOF_ rm -R /var/www/allo userdel -rf allo rm /etc/sudoers.d/allo - systemctl start $MARIADB_SERVICE + systemctl start mariadb mysqladmin drop allo_db -f mysql -e 'drop user allo_db@localhost' @@ -14423,11 +13955,9 @@ _EOF_ Banner_Uninstalling G_WHIP_MSG "Creating MariaDB database backup before uninstallation:\n\nIn case of accident, we create a database backup for you. You can remove it manually, if you are sure, that you don't need it any more.\n\n$G_FP_DIETPI_USERDATA/mariadb-database-backup.sql" - G_RUN_CMD systemctl start $MARIADB_SERVICE + G_RUN_CMD systemctl start mariadb mysqldump --all-databases > $G_FP_DIETPI_USERDATA/mariadb-database-backup.sql - # On Jessie, purging MariaDB server with unix_socket authentication fails, thus revert to password: - (( $G_DISTRO < 4 )) && mysql -e "grant all privileges on *.* to 'root'@'localhost' identified by '$GLOBAL_PW' with grant option;flush privileges" - systemctl stop $MARIADB_SERVICE + systemctl stop mariadb G_AGP mariadb-server php*-mysql # - config folder diff --git a/dietpi/func/create_mysql_db b/dietpi/func/create_mysql_db index 8ca5040a40..2238e7ab2d 100644 --- a/dietpi/func/create_mysql_db +++ b/dietpi/func/create_mysql_db @@ -13,32 +13,32 @@ # - mysqladmin drop phpbb3 -f #//////////////////////////////////// - DATABASE_NAME="$1" - DATABASE_USER="$2" - DATABASE_PW="$3" - #Import DietPi-Globals --------------------------------------------------------------- + DATABASE_NAME=$1 + DATABASE_USER=$2 + DATABASE_PW=$3 + # Import DietPi-Globals -------------------------------------------------------------- . /DietPi/dietpi/func/dietpi-globals G_PROGRAM_NAME='DietPi-Create_MySQL_DB' G_CHECK_ROOT_USER G_INIT - #Import DietPi-Globals --------------------------------------------------------------- + # Import DietPi-Globals -------------------------------------------------------------- #///////////////////////////////////////////////////////////////////////////////////// # Main Loop #///////////////////////////////////////////////////////////////////////////////////// # Skip database creation, if already existent - [[ -d /var/lib/mysql/$DATABASE_NAME ]] && G_DIETPI-NOTIFY 2 "\"$DATABASE_NAME\" MariaDB database already exists. Aborting..." && exit + [[ -d '/var/lib/mysql/'$DATABASE_NAME ]] && G_DIETPI-NOTIFY 2 "\"$DATABASE_NAME\" MariaDB database already exists. Aborting..." && exit # Start MySQL if not running. - (( G_DISTRO < 4 )) && systemctl start mysql &> /dev/null || systemctl start mariadb &> /dev/null + systemctl start mariadb &> /dev/null G_DIETPI-NOTIFY 2 "Creating MariaDB database: $DATABASE_NAME" # Generate DB # - 'identified by' can overwrite unix_socket authentication, thus use this for non-root users only. grant_privileges='' - [[ $DATABASE_USER == root ]] || grant_privileges="grant all privileges on \`$DATABASE_NAME\`.* to $DATABASE_USER@localhost identified by '$DATABASE_PW';flush privileges" + [[ $DATABASE_USER == 'root' ]] || grant_privileges="grant all privileges on \`$DATABASE_NAME\`.* to $DATABASE_USER@localhost identified by '$DATABASE_PW';flush privileges" mysql -e "create database \`$DATABASE_NAME\`;$grant_privileges" G_DIETPI-NOTIFY -1 "$?" "Creating MariaDB database: $DATABASE_NAME |" diff --git a/dietpi/func/dietpi-benchmark b/dietpi/func/dietpi-benchmark index 8d5cff5a56..b15ecbee64 100644 --- a/dietpi/func/dietpi-benchmark +++ b/dietpi/func/dietpi-benchmark @@ -126,22 +126,21 @@ aEnd_Int=() for (( i=0; i<\$cores; i++ )) do - aEnd_Int[\$i]=\$(( (\$i + 1) * \$int_split )) - aStart_Int[\$i]=\$(( \${aEnd_Int[\$i]} - \$int_split )) - - echo \${aStart_Int[\$i]} \${aEnd_Int[\$i]} + aEnd_Int[\$i]=\$(( (\$i + 1) * \$int_split )) + aStart_Int[\$i]=\$(( \${aEnd_Int[\$i]} - \$int_split )) + echo \${aStart_Int[\$i]} \${aEnd_Int[\$i]} done Run_Bench(){ - while (( \${aStart_Int[\$1]} < \${aEnd_Int[\$1]} )) - do + while (( \${aStart_Int[\$1]} < \${aEnd_Int[\$1]} )) + do - ((aStart_Int[\$1]++)) + ((aStart_Int[\$1]++)) - done + done } @@ -149,21 +148,18 @@ Run_Bench(){ for (( i=0; i<\$cores; i++ )) do - Run_Bench \$i & + Run_Bench \$i & done # Wait for jobs to finish for job in \`jobs -p\` do - echo \$job - wait \$job -done -#delete[] -unset aStart_Int -unset aEnd_Int + echo \$job + wait \$job +done _EOF_ chmod +x $FP_TEMP/bench @@ -182,8 +178,8 @@ _EOF_ G_WHIP_MSG "CPU Benchmark Results:\n - Total time = $BENCH_CPU Seconds - Value to reach = $CPUBENCH_INT_MAX - - CPU temps = Start: ${BENCH_CPU_TEMP_START}'c | End: ${BENCH_CPU_TEMP_END}'c\n\n -NB: A lower 'Total time' is faster" + - CPU temps = Start: ${BENCH_CPU_TEMP_START}'c | End: ${BENCH_CPU_TEMP_END}'c +\n\nNB: A lower 'Total time' is faster" fi @@ -221,27 +217,22 @@ NB: A lower 'Total time' is faster" G_DIETPI-NOTIFY 2 "Performing Read/Write benchmark on $FP_BENCHFILE, please wait..." G_DIETPI-NOTIFY 2 "Testing Seq Write Speed ($BENCH_FILESIZE MiB)" - sleep 1 - local bench_write_result=$(dd bs=4K count=$(( $BENCH_FILESIZE * 1024 / 4 )) if=/dev/zero of=$FP_BENCHFILE conv=fdatasync 2>&1 | grep 'copied') local temp_bytes_result=$(mawk '{print $1}' <<< "$bench_write_result") local temp_time_result=$(mawk '{print $8}' <<< "$bench_write_result") - (( $G_DISTRO < 4 )) && temp_time_result=$(mawk '{print $6}' <<< "$bench_write_result") # - Convert results from bytes and time to MiB/s bench_write_result=$(bc -l <<< "scale=0; $temp_bytes_result / $temp_time_result / 1024 / 1024") # - Clear cache sync echo 3 > /proc/sys/vm/drop_caches - G_DIETPI-NOTIFY 2 "Testing Seq Read Speed ($BENCH_FILESIZE MiB)" + G_DIETPI-NOTIFY 2 "Testing Seq Read Speed ($BENCH_FILESIZE MiB)" sleep 1 - local bench_read_result=$(dd bs=4K count=$(( $BENCH_FILESIZE * 1024 / 4 )) if=$FP_BENCHFILE of=/dev/null conv=fdatasync 2>&1 | grep 'copied') temp_bytes_result=$(mawk '{print $1}' <<< "$bench_read_result") temp_time_result=$(mawk '{print $8}' <<< "$bench_read_result") - (( $G_DISTRO < 4 )) && temp_time_result=$(mawk '{print $6}' <<< "$bench_read_result") # - Convert results from bytes and time to MiB/s bench_read_result=$(bc -l <<< "scale=0; $temp_bytes_result / $temp_time_result / 1024 / 1024") @@ -291,7 +282,7 @@ The test duration will depend on hardware specs, however, most devices will not You can compare results against other users and hardware using the following link:\n - https://dietpi.com/survey#benchmark\n\nPlease select 'Ok' to begin the benchmark tests."; then # - Additional checks - if (( $G_HW_CPU_CORES <= 2 )); then + if (( $G_HW_CPU_CORES < 3 )); then G_WHIP_YESNO "We have detected a low CPU core count ($G_HW_CPU_CORES). The tests may take upto 5 minutes to complete (eg: RaspberryPi Zero).\n\nDo you wish to continue?" (( $? )) && exit 0 @@ -308,11 +299,9 @@ You can compare results against other users and hardware using the following lin fi G_DIETPI-NOTIFY 0 'Running benchmark suite tests, please wait...' - CPU_Benchmark # FS/RAM - # - RAM if df -t tmpfs /tmp &> /dev/null; then @@ -367,7 +356,6 @@ Compare these results online with other users, using the link below: if disable_error=1 G_CHECK_VALIDINT "$BENCH_NET_LAN_SPEED"; then BENCH_NET_LAN_SPEED=$(( $BENCH_NET_LAN_SPEED / 8 / 1024 / 1024 )) - G_WHIP_MSG "Network LAN benchmark completed:\n - Transfer rate = $BENCH_NET_LAN_SPEED MiB/s" else diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index ad26475181..826fecef4d 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -92,11 +92,7 @@ _EOF_ G_HW_CPUID=$(mawk 'NR==9 {print}' /DietPi/dietpi/.hw_model) G_DISTRO=$(mawk 'NR==3 {print}' /DietPi/dietpi/.hw_model) - if (( $G_DISTRO == 3 )); then - - G_DISTRO_NAME='jessie' - - elif (( $G_DISTRO == 4 )); then + if (( $G_DISTRO == 4 )); then G_DISTRO_NAME='stretch' @@ -271,11 +267,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then # - $1 = start printing from word number $1 Print_Output_String(){ - if [[ $1 == 1 && $G_PROGRAM_NAME ]]; then - - output_string+="\e[90m$G_PROGRAM_NAME | \e[0m" - - fi + [[ $1 == 1 && $G_PROGRAM_NAME ]] && output_string+="\e[90m$G_PROGRAM_NAME | \e[0m" local i=0 for ((i=$1; i<${#ainput_string[@]}; i++)) do @@ -534,7 +526,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then [[ -f $G_FP_DIETPI_USERDATA/dxx-rebirth/run.sh ]] && alias dxx-rebirth="$G_FP_DIETPI_USERDATA/dxx-rebirth/run.sh" [[ -f '/usr/share/applications/kodi.desktop' ]] && alias startkodi='/DietPi/dietpi/misc/start_kodi' [[ -f '/etc/systemd/system/dietpi-cloudshell.service' ]] && alias dietpi-cloudshell='/DietPi/dietpi/dietpi-cloudshell' - (( $G_DISTRO > 3 )) && [[ -d $G_FP_DIETPI_USERDATA/sonarr || -d $G_FP_DIETPI_USERDATA/radarr || -d $G_FP_DIETPI_USERDATA/lidarr ]] && alias dietpi-arr_to_RAM='/DietPi/dietpi/misc/dietpi-arr_to_RAM' + [[ -d $G_FP_DIETPI_USERDATA/sonarr || -d $G_FP_DIETPI_USERDATA/radarr || -d $G_FP_DIETPI_USERDATA/lidarr ]] && alias dietpi-arr_to_RAM='/DietPi/dietpi/misc/dietpi-arr_to_RAM' # - occ/ncc need to be global function, as aliases are not accessible from non-interactive scripts: [[ -f '/var/www/owncloud/occ' ]] && occ(){ sudo -u www-data php /var/www/owncloud/occ "$@"; } [[ -f '/var/www/nextcloud/occ' ]] && ncc(){ sudo -u www-data php /var/www/nextcloud/occ "$@"; } @@ -1504,8 +1496,7 @@ $print_logfile_info G_CHECK_ROOT_USER 1 local string=$@ - local options='' - (( $G_DISTRO > 3 )) && options='--allow-change-held-packages' + local options='--allow-change-held-packages' G_ERROR_HANDLER_RETRY=1 while (( $G_ERROR_HANDLER_RETRY )) @@ -1536,8 +1527,7 @@ $print_logfile_info G_CHECK_ROOT_USER 1 local string=$@ - local options='' - (( $G_DISTRO > 3 )) && options='--allow-change-held-packages' + local options='--allow-change-held-packages' G_ERROR_HANDLER_RETRY=1 while (( $G_ERROR_HANDLER_RETRY )) @@ -1686,8 +1676,7 @@ $print_logfile_info G_CHECK_ROOT_USER 1 - local options='' - (( $G_DISTRO > 3 )) && options='--allow-change-held-packages' + local options='--allow-change-held-packages' G_ERROR_HANDLER_RETRY=1 while (( $G_ERROR_HANDLER_RETRY )) diff --git a/dietpi/func/dietpi-obtain_hw_model b/dietpi/func/dietpi-obtain_hw_model index 1c16fb317b..d89d21f593 100644 --- a/dietpi/func/dietpi-obtain_hw_model +++ b/dietpi/func/dietpi-obtain_hw_model @@ -12,11 +12,11 @@ # - Called from /DietPi/dietpi/preboot # # In DietPi-Software: Need to match highest values in dietpi-obtain_hw_model - # MAX_G_HW_MODEL=72 - # MAX_G_HW_ARCH=10 - # MAX_G_DISTRO=5 + # - MAX_G_HW_MODEL=72 + # - MAX_G_HW_ARCH=10 + # - MAX_G_DISTRO=5 # - # - Line1 - + # ---- Line 1 ---- # G_HW_MODEL 72 ROCK Pi 4 # G_HW_MODEL 71 Beagle Bone Black # G_HW_MODEL 70 Sparky SBC @@ -51,7 +51,7 @@ # G_HW_MODEL 30 OrangePi PC # G_HW_MODEL 22 Generic device (eg: unknown to DietPi) # G_HW_MODEL 21 x86_64 native (PC) - # G_HW_MODEL 20 VM x64 (VMware VirtualBox) + # G_HW_MODEL 20 VM x64 (VMware, VirtualBox, Hyper-V, ...) # G_HW_MODEL 15 Odroid N2 # G_HW_MODEL 14 Odroid N1 # G_HW_MODEL 13 Odroid U3 @@ -63,56 +63,50 @@ # G_HW_MODEL 2 Raspberry Pi 2 # G_HW_MODEL 1 Raspberry Pi 1/Zero (512mb) # G_HW_MODEL 0 Raspberry Pi 1 (256mb) - # - Line2 - + # ---- Line 2 ---- # G_HW_MODEL_DESCRIPTION - # - Line3 - - # G_DISTRO 0 unknown - # G_DISTRO 1 Debian Wheezy (No longer supported, https://dietpi.com/phpbb/viewtopic.php?f=9&t=432#p1898) - # G_DISTRO 2 Ubuntu 14.04 (No longer supported, left in for user message during update) - # G_DISTRO 3 Jessie + # ---- Line 3 ---- + # G_DISTRO 0 unknown/unsupported + # G_DISTRO 1 Debian Wheezy (No longer supported: https://dietpi.com/phpbb/viewtopic.php?p=1898) + # G_DISTRO 2 Ubuntu 14.04 (No longer supported) + # G_DISTRO 3 Jessie (No longer supported: https://github.com/MichaIng/DietPi/issues/2332) # G_DISTRO 4 Stretch, pulled a muscle! # G_DISTRO 5 Buster - # - Line4 - - # RootFS device path (eg: /dev/mmc01) - # - Line5 - + # ---- Line 4 ---- + # RootFS device path (eg: /dev/mmcblk0p1) + # ---- Line 5 ---- # UUID - # - Line 6 - - # G_HW_ARCH 10 x86_64 (VM) + # ---- Line 6 ---- + # G_HW_ARCH 10 x86_64 # G_HW_ARCH 3 armv8/arm64 # G_HW_ARCH 2 armv7 # G_HW_ARCH 1 armv6 - # G_HW_ARCH 0 unknown - # - Line 7 - + # G_HW_ARCH 0 unsupported + # ---- Line 7 ---- # G_HW_ARCH_DESCRIPTION - # - Line 8 - + # ---- Line 8 ---- # IMAGE_ADDITIONAL_CREDITS (eg: Meveric) - # - Line 9 - Group CPU's + # ---- Line 9 ---- Group CPUs # G_HW_CPUID 0 Not set # G_HW_CPUID 1 H3 # G_HW_CPUID 2 H5 # G_HW_CPUID 3 RK3399 # G_HW_CPUID 4 S922X - # - Line 10 - Onboard WiFi/BT Index + # ---- Line 10 ---- Onboard WiFi/BT Index # HW_ONBOARD_WIFI 0 Not set - # HW_ONBOARD_WIFI 1 RPi3/ZeroW (BCM43438) - # - Line 11 - (RPi only) + # HW_ONBOARD_WIFI 1 RPi3/4/ZeroW (BCM43438) + # ---- Line 11 ---- (RPi only) # HW_MEMORY_SIZE - # - Line 12 - (RPi only) + # ---- Line 12 ---- (RPi only) # HW_REVISION_CODE - # - Line 13 - (RPi only) + # ---- Line 13 ---- (RPi only) # HW_RELEASE_DATEH - # - Line 14 - (RPi only) + # ---- Line 14 ---- (RPi only) # W_PCB_REVISION_CODE - # - Line 15 - (RPi only) + # ---- Line 15 ---- (RPi only) # HW_MANUFACTURER_NAME #//////////////////////////////////// - # Import DietPi-Globals -------------------------------------------------------------- - #. /DietPi/dietpi/func/dietpi-globals # Not required - #export LC_ALL=en_GB.UTF-8 # No locale dependant output scrape - #cd /tmp # No tmp file creation - # Import DietPi-Globals -------------------------------------------------------------- - #///////////////////////////////////////////////////////////////////////////////////// # Obtain Hardware Model index #///////////////////////////////////////////////////////////////////////////////////// @@ -140,7 +134,7 @@ RPi_BoardInfo(){ #----------------------------------------------------------------------------------- - # Obtain device info by revision number: https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md + # Obtain device info by revision code: https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md # - Release dates: https://www.elinux.org/RPi_HardwareHistory # - *' because 10000002 then it indicates that your Raspberry Pi has been over-volted HW_REVISION_CODE=$(mawk '/^Revision/ {print $3;exit}' /proc/cpuinfo) @@ -526,6 +520,7 @@ [[ $HW_REVISION_CODE == *'c03111' ]] && HW_MEMORY_SIZE=4096 HW_MANUFACTURER_NAME='Sony, UK' G_HW_MODEL=4 + HW_ONBOARD_WIFI=1 fi @@ -544,6 +539,7 @@ if (( $G_HW_MODEL == 72 )); then G_HW_MODEL_DESCRIPTION='ROCK Pi 4' + G_HW_CPUID=3 # Beagle Bone Black elif (( $G_HW_MODEL == 71 )); then @@ -656,7 +652,7 @@ G_HW_MODEL_DESCRIPTION='OrangePi PC Plus' G_HW_CPUID=1 - # PineA64 + # Pine A64 elif (( $G_HW_MODEL == 40 )); then G_HW_MODEL_DESCRIPTION='Pine A64' @@ -713,7 +709,7 @@ G_HW_MODEL_DESCRIPTION='OrangePi One' G_HW_CPUID=1 - # OrangePi Pc + # OrangePi PC elif (( $G_HW_MODEL == 30 )); then G_HW_MODEL_DESCRIPTION='OrangePi PC' @@ -784,11 +780,7 @@ fi # Get distro index - if grep -qi 'jessie' /etc/os-release; then - - G_DISTRO=3 - - elif grep -qi 'stretch' /etc/os-release; then + if grep -qi 'stretch' /etc/os-release; then G_DISTRO=4 @@ -803,6 +795,10 @@ HW_UUID=$(mawk 'NR==5 {print}' /DietPi/dietpi/.hw_model) + elif [[ -f '/boot/dietpi/.hw_model' ]]; then + + HW_UUID=$(mawk 'NR==5 {print}' /boot/dietpi/.hw_model) + else HW_UUID=$( /etc/systemd/system/odroid-remote.service -[Unit] -Description=Odroid Remote C1/C2/XU4 - -[Service] -Type=forking -ExecStartPre=$(command -v mkdir) -p /run/lirc -ExecStart=$(command -v lircd) --output=/run/lirc/lircd --driver=default --device=/dev/lirc0 --uinput - -[Install] -WantedBy=multi-user.target -_EOF_ - systemctl daemon-reload - systemctl enable odroid-remote - - # Since Stretch a systemd service exists - else - - systemctl enable lircd - - fi + systemctl enable lircd # - Lircd conf for Odroid Remote cat << _EOF_ > /etc/lirc/lircd.conf @@ -1516,11 +1470,10 @@ Do you want to continue and DISABLE Bluetooth now?'; then grep -q "console=$INPUT_ADDITIONAL" /boot/cmdline.txt || sed -i "/root=/s/$/ console=$INPUT_ADDITIONAL,115200/" /boot/cmdline.txt # - Odroid C2 - elif (( $G_HW_MODEL == 12 || - ( $G_HW_MODEL == 10 && $G_DISTRO == 3 ) )); then #REMOVE v6.24 + elif (( $G_HW_MODEL == 12 )); then local old='' - [[ -f /DietPi/boot.ini ]] && old=$(grep -m1 '^setenv condev "' /DietPi/boot.ini) || return + [[ -f '/DietPi/boot.ini' ]] && old=$(grep -m1 '^setenv condev "' /DietPi/boot.ini) || return [[ $old =~ console=$INPUT_ADDITIONAL ]] && return old=$(cut -d \" -f 2 <<< "$old") G_CONFIG_INJECT 'setenv condev "' "setenv condev \"$old console=$INPUT_ADDITIONAL,115200n8\"" /DietPi/boot.ini @@ -1529,7 +1482,7 @@ Do you want to continue and DISABLE Bluetooth now?'; then elif (( $G_HW_MODEL == 11 )); then local old='' - [[ -f /DietPi/boot.ini ]] && old=$(grep -m1 '^setenv bootrootfs "' /DietPi/boot.ini) || return + [[ -f '/DietPi/boot.ini' ]] && old=$(grep -m1 '^setenv bootrootfs "' /DietPi/boot.ini) || return [[ $old =~ console=$INPUT_ADDITIONAL ]] && return old=$(cut -d \" -f 2 <<< "$old") G_CONFIG_INJECT 'setenv bootrootfs "' "setenv bootrootfs \"$old console=$INPUT_ADDITIONAL,115200n8\"" /DietPi/boot.ini diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 59701e63ad..7f5db66189 100644 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -103,13 +103,8 @@ $FP_SCRIPT setpermissions Applies required filesystem permissions to DietPi spe if [[ $INPUT_MODE_VALUE ]]; then - # Jessie ARMv8: https://github.com/MichaIng/DietPi/issues/2665#issuecomment-477348864 - if (( $G_HW_ARCH == 3 && $G_DISTRO < 4 )); then - - INPUT_MODE_VALUE='http://archive.debian.org/debian/' - # Set defaults? - elif [[ $INPUT_MODE_VALUE == 'default' ]]; then + if [[ $INPUT_MODE_VALUE == 'default' ]]; then if (( $G_HW_MODEL < 10 )); then @@ -142,18 +137,6 @@ deb https://deb.debian.org/debian-security/ $G_DISTRO_NAME/updates main contrib deb $INPUT_MODE_VALUE $G_DISTRO_NAME-backports main contrib non-free _EOF_ - # - Jessie: https://github.com/MichaIng/DietPi/issues/2665#issuecomment-477348864 - if (( $G_DISTRO < 4 )); then - - # - Jessie APT reports warning on httpS://deb.debian.org - sed -i 's|https://deb.debian.org|http://deb.debian.org|g' /etc/apt/sources.list - # - backports and updates have been dropped - sed -Ei '/jessie-(backports|updates)/d' /etc/apt/sources.list - # - ARMv8 has been dropped from security repo - (( $G_HW_ARCH == 3 )) && sed -i '/debian-security/d' /etc/apt/sources.list - - fi - # - Update dietpi.txt entry G_CONFIG_INJECT 'CONFIG_APT_DEBIAN_MIRROR=' "CONFIG_APT_DEBIAN_MIRROR=$INPUT_MODE_VALUE" /DietPi/dietpi.txt @@ -342,14 +325,12 @@ _EOF_ G_AG_CHECK_INSTALL_PREREQ dbus systemctl unmask systemd-timesyncd # Failsafe - systemctl enable systemd-timesyncd - systemctl start systemd-timesyncd + systemctl enable --now systemd-timesyncd # - Else, disable systemd-timesyncd to let "run_ntpd" or other time sync system take control else - systemctl stop systemd-timesyncd - systemctl disable systemd-timesyncd + systemctl disable --now systemd-timesyncd fi diff --git a/dietpi/func/run_ntpd b/dietpi/func/run_ntpd index a940058508..0c35468d05 100644 --- a/dietpi/func/run_ntpd +++ b/dietpi/func/run_ntpd @@ -2,7 +2,7 @@ { #//////////////////////////////////// # DietPi Function: - # - Update ntpd + # - Synchronise system clock with network time # #//////////////////////////////////// # Created by Daniel Knight / daniel.knight@dietpi.com / dietpi.com @@ -10,51 +10,46 @@ #//////////////////////////////////// # # Info: - # - Launches Systemd-timesyncd time sync update + # - Launches systemd-timesyncd for network time sync # # Usage: # - /DietPi/dietpi/func/run_ntpd # - /DietPi/dietpi/func/run_ntpd 1 | Same as above, resets any pre-existing sucessful synced flag before running #//////////////////////////////////// - #Import DietPi-Globals --------------------------------------------------------------- + # Import DietPi-Globals -------------------------------------------------------------- . /DietPi/dietpi/func/dietpi-globals G_PROGRAM_NAME='DietPi-Run_NTPD' G_CHECK_ROOT_USER G_INIT - #Import DietPi-Globals --------------------------------------------------------------- + # Import DietPi-Globals -------------------------------------------------------------- - INPUT=0 - disable_error=1 G_CHECK_VALIDINT "$1" && INPUT=$1 + disable_error=1 G_CHECK_VALIDINT "$1" && INPUT=$1 || INPUT=0 EXIT_CODE=1 FP_EXIT_CODE='/DietPi/dietpi/.timesync_exit_status' - - #NTP_UPDATE_MODE=$(grep -m1 '^[[:blank:]]*CONFIG_NTP_MODE=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') # Do not run doubled - MAX_LOOPS_CHECK=${MAX_LOOPS_CHECK:-60} #*2 = seconds + MAX_LOOPS_CHECK=${MAX_LOOPS_CHECK:-60} # *2 = seconds Update_NTPD(){ - #Loop NTP check until sucess, or, non-G_USER_INPUTS and timed out. + # Loop NTP check until sucess, or, non-G_USER_INPUTS and timeout while (( $EXIT_CODE == 1 )) do NTP_UPDATE_MODE=$(grep -m1 '^[[:blank:]]*CONFIG_NTP_MODE=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') - #systemd-timesyncd - if (( $NTP_UPDATE_MODE >= 1 && $NTP_UPDATE_MODE <= 4 )); then + if (( $NTP_UPDATE_MODE > 0 && $NTP_UPDATE_MODE < 5 )); then G_RUN_CMD systemctl restart systemd-timesyncd for ((i=0; i<=$MAX_LOOPS_CHECK; i++)) do - #NB: Following will always report "Synced", once systemd has completed it once - # - Jessie: "using", Stretch+: "synchronized to" - if systemctl status systemd-timesyncd | grep -qiE '^[[:blank:]]*status: "(synchronized to|using) time server'; then + # NB: Following will always report "Synced", once systemd has completed it once + if systemctl status systemd-timesyncd | grep -qi '^[[:blank:]]*status: "synchronized to time server'; then G_DIETPI-NOTIFY 0 'NTPD: systemd-timesyncd synced' - if (( $NTP_UPDATE_MODE >= 1 && $NTP_UPDATE_MODE <= 3 )); then + if (( $NTP_UPDATE_MODE < 4 )); then systemctl stop systemd-timesyncd #systemctl stop systemd-timedated @@ -66,7 +61,7 @@ elif (( $i == $MAX_LOOPS_CHECK )); then - G_DIETPI-NOTIFY 2 'NTPD: time out waiting for systemd-timesyncd' + G_DIETPI-NOTIFY 2 'NTPD: Timeed out waiting for systemd-timesyncd' if (( $G_USER_INPUTS )); then @@ -106,7 +101,7 @@ NB: We highly recommend choosing "Retry" first. Failing that, "NTP mirror" then # - Automated, allow fail else - EXIT_CODE=2 #end loop. + EXIT_CODE=2 # End loop fi @@ -119,17 +114,17 @@ NB: We highly recommend choosing "Retry" first. Failing that, "NTP mirror" then done - #other method: assume status is ok + # Other method: assume status is ok else - G_DIETPI-NOTIFY 0 'NTPD: manual mode detected' + G_DIETPI-NOTIFY 0 'NTPD: Manual mode detected' EXIT_CODE=0 fi done - # - log status of completion, prevent software installs: https://github.com/MichaIng/DietPi/issues/786 + # Log status of completion, prevent software installs: https://github.com/MichaIng/DietPi/issues/786 echo $EXIT_CODE > $FP_EXIT_CODE } @@ -137,15 +132,11 @@ NB: We highly recommend choosing "Retry" first. Failing that, "NTP mirror" then #///////////////////////////////////////////////////////////////////////////////////// # Main Loop #///////////////////////////////////////////////////////////////////////////////////// - #Reset and force new sync? - if (( $INPUT == 1 )); then - - [[ -f $FP_EXIT_CODE ]] && rm $FP_EXIT_CODE - - fi + # Reset and force new sync? + [[ $INPUT == 1 && -f $FP_EXIT_CODE ]] && rm $FP_EXIT_CODE - #Only run timesync check once, for each boot session. - if [[ -f $FP_EXIT_CODE ]] && (( $(<$FP_EXIT_CODE) == 0 )); then + # Only run timesync check once, for each boot session. + if [[ -f $FP_EXIT_CODE && $(<$FP_EXIT_CODE) == 0 ]]; then EXIT_CODE=0 @@ -155,25 +146,17 @@ NB: We highly recommend choosing "Retry" first. Failing that, "NTP mirror" then fi - #return status - G_DIETPI-NOTIFY -1 $EXIT_CODE 'NTPD: time sync |' + # Return status + G_DIETPI-NOTIFY -1 $EXIT_CODE 'NTPD: Network time sync |' if (( $EXIT_CODE )); then - if (( $NTP_UPDATE_MODE >= 1 && $NTP_UPDATE_MODE <= 4 )); then - - G_DIETPI-NOTIFY 2 'NTPD: Please check the service status for more information:' - G_DIETPI-NOTIFY 2 'NTPD: systemctl status systemd-timesyncd -l' - - else - - echo 'Should never occur' - - fi + G_DIETPI-NOTIFY 2 'Please check the service status for more information:' + G_DIETPI-NOTIFY 2 ' - systemctl status systemd-timesyncd -l' fi #----------------------------------------------------------------------------------- - #return exit code + # Return exit code exit $EXIT_CODE #----------------------------------------------------------------------------------- diff --git a/dietpi/misc/dietpi-arr_to_RAM b/dietpi/misc/dietpi-arr_to_RAM index 66350dd290..5e0feeea67 100644 --- a/dietpi/misc/dietpi-arr_to_RAM +++ b/dietpi/misc/dietpi-arr_to_RAM @@ -249,17 +249,15 @@ ExecStop=/bin/dash -c '/DietPi/dietpi/misc/dietpi-arr_to_RAM 0 2>&1 > $FP_LOG' WantedBy=multi-user.target _EOF_ systemctl daemon-reload - systemctl enable dietpi-arr_to_RAM || EXIT_CODE=$? - systemctl start dietpi-arr_to_RAM || EXIT_CODE=$? + systemctl enable --now dietpi-arr_to_RAM || EXIT_CODE=$? } Disable_On_Boot(){ - if [[ -f /etc/systemd/system/dietpi-arr_to_RAM.service ]]; then + if [[ -f '/etc/systemd/system/dietpi-arr_to_RAM.service' ]]; then - systemctl stop dietpi-arr_to_RAM || EXIT_CODE=$? - systemctl disable dietpi-arr_to_RAM || EXIT_CODE=$? + systemctl disable --now dietpi-arr_to_RAM || EXIT_CODE=$? rm /etc/systemd/system/dietpi-arr_to_RAM.service || EXIT_CODE=$? fi diff --git a/dietpi/patch_file b/dietpi/patch_file index bb1ead65b5..ebd41d317d 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -179,8 +179,8 @@ G_WHIP_MSG 'Notice (locale):\n\nTo resolve broken locales, they have been reset to "en_GB.UTF-8".\n\nIf you had a different locale configured on this system, please use "dietpi-config" at a later date to re-configure.\n\nIn relation to that, DietPi does not use "/etc/environment" anymore, thus it is cleaned. In case you manually edited it, a backup was created: /mnt/dietpi_userdata/environment.bak' #------------------------------------------------------------------------------ #Removed control from DietPi-Services: https://github.com/MichaIng/DietPi/issues/1501 - systemctl enable dnsmasq &> /dev/null; systemctl start dnsmasq &> /dev/null - systemctl enable openvpn &> /dev/null; systemctl start openvpn &> /dev/null + systemctl enable --now dnsmasq &> /dev/null + systemctl enable --now openvpn &> /dev/null #------------------------------------------------------------------------------- #https://dietpi.com/phpbb/viewtopic.php?f=11&t=2772&p=10646#p10646 [[ -f '/etc/apt/sources.list.d/openmediavault.list' ]] && rm /etc/apt/sources.list.d/openmediavault.list @@ -294,9 +294,9 @@ _EOF_ if [[ -f '/DietPi/dietpi/.dietpi-letsencrypt' ]]; then # - Switch Minio to new certbot.service.d/ hook: - if (( $G_DISTRO > 3 )) && grep -q '^aSOFTWARE_INSTALL_STATE\[158\]=2' /DietPi/dietpi/.installed; then + if grep -q '^aSOFTWARE_INSTALL_STATE\[158\]=2' /DietPi/dietpi/.installed; then - [[ -f /etc/systemd/system/certbot.service ]] && rm /etc/systemd/system/certbot.service + [[ -f '/etc/systemd/system/certbot.service' ]] && rm /etc/systemd/system/certbot.service fi # - Overall settings and config renewal: @@ -454,15 +454,7 @@ _EOF_ #Reinstall firmware-misc-nonfree by default (ralink): https://github.com/MichaIng/DietPi/issues/1675 if dpkg-query -s wpasupplicant &> /dev/null; then - if (( $G_DISTRO == 3 )); then - - G_AGI firmware-ralink - - else - - G_AGI firmware-misc-nonfree - - fi + G_AGI firmware-misc-nonfree elif (( $G_HW_ARCH == 10 && $G_HW_MODEL != 20 )); then @@ -739,9 +731,6 @@ _EOF_ fi #------------------------------------------------------------------------------- - # - ARM64 packages no longer available: https://github.com/MichaIng/DietPi/issues/1915 - (( $G_DISTRO < 4 && $G_HW_ARCH == 3 )) && sed -i '/debian-security/d' /etc/apt/sources.list - #------------------------------------------------------------------------------- #Fix Xserver uninstall issus by not purging dependencies, but leaving them for autoremove: https://github.com/MichaIng/DietPi/pull/1930/files local dpkg_list=$(dpkg --get-selections) grep -q '^xinit[[:space:]]' <<< "$dpkg_list" && apt-mark auto xauth x11-common @@ -790,8 +779,7 @@ _EOF_ #Mask systemd-logind as new default, if libpam-systemd is not installed: https://github.com/MichaIng/DietPi/issues/1767 if ! dpkg-query -s 'libpam-systemd' &> /dev/null; then - systemctl stop systemd-logind &> /dev/null - systemctl disable systemd-logind &> /dev/null + systemctl disable --now systemd-logind &> /dev/null systemctl mask systemd-logind fi @@ -1153,12 +1141,12 @@ _EOF_ #------------------------------------------------------------------------------- # - Remove mysql.service as we use mariadb.service, both cannot exist: https://github.com/MichaIng/DietPi/issues/1913#issuecomment-441343798 - if [[ -f '/etc/init.d/mysql' ]] && (( $G_DISTRO >= 4 )); then + if [[ -f '/etc/init.d/mysql' ]]; then G_DIETPI-NOTIFY 2 'Switching from /etc/init.d/mysql to mariadb.service' - killall -w mariadb &> /dev/null #failsafe - killall -w mysqld &> /dev/null #failsafe + killall -w mariadb &> /dev/null # failsafe + killall -w mysqld &> /dev/null # failsafe systemctl stop mysql rm /etc/init.d/mysql systemctl daemon-reload @@ -1184,7 +1172,7 @@ _EOF_ /DietPi/dietpi/dietpi-software reinstall 106 121 123 144 145 # - Switch to "mariadb" systemd service on Stretch+: https://github.com/MichaIng/DietPi/pull/2196 - if (( $G_DISTRO > 3 )) && grep -q '^aSOFTWARE_INSTALL_STATE\[88\]=2' /DietPi/dietpi/.installed; then + if grep -q '^aSOFTWARE_INSTALL_STATE\[88\]=2' /DietPi/dietpi/.installed; then G_WHIP_MSG '[ INFO ] Switch from "mysql" to "mariadb" service\n On Stretch (and above) systems, DietPi-Services will use the pre-installed "mariadb" systemd service now, instead of the obsolete "mysql" init.d service.\n @@ -1395,15 +1383,6 @@ Pin-Priority: -1' > /etc/apt/preferences.d/dietpi-docker_fix #.dietpi-autostart_index removal, if zero: https://github.com/MichaIng/DietPi/pull/2343 [[ -f '/DietPi/dietpi/.dietpi-autostart_index' ]] && (( $( /dev/null); then - - openssl enc -e -a -md sha256 -aes-256-cbc -salt -pass pass:'DietPiRocks!' -out /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin <<< $global_pw - - fi - #------------------------------------------------------------------------------- #Nextcloud: Add OCM/OCS provider redirects as this is checked and printed as warning on admin panel: https://github.com/MichaIng/DietPi/issues/2638 if [[ -f '/etc/apache2/sites-available/dietpi-nextcloud.conf' ]] && ! grep -q 'oc[ms]-provider' /etc/apache2/sites-available/dietpi-nextcloud.conf; then @@ -1730,20 +1700,10 @@ NB: When accessing "deluge-console" you need to do that as user "debian-deluged" if (( $G_DIETPI_INSTALL_STAGE == 2 )); then # Infom Sonarr/Radarr/Lidarr users about DietPi-Arr_to_RAM: https://github.com/MichaIng/DietPi/pull/2698 - # - Skip on Jessie: https://github.com/MichaIng/DietPi/issues/2689#issuecomment-487306241 - if (( $G_DISTRO > 3 )) && grep -qE '^aSOFTWARE_INSTALL_STATE\[(106|144|145)\]=2' /DietPi/dietpi/.installed; then - - G_WHIP_MSG 'DietPi-Arr_to_RAM | Link Sonarr/Radarr/Lidarr database files to RAM\n + grep -qE '^aSOFTWARE_INSTALL_STATE\[(106|144|145)\]=2' /DietPi/dietpi/.installed && G_WHIP_MSG 'DietPi-Arr_to_RAM | Link Sonarr/Radarr/Lidarr database files to RAM\n With v6.18 we silently added a new script that allows linking Sonarr/Radarr/Lidarr database files to RAM, increasing access performance, reducing disk I/O and avoiding constant external HDD spinning due to the very regular access to these files.\n This script has gone through some rework and polishing with v6.23 and can now be enabled to automatically link those databases to RAM on boot and store them back to disk on shutdown.\n Further info and usage: https://dietpi.com/phpbb/viewtopic.php?f=8&t=5828' - #----------------------------------------------------------------------- - # Jessie C1 switch to Stretch | should not occur for pre-patch compatible versions and auto switch over to jessie-support for existing installs. - elif (( $G_HW_MODEL == 10 )); then - - G_WHIP_MSG '[INFO] Odroid C1 image has been updated to Stretch. Please upgrade to continue limited support for this device:\nhttps://github.com/MichaIng/DietPi/issues/2561#issuecomment-488685121' - - fi #----------------------------------------------------------------------- # Fix IPv6 connections with WireGuard: https://github.com/MichaIng/DietPi/issues/2691 if [[ -f '/etc/wireguard/wg0.conf' ]] && ! grep -q 'sysctl' /etc/wireguard/wg0.conf; then @@ -1897,7 +1857,7 @@ Your Nextcloud data are not touched.' # Logitech Media Server: https://github.com/MichaIng/DietPi/commit/eccef6700381c3f044ec4d435beb167736db0bb4 if [[ -f '/etc/systemd/system/squeezeboxserver.service' ]]; then - systemctl disable squeezeboxserver + systemctl disable --now squeezeboxserver mv /etc/systemd/system/squeezeboxserver.service /etc/systemd/system/logitechmediaserver.service fi @@ -1940,8 +1900,7 @@ opcache.max_accelerated_files=10000\nopcache.memory_consumption=128\nopcache.sav # Upgrade Nextcloud if (( $upgrade_nextcloud )); then - local mariadb='mariadb'; (( $G_DISTRO < 4 )) && mariadb='mysql' - G_RUN_CMD systemctl start $mariadb redis-server + G_RUN_CMD systemctl start mariadb redis-server ncc upgrade ncc db:add-missing-indices ncc db:convert-filecache-bigint @@ -2040,12 +1999,7 @@ Use "dietpi-config" to adjust these settings to your needs.' do [[ -e $i ]] || continue - if [[ -f $i ]]; then - - systemctl stop ${i##*/} - systemctl disable ${i##*/} - - fi + [[ -f $i ]] && systemctl disable --now ${i##*/} rm -R $i done diff --git a/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash b/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash index 4fea0d9f1e..5fce3fdc48 100755 --- a/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash +++ b/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash @@ -185,19 +185,9 @@ (( $G_HW_MODEL < 10 )) && target_repo='CONFIG_APT_RASPBIAN_MIRROR' /DietPi/dietpi/func/dietpi-set_software apt-mirror "$(grep -m1 "^[[:blank:]]*$target_repo=" /DietPi/dietpi.txt | sed 's/^[^=]*=//')" - # Generate unique Dropbear host keys: + # Regenerate unique Dropbear host keys: rm -f /etc/dropbear/*_host_key - # - Distro specific package and on Jessie, ECDSA is not created automatically - if (( $G_DISTRO < 4 )); then - - dpkg-reconfigure -f noninteractive dropbear - dropbearkey -t ecdsa -f /etc/dropbear/dropbear_ecdsa_host_key - - else - - dpkg-reconfigure -f noninteractive dropbear-run - - fi + dpkg-reconfigure -f noninteractive dropbear-run # Recreate machine-id: https://github.com/MichaIng/DietPi/issues/2015 [[ -f '/etc/machine-id' ]] && rm /etc/machine-id From 5b9f0af9c115b608562ac26f330fc6684ef0e5db Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 7 Jul 2019 22:03:48 +0200 Subject: [PATCH 009/184] v6.26 + DietPi-LetsEncrypt | Minor coding and wording --- dietpi/dietpi-letsencrypt | 83 +++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 42 deletions(-) diff --git a/dietpi/dietpi-letsencrypt b/dietpi/dietpi-letsencrypt index cdbf94e4ed..3ac68b6ed7 100644 --- a/dietpi/dietpi-letsencrypt +++ b/dietpi/dietpi-letsencrypt @@ -38,8 +38,8 @@ # Add post-renewal tasks via systemd unit drop-in FP_RENEWAL='/etc/systemd/system/certbot.service.d' - LETSENCRYPT_DOMAIN='mydomain.com' - LETSENCRYPT_EMAIL='myemail@email.com' + LETSENCRYPT_DOMAIN='mydomain.org' + LETSENCRYPT_EMAIL='myemail@email.org' LETSENCRYPT_REDIRECT=0 LETSENCRYPT_HSTS=0 LETSENCRYPT_KEYSIZE=4096 @@ -69,7 +69,7 @@ # - Cert me up Apache2 # If cert exists already, attempt renewal. This allows easy configuration update via "dietpi-letsencrypt 1" without using up limited certs per week. - if [[ -f $fp_cert_dir/cert.pem ]]; then + if [[ -f $fp_cert_dir'/cert.pem' ]]; then $FP_BINARY renew local exit_code=$? @@ -82,8 +82,8 @@ fi if (( $exit_code )); then - echo "[FAILED] CertBot failed with error code ($exit_code), please check it's terminal output. Aborting..." | tee $FP_LOGFILE - (( $INPUT )) || G_WHIP_MSG "[FAILURE] CertBot failed with error code ($exit_code), please check it's terminal output. Aborting..." + echo "[FAILED] CertBot failed with error code ($exit_code), please check its terminal output. Aborting..." | tee $FP_LOGFILE + (( $INPUT )) || G_WHIP_MSG "[FAILURE] CertBot failed with error code ($exit_code), please check its terminal output. Aborting..." return 1 fi @@ -95,7 +95,7 @@ G_DIETPI-NOTIFY 0 'Lighttpd webserver detected' # - Cert me up - if [[ -f $fp_cert_dir/cert.pem ]]; then + if [[ -f $fp_cert_dir'/cert.pem' ]]; then $FP_BINARY renew local exit_code=$? @@ -108,15 +108,15 @@ fi if (( $exit_code )); then - echo "[FAILED] CertBot failed with error code ($exit_code), please check it's terminal output. Aborting..." | tee $FP_LOGFILE - (( $INPUT )) || G_WHIP_MSG "[FAILURE] CertBot failed with error code ($exit_code), please check it's terminal output. Aborting..." + echo "[FAILED] CertBot failed with error code ($exit_code), please check its terminal output. Aborting..." | tee $FP_LOGFILE + (( $INPUT )) || G_WHIP_MSG "[FAILURE] CertBot failed with error code ($exit_code), please check its terminal output. Aborting..." return 1 fi # - Create combined key cat "$fp_cert_dir/privkey.pem" "$fp_cert_dir/cert.pem" > "$fp_cert_dir/combined.pem" - if [[ ! -f $fp_cert_dir/combined.pem ]]; then + if [[ ! -f $fp_cert_dir'/combined.pem' ]]; then echo "[FAILED] $fp_cert_dir/combined.pem could not be created. Please check existence of privkey.pem and cert.pem within this folder, as result of CertBot execution. Aborting..." | tee $FP_LOGFILE (( $INPUT )) || G_WHIP_MSG "[FAILED] $fp_cert_dir/combined.pem could not be created. Please check existence of privkey.pem and cert.pem within this folder, as result of CertBot execution. Aborting..." @@ -210,7 +210,7 @@ _EOF_ G_CONFIG_INJECT 'server_name[[:blank:]]' " server_name $LETSENCRYPT_DOMAIN;" "$fp_defaultsite" 'listen[[:blank:]]' # - Restart Nginx to apply server_name change - systemctl restart nginx + G_RUN_CMD systemctl restart nginx local options='--nginx' (( $LETSENCRYPT_REDIRECT )) && options+=' --redirect' || options+=' --no-redirect' @@ -230,8 +230,8 @@ _EOF_ fi if (( $exit_code )); then - echo "[FAILURE] CertBot failed with error code ($exit_code), please check it's terminal output. Aborting..." | tee $FP_LOGFILE - (( $INPUT )) || G_WHIP_MSG "[FAILURE] CertBot failed with error code ($exit_code), please check it's terminal output. Aborting..." + echo "[FAILURE] CertBot failed with error code ($exit_code), please check its terminal output. Aborting..." | tee $FP_LOGFILE + (( $INPUT )) || G_WHIP_MSG "[FAILURE] CertBot failed with error code ($exit_code), please check its terminal output. Aborting..." return 1 fi @@ -265,8 +265,8 @@ _EOF_ fi if (( $exit_code )); then - echo "[FAILURE] CertBot failed with error code ($exit_code), please check it's terminal output. Aborting..." | tee $FP_LOGFILE - (( $INPUT )) || G_WHIP_MSG "[FAILURE] CertBot failed with error code ($exit_code), please check it's terminal output. Aborting..." + echo "[FAILURE] CertBot failed with error code ($exit_code), please check its terminal output. Aborting..." | tee $FP_LOGFILE + (( $INPUT )) || G_WHIP_MSG "[FAILURE] CertBot failed with error code ($exit_code), please check its terminal output. Aborting..." return 1 fi @@ -316,14 +316,15 @@ _EOF_ # - Change permissions on renewal script G_RUN_CMD chmod +x /home/minio-user/.minio/dietpi-cert-renewl.sh - # Add Minio renewal to certbot system service + # - Add Minio renewal to certbot system service [[ -d $FP_RENEWAL ]] || mkdir "$FP_RENEWAL" cat << _EOF_ > "$FP_RENEWAL"/dietpi-minio.conf [Service] ExecStartPost=/home/minio-user/.minio/dietpi-cert-renewl.sh &>> $FP_LOGFILE _EOF_ - echo '[ INFO ] HTTPS redirect and HSTS is not supported for Minio, thus will be ignored.' | tee $FP_LOGFILE + # - Inform user that HTTPS redirect and HSTS is not supported for Minio, if chosen + (( $LETSENCRYPT_REDIRECT || $LETSENCRYPT_HSTS )) && echo '[ INFO ] HTTPS redirect and HSTS is not supported for Minio, thus will be ignored.' | tee $FP_LOGFILE else @@ -400,16 +401,9 @@ _EOF_ local input_desc=$2 G_WHIP_DEFAULT_ITEM=$input_value - if G_WHIP_INPUTBOX "Please enter a value for $input_desc"; then + G_WHIP_INPUTBOX "Please enter a value for $input_desc" || return 1 - input_value=$G_WHIP_RETURNED_VALUE - - # Prevent null values - [[ $input_value ]] || input_value='NULL' - - fi - - echo "$input_value" + echo "${G_WHIP_RETURNED_VALUE:-NULL}" } @@ -443,13 +437,22 @@ _EOF_ 'Domain') - while : + local new=$LETSENCRYPT_DOMAIN + local error='' + while new=$(Input_Box "$new" "Website-Domain$error") do - LETSENCRYPT_DOMAIN=$(Input_Box "$LETSENCRYPT_DOMAIN" Website-Domain) - [[ $LETSENCRYPT_DOMAIN == *?.?* && ! $(sed 's/\.//g' <<< "$LETSENCRYPT_DOMAIN") =~ ^[0-9]*$ ]] && break + # Must contain at least one dot with leading secondary domain and trailing top domain + # Must not be an IP address with integers and dots only + if [[ $new == *?.?* && $new == *[^0-9.]* ]]; then + + LETSENCRYPT_DOMAIN=$new - G_WHIP_MSG "[FAILED] \"$LETSENCRYPT_DOMAIN\" is no valid domain name.\n\nNote that raw IP addresses are not allowed by LetsEncrypt, thus a domain is required.\nYou can install No-IP with DietPi-Software to aquire one.\n\nPlease try again..." + else + + error="\n\n[FAILED] \"$new\" is no valid domain name.\n\nNote that raw IP addresses are not allowed by Let's Encrypt, thus a domain is required.\nYou can install No-IP with DietPi-Software to aquire one.\n\nPlease retry..." + + fi done @@ -477,19 +480,15 @@ _EOF_ G_WHIP_YESNO 'HTTP Strict Transport Security (HSTS)\n Carefully read the following, before enabling this feature: - -HSTS will make your browser remember that it accessed your domain/IP via HTTPS for one or half a year. +\nHSTS will make your browser remember that it accessed your domain/IP via HTTPS for one or half a year. From then on, it will always access the same domain/IP via HTTPS, denying all HTTP access attempts. This increases security in addition to encrypted traffic, as noone can silently redirect you to a fake web page. HTTPS forces web pages to verify their identity via the HTTPS certificate, which cannot be faked in a reasonable time. - -The downside is, your browser will deny access to all non-HTTPS web applications behind the same domain/IP. +\nThe downside is, your browser will deny access to all non-HTTPS web applications behind the same domain/IP. EG: "Sonarr" uses a standalone web server contained within the application. This uses a custom port, which can be recognized as you need to add a non-default port to your IP/domain to access it: "192.168.0.100:8989". Enabling HSTS will prevent access to applications which use a standalone webserver. - -It is possible to enable HTTPS support for standalone web servers, however, you will need to research and achieve this manually. - -Are you sure that you want to enable HTTP Strict Transport Security?' && LETSENCRYPT_HSTS=1 +\nIt is possible to enable HTTPS support for standalone web servers, however, you will need to research and achieve this manually. +\nAre you sure that you want to enable HTTP Strict Transport Security?' && LETSENCRYPT_HSTS=1 fi @@ -503,12 +502,12 @@ Are you sure that you want to enable HTTP Strict Transport Security?' && LETSENC 'Apply') - if G_WHIP_YESNO 'LetsEncrypt will now be run. This will: -- Create your free SSL cert. -- Automatically apply and enable your SSL cert + if G_WHIP_YESNO 'CertBot will now run, which will: +- Create your free SSL certificate +- Automatically apply your SSL certificate to the webserver +- Enable HTTPS for all web applications which use "/var/www/" - NB: This process can take a long time, please be patient. -- NB: HTTPS will automatically be applied to the webserver and applications which use "/var/www/*". - Applications which use their own webserver (these usually have their own :port number), will not be available under HTTPS, and, these will need to be configured manually. + This does not apply to applications which use their own webserver, which usually have their own :port number. These will need to be configured manually. \nWould you like to continue?'; then Write_Settings_File From 36560dcf7c6ea40094756c1e6d1023a08eba71a9 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 7 Jul 2019 22:22:56 +0200 Subject: [PATCH 010/184] v6.26 + DietPi-LetsEncrypt | Exit domain loop when valid value has been applied + DietPi-LetsEncrypt | Minor menu wording and style --- dietpi/dietpi-letsencrypt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dietpi/dietpi-letsencrypt b/dietpi/dietpi-letsencrypt index 3ac68b6ed7..2f2be25c6f 100644 --- a/dietpi/dietpi-letsencrypt +++ b/dietpi/dietpi-letsencrypt @@ -418,12 +418,12 @@ _EOF_ G_WHIP_MENU_ARRAY=( - 'Domain' ": $LETSENCRYPT_DOMAIN" - 'Email' ": $LETSENCRYPT_EMAIL" + 'Domain' ": [$LETSENCRYPT_DOMAIN]" + 'Email' ": [$LETSENCRYPT_EMAIL]" 'Redirect' ": $redirect_text" 'HSTS' ": $hsts_text" - 'Key Size' ": $LETSENCRYPT_KEYSIZE" - 'Apply' 'Runs Lets Encrypt with your chosen options.' + 'Key Size' ": [$LETSENCRYPT_KEYSIZE bits]" + 'Apply' ': Runs CertBot with your chosen options' ) @@ -447,6 +447,7 @@ _EOF_ if [[ $new == *?.?* && $new == *[^0-9.]* ]]; then LETSENCRYPT_DOMAIN=$new + break else From a3b0f7ae447fd01ee5d2d0e5c92945c877bd2f2c Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Mon, 8 Jul 2019 15:36:22 +0200 Subject: [PATCH 011/184] v6.26 + DietPi-Software | Sonarr: Switch to long version APT repo key + DietPi-Software | Sonarr: Update ARMv8 binary download to new forwarded download URL + DietPi-Software | Mono: Use Raspbian repo for all RPis + DietPi-Software | Raspotify: Switch APT repo to new "raspotify" code name, "jessie" was just left as link for backwards compatibility + DietPi-Software | Add tailing slash to APT repo URLs to avoid one 301 redirect --- dietpi/dietpi-software | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 3ee1e952fa..ab1c6082bc 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -4542,7 +4542,7 @@ _EOF_ G_CHECK_URL "$INSTALL_URL_ADDRESS" curl -sSL "$INSTALL_URL_ADDRESS" | apt-key add - - echo "deb https://repos.influxdata.com/debian $G_DISTRO_NAME stable" > /etc/apt/sources.list.d/influxdb.list + echo "deb https://repos.influxdata.com/debian/ $G_DISTRO_NAME stable" > /etc/apt/sources.list.d/influxdb.list G_AGUP G_AGI influxdb @@ -4556,11 +4556,11 @@ _EOF_ # APT repo GPG key INSTALL_URL_ADDRESS='https://packages.grafana.com/gpg.key' - local deb_address='deb https://packages.grafana.com/oss/deb stable main' + local deb_address='deb https://packages.grafana.com/oss/deb/ stable main' if (( $G_HW_ARCH == 1 )); then INSTALL_URL_ADDRESS='https://bintray.com/user/downloadSubjectPublicKey?username=bintray' - deb_address="deb https://dl.bintray.com/fg2it/deb-rpi-1b $G_DISTRO_NAME main" + deb_address="deb https://dl.bintray.com/fg2it/deb-rpi-1b/ $G_DISTRO_NAME main" fi @@ -5027,7 +5027,7 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior curl -sSL "$INSTALL_URL_ADDRESS" | apt-key add - # Apply APT repo - echo 'deb https://downloads.plex.tv/repo/deb public main' > /etc/apt/sources.list.d/plexmediaserver.list + echo 'deb https://downloads.plex.tv/repo/deb/ public main' > /etc/apt/sources.list.d/plexmediaserver.list # Update APT lists G_AGUP @@ -5448,12 +5448,12 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior if (( $G_HW_ARCH == 3 )); then DEPS_LIST='mediainfo' - Download_Install 'https://update.sonarr.tv/v2/develop/mono/NzbDrone.develop.tar.gz' /opt + Download_Install 'https://download.sonarr.tv/v2/develop/mono/NzbDrone.develop.tar.gz' /opt # Repo install else - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FDA5DFFC + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493 echo 'deb https://apt.sonarr.tv/ develop main' > /etc/apt/sources.list.d/sonarr.list G_AGUP G_AGI nzbdrone @@ -5890,13 +5890,13 @@ Pin-Priority: -1' > /etc/apt/preferences.d/dietpi-docker_fix software_id=167 # Raspotify if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then - Banner_Installing + Banner_Installing # https://dtcooper.github.io/raspotify/#hard-installation INSTALL_URL_ADDRESS='https://dtcooper.github.io/raspotify/key.asc' G_CHECK_URL "$INSTALL_URL_ADDRESS" curl -sSL "$INSTALL_URL_ADDRESS" | apt-key add - - echo 'deb https://dtcooper.github.io/raspotify jessie main' > /etc/apt/sources.list.d/raspotify.list + echo 'deb https://dtcooper.github.io/raspotify/ raspotify main' > /etc/apt/sources.list.d/raspotify.list G_AGUP G_AGI raspotify @@ -6546,27 +6546,27 @@ Mycroft AI requires at least 2 GiB memory on first start. We will now increase y software_id=150 # Mono runtime if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then - Banner_Installing + Banner_Installing # https://www.mono-project.com/download/stable/#download-lin-debian apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF - # RPis + ARMv6 only available in Raspbian repo: https://github.com/MichaIng/DietPi/issues/1023 - if (( $G_HW_MODEL < 10 || $G_HW_ARCH == 1 )); then + # On RPi use separate Raspbian repo: https://github.com/MichaIng/DietPi/issues/1023 + if (( $G_HW_MODEL < 10 )); then - echo "deb https://download.mono-project.com/repo/debian raspbian$G_DISTRO_NAME main" > /etc/apt/sources.list.d/mono-xamarin.list + echo "deb https://download.mono-project.com/repo/debian/ raspbian$G_DISTRO_NAME main" > /etc/apt/sources.list.d/mono-xamarin.list else - echo "deb https://download.mono-project.com/repo/debian $G_DISTRO_NAME main" > /etc/apt/sources.list.d/mono-xamarin.list + echo "deb https://download.mono-project.com/repo/debian/ $G_DISTRO_NAME main" > /etc/apt/sources.list.d/mono-xamarin.list fi # - Buster: Revert to Stretch, since Buster is not yet available sed -i 's/buster/stretch/g' /etc/apt/sources.list.d/mono-xamarin.list G_AGUP - G_AGI mono-runtime mono-complete - rm /tmp/mono* &> /dev/null # https://github.com/MichaIng/DietPi/issues/1877#issuecomment-403856446 + + rm -f /tmp/mono* # https://github.com/MichaIng/DietPi/issues/1877#issuecomment-403856446 fi From 4c6c5626f7349219fd41d7b2d57e740eafe150e0 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Mon, 8 Jul 2019 16:26:37 +0200 Subject: [PATCH 012/184] META | DietPi-Survey_report: Remove TightVNC from v6.26 + minor coding --- .meta/dietpi-survey_report | 40 +++++++++++++++----------------------- 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index f803d6104e..db32ae2cae 100644 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -64,7 +64,7 @@ aBENCH_LAN_INDEX=() aBENCH_CUSTOMFS_INDEX=() - #[$HW_MODEL,${aBENCH_XX_INDEX[$HW_MODEL]}] + # [$HW_MODEL,${aBENCH_XX_INDEX[$HW_MODEL]}] declare -A aBENCH_CPU declare -A aBENCH_ROOTFS_WRITE declare -A aBENCH_ROOTFS_READ @@ -78,7 +78,7 @@ declare -A aBENCH_CUSTOMFS_READ declare -A aBENCH_NET_LAN_SPEED - #Results + # Results BENCH_RESULTS_CPU_SCALE=1 aBENCH_RESULT_CPU_MIN=() aBENCH_RESULT_CPU_MAX=() @@ -133,7 +133,6 @@ declare -A aDISTRO_VERSION declare -A aAUTOSTART_OPTION declare -A aSOFTWARE - # v6.10 additions aAUTO_SETUP_AUTOMATED=( [0]=0 [1]=0 @@ -310,7 +309,7 @@ aSOFTWARE_NAME[145]='Radarr' aSOFTWARE_NAME[146]='Tautulli' aSOFTWARE_NAME[147]='Jackett' - aSOFTWARE_NAME[148]='148' + aSOFTWARE_NAME[148]=148 aSOFTWARE_NAME[149]='NZBget' aSOFTWARE_NAME[150]='Mono' aSOFTWARE_NAME[151]='Nvidia' @@ -330,23 +329,17 @@ aSOFTWARE_NAME[165]='Gitea' aSOFTWARE_NAME[166]='PI-SPC' aSOFTWARE_NAME[167]='Raspotify' - aSOFTWARE_NAME[168]='168' + aSOFTWARE_NAME[168]=168 aSOFTWARE_NAME[169]='Google AIY' - # - v6.14 (earliest version that can upload to ssh.dietpi.com) + # - v6.14 (earliest version that uploads to ssh.dietpi.com) aSOFTWARE_NAME6_14=() - for i in ${!aSOFTWARE_NAME[@]} - do - - aSOFTWARE_NAME6_14[$i]=${aSOFTWARE_NAME[$i]} - - done - # - v6.15 aSOFTWARE_NAME6_15=() - for i in ${!aSOFTWARE_NAME6_14[@]} + for i in ${!aSOFTWARE_NAME[@]} do + aSOFTWARE_NAME6_14[$i]=${aSOFTWARE_NAME[$i]} aSOFTWARE_NAME6_15[$i]=${aSOFTWARE_NAME6_14[$i]} done @@ -417,6 +410,7 @@ aSOFTWARE_NAME6_26[$i]=${aSOFTWARE_NAME6_25[$i]} done + aSOFTWARE_NAME6_26[27]=27 Main(){ @@ -440,7 +434,7 @@ fi # Source survey files - if grep -q '^#!/bin/bash' $file; then + if [[ $(<$file) == '#!/bin/bash'* ]]; then . $file @@ -512,7 +506,7 @@ fi - #Done, clear vars + # - Done, clear vars unset BENCH_VERSION unset BENCH_HW_MODEL unset BENCH_CPU @@ -538,7 +532,7 @@ # Clean up reports dir rm -R /tmp/dietpi-survey_report - #Process all results, for later use in HTML printout + # Process all results, for later use in HTML printout # - NB: HW_MODEL array based local default_min_value=100000 @@ -599,7 +593,7 @@ fi (( aBENCH_RESULT_CPU_TEMP_END_AVG[$i] += ${aBENCH_CPU_TEMP_END[$i,$j]} )) - #Last item in current array. Work out averages + # Last item in current array. Work out averages if (( $j == ${aBENCH_CPU_INDEX[$i]} - 1 )); then aBENCH_RESULT_CPU_AVG[$i]=$(bc -l <<< "scale=$BENCH_RESULTS_CPU_SCALE; ${aBENCH_RESULT_CPU_AVG[$i]} / ${aBENCH_CPU_INDEX[$i]}") @@ -659,7 +653,7 @@ fi (( aBENCH_RESULT_ROOTFS_READ_AVG[$i] += ${aBENCH_ROOTFS_READ[$i,$j]} )) - #Last item in current array. Work out averages + # Last item in current array. Work out averages if (( $j == ${aBENCH_ROOTFS_INDEX[$i]} - 1 )); then aBENCH_RESULT_ROOTFS_WRITE_AVG[$i]=$(( ${aBENCH_RESULT_ROOTFS_WRITE_AVG[$i]} / ${aBENCH_ROOTFS_INDEX[$i]} )) @@ -685,7 +679,6 @@ aBENCH_RESULT_RAM_WRITE_MIN[$i]=$default_min_value aBENCH_RESULT_RAM_WRITE_MAX[$i]=0 aBENCH_RESULT_RAM_WRITE_AVG[$i]=0 - aBENCH_RESULT_RAM_READ_MIN[$i]=$default_min_value aBENCH_RESULT_RAM_READ_MAX[$i]=0 aBENCH_RESULT_RAM_READ_AVG[$i]=0 @@ -718,7 +711,7 @@ fi (( aBENCH_RESULT_RAM_READ_AVG[$i] += ${aBENCH_RAM_READ[$i,$j]} )) - #Last item in current array. Work out averages + # Last item in current array. Work out averages if (( $j == ${aBENCH_RAM_INDEX[$i]} - 1 )); then aBENCH_RESULT_RAM_WRITE_AVG[$i]=$(( ${aBENCH_RESULT_RAM_WRITE_AVG[$i]} / ${aBENCH_RAM_INDEX[$i]} )) @@ -748,7 +741,6 @@ for (( j=0; j<${aBENCH_LAN_INDEX[$i]}; j++ )) do - #LAN # echo "aBENCH_NET_LAN_SPEED[$i,$j] ${aBENCH_NET_LAN_SPEED[$i,$j]}" if (( ${aBENCH_NET_LAN_SPEED[$i,$j]} < ${aBENCH_RESULT_NET_LAN_SPEED_MIN[$i]} )); then @@ -762,7 +754,7 @@ fi (( aBENCH_RESULT_NET_LAN_SPEED_AVG[$i] += ${aBENCH_NET_LAN_SPEED[$i,$j]} )) - #Last item in current array. Work out averages + # Last item in current array. Work out averages if (( $j == ${aBENCH_LAN_INDEX[$i]} - 1 )); then aBENCH_RESULT_NET_LAN_SPEED_AVG[$i]=$(( ${aBENCH_RESULT_NET_LAN_SPEED_AVG[$i]} / ${aBENCH_LAN_INDEX[$i]} )) @@ -812,7 +804,7 @@ fi (( aBENCH_RESULT_CUSTOMFS_READ_AVG[$i] += ${aBENCH_CUSTOMFS_READ[$i,$j]} )) - #Last item in current array. Work out averages + # Last item in current array. Work out averages if (( $j == ${aBENCH_CUSTOMFS_INDEX[$i]} - 1 )); then aBENCH_RESULT_CUSTOMFS_WRITE_AVG[$i]=$(( ${aBENCH_RESULT_CUSTOMFS_WRITE_AVG[$i]} / ${aBENCH_CUSTOMFS_INDEX[$i]} )) From 314112ba6a1fbb557e1c1985e470e0179733facc Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Mon, 8 Jul 2019 20:12:24 +0200 Subject: [PATCH 013/184] META | DietPi-Survey_report | Remove debug code, fix case of HW model == "-1" and minor coding --- .meta/dietpi-survey_report | 128 +++++++++++++------------------------ 1 file changed, 44 insertions(+), 84 deletions(-) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index db32ae2cae..e0b5d65d88 100644 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -439,85 +439,79 @@ . $file # - Add bench to array - if [[ $BENCH_VERSION ]]; then - - if [[ $G_DEBUG == 1 ]]; then - - echo "DEBUG $file: BENCH_VERSION=$BENCH_VERSION | BENCH_HW_MODEL=$BENCH_HW_MODEL BENCH_CPU=$BENCH_CPU | BENCH_ROOTFS_WRITE=$BENCH_ROOTFS_WRITE | BENCH_ROOTFS_READ=$BENCH_ROOTFS_READ | BENCH_RAM_WRITE=$BENCH_RAM_WRITE | BENCH_RAM_READ=$BENCH_RAM_READ | BENCH_CPU_TEMP_START=$BENCH_CPU_TEMP_START | BENCH_CPU_TEMP_END=$BENCH_CPU_TEMP_END | BENCH_CUSTOMFS_WRITE=$BENCH_CUSTOMFS_WRITE | BENCH_CUSTOMFS_READ=$BENCH_CUSTOMFS_READ | BENCH_NET_LAN_SPEED=$BENCH_NET_LAN_SPEED" - - fi + if [[ $BENCH_HW_MODEL =~ ^[0-9]+$ ]]; then # - CPU - if [[ ${BENCH_CPU//.*} =~ ^-?[0-9]+$ && - $BENCH_CPU_TEMP_START =~ ^-?[0-9]+$ && $BENCH_CPU_TEMP_END =~ ^-?[0-9]+$ ]]; then + # Remove decimal places + BENCH_CPU_TEMP_START=${BENCH_CPU_TEMP_START%%.*} + BENCH_CPU_TEMP_END=${BENCH_CPU_TEMP_END%%.*} + if [[ ${BENCH_CPU%%.*} =~ ^[0-9]+$ && $BENCH_CPU_TEMP_START =~ ^-?[0-9]+$ && $BENCH_CPU_TEMP_END =~ ^-?[0-9]+$ ]]; then aBENCH_CPU[$BENCH_HW_MODEL,${aBENCH_CPU_INDEX[$BENCH_HW_MODEL]:=0}]=$BENCH_CPU - # - Patch for 5 digit CPU temp's: https://github.com/MichaIng/DietPi/issues/2715 - (( ${BENCH_CPU_TEMP_START//.*} > 130 )) && (( BENCH_CPU_TEMP_START /= 1000 )) - (( ${BENCH_CPU_TEMP_END//.*} > 130 )) && (( BENCH_CPU_TEMP_END /= 1000 )) - # ------------------------------------------------------------------------------ - - aBENCH_CPU_TEMP_START[$BENCH_HW_MODEL,${aBENCH_CPU_INDEX[$BENCH_HW_MODEL]}]=${BENCH_CPU_TEMP_START//.*} - aBENCH_CPU_TEMP_END[$BENCH_HW_MODEL,${aBENCH_CPU_INDEX[$BENCH_HW_MODEL]}]=${BENCH_CPU_TEMP_END//.*} + # - Patch for 5 digit CPU temps: https://github.com/MichaIng/DietPi/issues/2715 + (( $BENCH_CPU_TEMP_START > 130 )) && (( BENCH_CPU_TEMP_START /= 1000 )) + (( $BENCH_CPU_TEMP_END > 130 )) && (( BENCH_CPU_TEMP_END /= 1000 )) + aBENCH_CPU_TEMP_START[$BENCH_HW_MODEL,${aBENCH_CPU_INDEX[$BENCH_HW_MODEL]}]=$BENCH_CPU_TEMP_START + aBENCH_CPU_TEMP_END[$BENCH_HW_MODEL,${aBENCH_CPU_INDEX[$BENCH_HW_MODEL]}]=$BENCH_CPU_TEMP_END ((aBENCH_CPU_INDEX[$BENCH_HW_MODEL]++)) fi # - RootFS - if [[ ${BENCH_ROOTFS_WRITE//.*} =~ ^-?[0-9]+$ && ${BENCH_ROOTFS_READ//.*} =~ ^-?[0-9]+$ ]]; then - - aBENCH_ROOTFS_WRITE[$BENCH_HW_MODEL,${aBENCH_ROOTFS_INDEX[$BENCH_HW_MODEL]:=0}]=${BENCH_ROOTFS_WRITE//.*} - aBENCH_ROOTFS_READ[$BENCH_HW_MODEL,${aBENCH_ROOTFS_INDEX[$BENCH_HW_MODEL]}]=${BENCH_ROOTFS_READ//.*} + # Remove decimal places + BENCH_ROOTFS_WRITE=${BENCH_ROOTFS_WRITE%%.*} + BENCH_ROOTFS_READ=${BENCH_ROOTFS_READ%%.*} + if [[ $BENCH_ROOTFS_WRITE =~ ^[0-9]+$ && $BENCH_ROOTFS_READ =~ ^[0-9]+$ ]]; then + aBENCH_ROOTFS_WRITE[$BENCH_HW_MODEL,${aBENCH_ROOTFS_INDEX[$BENCH_HW_MODEL]:=0}]=$BENCH_ROOTFS_WRITE + aBENCH_ROOTFS_READ[$BENCH_HW_MODEL,${aBENCH_ROOTFS_INDEX[$BENCH_HW_MODEL]}]=$BENCH_ROOTFS_READ ((aBENCH_ROOTFS_INDEX[$BENCH_HW_MODEL]++)) fi # - RAM # - https://github.com/MichaIng/DietPi/issues/2715 | nullify this score and ignore it in min/max/avg processing. - if (( $BENCH_VERSION >= 2 )) && - [[ ${BENCH_RAM_WRITE//.*} =~ ^-?[0-9]+$ && ${BENCH_RAM_READ//.*} =~ ^-?[0-9]+$ ]]; then - - aBENCH_RAM_WRITE[$BENCH_HW_MODEL,${aBENCH_RAM_INDEX[$BENCH_HW_MODEL]:=0}]=${BENCH_RAM_WRITE//.*} - aBENCH_RAM_READ[$BENCH_HW_MODEL,${aBENCH_RAM_INDEX[$BENCH_HW_MODEL]}]=${BENCH_RAM_READ//.*} + # Remove decimal places + BENCH_RAM_WRITE=${BENCH_RAM_WRITE%%.*} + BENCH_RAM_READ=${BENCH_RAM_READ%%.*} + if (( $BENCH_VERSION > 1 )) && [[ $BENCH_RAM_WRITE =~ ^[0-9]+$ && $BENCH_RAM_READ =~ ^[0-9]+$ ]]; then + aBENCH_RAM_WRITE[$BENCH_HW_MODEL,${aBENCH_RAM_INDEX[$BENCH_HW_MODEL]:=0}]=$BENCH_RAM_WRITE + aBENCH_RAM_READ[$BENCH_HW_MODEL,${aBENCH_RAM_INDEX[$BENCH_HW_MODEL]}]=$BENCH_RAM_READ ((aBENCH_RAM_INDEX[$BENCH_HW_MODEL]++)) fi # - Custom FS - if [[ ${BENCH_CUSTOMFS_WRITE//.*} =~ ^-?[0-9]+$ && ${BENCH_CUSTOMFS_READ//.*} =~ ^-?[0-9]+$ ]]; then - - aBENCH_CUSTOMFS_WRITE[$BENCH_HW_MODEL,${aBENCH_CUSTOMFS_INDEX[$BENCH_HW_MODEL]:=0}]=${BENCH_CUSTOMFS_WRITE//.*} - aBENCH_CUSTOMFS_READ[$BENCH_HW_MODEL,${aBENCH_CUSTOMFS_INDEX[$BENCH_HW_MODEL]:=0}]=${BENCH_CUSTOMFS_READ//.*} + # Remove decimal places + BENCH_CUSTOMFS_WRITE=${BENCH_CUSTOMFS_WRITE%%.*} + BENCH_CUSTOMFS_READ=${BENCH_CUSTOMFS_READ%%.*} + if [[ $BENCH_CUSTOMFS_WRITE =~ ^[0-9]+$ && $BENCH_CUSTOMFS_READ =~ ^[0-9]+$ ]]; then + aBENCH_CUSTOMFS_WRITE[$BENCH_HW_MODEL,${aBENCH_CUSTOMFS_INDEX[$BENCH_HW_MODEL]:=0}]=$BENCH_CUSTOMFS_WRITE + aBENCH_CUSTOMFS_READ[$BENCH_HW_MODEL,${aBENCH_CUSTOMFS_INDEX[$BENCH_HW_MODEL]}]=$BENCH_CUSTOMFS_READ ((aBENCH_CUSTOMFS_INDEX[$BENCH_HW_MODEL]++)) fi # - LAN - if [[ ${BENCH_NET_LAN_SPEED//.*} =~ ^-?[0-9]+$ ]]; then - - aBENCH_NET_LAN_SPEED[$BENCH_HW_MODEL,${aBENCH_LAN_INDEX[$BENCH_HW_MODEL]:=0}]=${BENCH_NET_LAN_SPEED//.*} + # Remove decimal places + BENCH_NET_LAN_SPEED=${BENCH_NET_LAN_SPEED%%.*} + if [[ $BENCH_NET_LAN_SPEED =~ ^[0-9]+$ ]]; then + aBENCH_NET_LAN_SPEED[$BENCH_HW_MODEL,${aBENCH_LAN_INDEX[$BENCH_HW_MODEL]:=0}]=$BENCH_NET_LAN_SPEED ((aBENCH_LAN_INDEX[$BENCH_HW_MODEL]++)) fi # - Done, clear vars - unset BENCH_VERSION - unset BENCH_HW_MODEL - unset BENCH_CPU - unset BENCH_ROOTFS_WRITE - unset BENCH_ROOTFS_READ - unset BENCH_RAM_WRITE - unset BENCH_RAM_READ - unset BENCH_CPU_TEMP_START - unset BENCH_CPU_TEMP_END - unset BENCH_CUSTOMFS_WRITE - unset BENCH_CUSTOMFS_READ + unset BENCH_VERSION BENCH_HW_MODEL + unset BENCH_CPU BENCH_CPU_TEMP_START BENCH_CPU_TEMP_END + unset BENCH_ROOTFS_WRITE BENCH_ROOTFS_READ + unset BENCH_RAM_WRITE BENCH_RAM_READ + unset BENCH_CUSTOMFS_WRITE BENCH_CUSTOMFS_READ unset BENCH_NET_LAN_SPEED fi @@ -543,11 +537,9 @@ aBENCH_RESULT_CPU_MIN[$i]=$default_min_value aBENCH_RESULT_CPU_MAX[$i]=0 aBENCH_RESULT_CPU_AVG[$i]=0 - aBENCH_RESULT_CPU_TEMP_START_MIN[$i]=$default_min_value aBENCH_RESULT_CPU_TEMP_START_MAX[$i]=0 aBENCH_RESULT_CPU_TEMP_START_AVG[$i]=0 - aBENCH_RESULT_CPU_TEMP_END_MIN[$i]=$default_min_value aBENCH_RESULT_CPU_TEMP_END_MAX[$i]=0 aBENCH_RESULT_CPU_TEMP_END_AVG[$i]=0 @@ -555,18 +547,18 @@ for (( j=0; j<${aBENCH_CPU_INDEX[$i]}; j++ )) do - # echo "aBENCH_CPU[$i,$j] ${aBENCH_CPU[$i,$j]}" + # Use bc to allow floats if (( $(bc -l <<< "${aBENCH_CPU[$i,$j]} < ${aBENCH_RESULT_CPU_MIN[$i]}") )); then - aBENCH_RESULT_CPU_MIN[$i]=$(bc -l <<< "scale=$BENCH_RESULTS_CPU_SCALE; ${aBENCH_CPU[$i,$j]} / 1") + aBENCH_RESULT_CPU_MIN[$i]=${aBENCH_CPU[$i,$j]} fi if (( $(bc -l <<< "${aBENCH_CPU[$i,$j]} > ${aBENCH_RESULT_CPU_MAX[$i]}") )); then - aBENCH_RESULT_CPU_MAX[$i]=$(bc -l <<< "scale=$BENCH_RESULTS_CPU_SCALE; ${aBENCH_CPU[$i,$j]} / 1") + aBENCH_RESULT_CPU_MAX[$i]=${aBENCH_CPU[$i,$j]} fi - aBENCH_RESULT_CPU_AVG[$i]=$(bc -l <<< "${aBENCH_CPU[$i,$j]} + ${aBENCH_RESULT_CPU_AVG[$i]}") + aBENCH_RESULT_CPU_AVG[$i]=$(bc -l <<< "${aBENCH_RESULT_CPU_AVG[$i]} + ${aBENCH_CPU[$i,$j]}") if (( ${aBENCH_CPU_TEMP_START[$i,$j]} < ${aBENCH_RESULT_CPU_TEMP_START_MIN[$i]} )); then @@ -580,7 +572,6 @@ fi (( aBENCH_RESULT_CPU_TEMP_START_AVG[$i] += ${aBENCH_CPU_TEMP_START[$i,$j]} )) - # echo "aBENCH_CPU_TEMP_END[$i,$j] ${aBENCH_CPU_TEMP_END[$i,$j]}" if (( ${aBENCH_CPU_TEMP_END[$i,$j]} < ${aBENCH_RESULT_CPU_TEMP_END_MIN[$i]} )); then aBENCH_RESULT_CPU_TEMP_END_MIN[$i]=${aBENCH_CPU_TEMP_END[$i,$j]} @@ -593,21 +584,15 @@ fi (( aBENCH_RESULT_CPU_TEMP_END_AVG[$i] += ${aBENCH_CPU_TEMP_END[$i,$j]} )) - # Last item in current array. Work out averages + # Last item in current array. Scale and work out averages if (( $j == ${aBENCH_CPU_INDEX[$i]} - 1 )); then + aBENCH_RESULT_CPU_MIN[$i]=$(bc -l <<< "scale=$BENCH_RESULTS_CPU_SCALE; ${aBENCH_RESULT_CPU_MIN[$i]} / 1") + aBENCH_RESULT_CPU_MAX[$i]=$(bc -l <<< "scale=$BENCH_RESULTS_CPU_SCALE; ${aBENCH_RESULT_CPU_MAX[$i]} / 1") aBENCH_RESULT_CPU_AVG[$i]=$(bc -l <<< "scale=$BENCH_RESULTS_CPU_SCALE; ${aBENCH_RESULT_CPU_AVG[$i]} / ${aBENCH_CPU_INDEX[$i]}") aBENCH_RESULT_CPU_TEMP_START_AVG[$i]=$(( ${aBENCH_RESULT_CPU_TEMP_START_AVG[$i]} / ${aBENCH_CPU_INDEX[$i]} )) aBENCH_RESULT_CPU_TEMP_END_AVG[$i]=$(( ${aBENCH_RESULT_CPU_TEMP_END_AVG[$i]} / ${aBENCH_CPU_INDEX[$i]} )) - if [[ $G_DEBUG == 1 ]]; then - - echo "aBENCH_RESULT_CPU_AVG $i = ${aBENCH_RESULT_CPU_AVG[$i]}" - echo "aBENCH_RESULT_CPU_TEMP_START_AVG $i = ${aBENCH_RESULT_CPU_TEMP_START_AVG[$i]}" - echo "aBENCH_RESULT_CPU_TEMP_END_AVG $i = ${aBENCH_RESULT_CPU_TEMP_END_AVG[$i]}" - - fi - fi done @@ -640,7 +625,6 @@ fi (( aBENCH_RESULT_ROOTFS_WRITE_AVG[$i] += ${aBENCH_ROOTFS_WRITE[$i,$j]} )) - # echo "aBENCH_ROOTFS_READ[$i,$j] ${aBENCH_ROOTFS_READ[$i,$j]}" if (( ${aBENCH_ROOTFS_READ[$i,$j]} < ${aBENCH_RESULT_ROOTFS_READ_MIN[$i]} )); then aBENCH_RESULT_ROOTFS_READ_MIN[$i]=${aBENCH_ROOTFS_READ[$i,$j]} @@ -659,13 +643,6 @@ aBENCH_RESULT_ROOTFS_WRITE_AVG[$i]=$(( ${aBENCH_RESULT_ROOTFS_WRITE_AVG[$i]} / ${aBENCH_ROOTFS_INDEX[$i]} )) aBENCH_RESULT_ROOTFS_READ_AVG[$i]=$(( ${aBENCH_RESULT_ROOTFS_READ_AVG[$i]} / ${aBENCH_ROOTFS_INDEX[$i]} )) - if [[ $G_DEBUG == 1 ]]; then - - echo "aBENCH_RESULT_ROOTFS_WRITE_AVG $i = ${aBENCH_RESULT_ROOTFS_WRITE_AVG[$i]}" - echo "aBENCH_RESULT_ROOTFS_READ_AVG $i = ${aBENCH_RESULT_ROOTFS_READ_AVG[$i]}" - - fi - fi done @@ -698,7 +675,6 @@ fi (( aBENCH_RESULT_RAM_WRITE_AVG[$i] += ${aBENCH_RAM_WRITE[$i,$j]} )) - # echo "aBENCH_RAM_READ[$i,$j] ${aBENCH_RAM_READ[$i,$j]}" if (( ${aBENCH_RAM_READ[$i,$j]} < ${aBENCH_RESULT_RAM_READ_MIN[$i]} )); then aBENCH_RESULT_RAM_READ_MIN[$i]=${aBENCH_RAM_READ[$i,$j]} @@ -717,13 +693,6 @@ aBENCH_RESULT_RAM_WRITE_AVG[$i]=$(( ${aBENCH_RESULT_RAM_WRITE_AVG[$i]} / ${aBENCH_RAM_INDEX[$i]} )) aBENCH_RESULT_RAM_READ_AVG[$i]=$(( ${aBENCH_RESULT_RAM_READ_AVG[$i]} / ${aBENCH_RAM_INDEX[$i]} )) - if [[ $G_DEBUG == 1 ]]; then - - echo "aBENCH_RESULT_RAM_WRITE_AVG $i = ${aBENCH_RESULT_RAM_WRITE_AVG[$i]}" - echo "aBENCH_RESULT_RAM_READ_AVG $i = ${aBENCH_RESULT_RAM_READ_AVG[$i]}" - - fi - fi done @@ -741,7 +710,6 @@ for (( j=0; j<${aBENCH_LAN_INDEX[$i]}; j++ )) do - # echo "aBENCH_NET_LAN_SPEED[$i,$j] ${aBENCH_NET_LAN_SPEED[$i,$j]}" if (( ${aBENCH_NET_LAN_SPEED[$i,$j]} < ${aBENCH_RESULT_NET_LAN_SPEED_MIN[$i]} )); then aBENCH_RESULT_NET_LAN_SPEED_MIN[$i]=${aBENCH_NET_LAN_SPEED[$i,$j]} @@ -791,7 +759,6 @@ fi (( aBENCH_RESULT_CUSTOMFS_WRITE_AVG[$i] += ${aBENCH_CUSTOMFS_WRITE[$i,$j]} )) - # echo "aBENCH_CUSTOMFS_READ[$i,$j] ${aBENCH_CUSTOMFS_READ[$i,$j]}" if (( ${aBENCH_CUSTOMFS_READ[$i,$j]} < ${aBENCH_RESULT_CUSTOMFS_READ_MIN[$i]} )); then aBENCH_RESULT_CUSTOMFS_READ_MIN[$i]=${aBENCH_CUSTOMFS_READ[$i,$j]} @@ -810,13 +777,6 @@ aBENCH_RESULT_CUSTOMFS_WRITE_AVG[$i]=$(( ${aBENCH_RESULT_CUSTOMFS_WRITE_AVG[$i]} / ${aBENCH_CUSTOMFS_INDEX[$i]} )) aBENCH_RESULT_CUSTOMFS_READ_AVG[$i]=$(( ${aBENCH_RESULT_CUSTOMFS_READ_AVG[$i]} / ${aBENCH_CUSTOMFS_INDEX[$i]} )) - if [[ $G_DEBUG == 1 ]]; then - - echo "aBENCH_RESULT_CUSTOMFS_WRITE_AVG $i = ${aBENCH_RESULT_CUSTOMFS_WRITE_AVG[$i]}" - echo "aBENCH_RESULT_CUSTOMFS_READ_AVG $i = ${aBENCH_RESULT_CUSTOMFS_READ_AVG[$i]}" - - fi - fi done From 2924d0e136bbdabd4e2c9d2936410a71e5760ea9 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Tue, 9 Jul 2019 12:36:18 +0200 Subject: [PATCH 014/184] v6.26 + DietPi-Software | Node-RED: Add missing data dir --- dietpi/dietpi-software | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index ab1c6082bc..8720d85e3b 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8240,6 +8240,8 @@ _EOF_ # Allow sudo calls echo 'nodered ALL=NOPASSWD: ALL' > /etc/sudoers.d/nodered + mkdir -p $G_FP_DIETPI_USERDATA/node-red + cat << _EOF_ > /etc/systemd/system/node-red.service [Unit] Description=Node-RED (DietPi) From 91d76d4a9170b35a50129e907a657b37414611e6 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Tue, 9 Jul 2019 12:44:37 +0200 Subject: [PATCH 015/184] v6.26 + CHANGELOG | Node-RED: Resolved an isssue where install fails because of missing data dir creation --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f0e1aedf21..8f2da09e94 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -7,6 +7,7 @@ Changes / Improvements / Optimisations: Bug Fixes: - DietPi-Config | Resolved an issue on RPi where I2C baudrate was not applied correctly, thus selection was ineffective. Many thanks to @flashspys for reporting this issue: https://github.com/MichaIng/DietPi/issues/2966 - DietPi-Software | Gitea: Resolved an issue where install fails on ARMv7 systems. Many thanks to @maschiw for reporting this issue: https://github.com/MichaIng/DietPi/issues/2959 +- DietPi-Software | Node-RED: Resolved an isssue where install fails because of missing data dir creation. Many thanks to @hifitime for reporting this isssue: https://github.com/MichaIng/DietPi/issues/2974#issuecomment-509534045 As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/XXXX From a3e1da40810c99acf5344052d0ddb07f612911b9 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Tue, 9 Jul 2019 12:58:16 +0200 Subject: [PATCH 016/184] v6.25 + DietPi-Patch | Add Node-RED install fix to v6.25 patch file to prevent future updaters running into this issue. It is safe here only, where fresh master code was just downloaded and we exactly know the content. Must be removed with any next branch merge. --- dietpi/patch_file | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dietpi/patch_file b/dietpi/patch_file index 85719903ab..ee0534de35 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2111,6 +2111,12 @@ _EOF_ # Remove flag/status files from disk once, which will be done from now on before DietPi-RAMdisk stores to disk rm -f /boot/dietpi/.{update_available,timesync_exit_status} #------------------------------------------------------------------------------- + # Post release hotfixes: MUST BE REMOVED WITH v6.26! + # - Gitea: No ARMv7 binaries available for v1.8.X: https://github.com/MichaIng/DietPi/issues/2959 + sed -i 's/arm-7/arm-6/' /DietPi/dietpi/dietpi-software + # - Node-RED: Missing data dir creation: https://github.com/MichaIng/DietPi/issues/2975 + grep -q 'mkdir -p $G_FP_DIETPI_USERDATA/node-red' /DietPi/dietpi/dietpi-software || sed -i '\|cat << _EOF_ > /etc/systemd/system/node-red.service|i\mkdir -p $G_FP_DIETPI_USERDATA/node-red' /DietPi/dietpi/dietpi-software + #------------------------------------------------------------------------------- # Reinstalls: # O!MPD update to master: https://github.com/MichaIng/DietPi/pull/2884 # myMPD update to master: https://github.com/MichaIng/DietPi/pull/2883 @@ -2132,8 +2138,6 @@ A backup will be created to "/etc/mympd/mympd.conf.bak_DDMMYYY_N" from where you [[ -f '/lib/systemd/system/mympd.service' ]] && rm /lib/systemd/system/mympd.service fi - # - Little hotfix for ARMv7 Gitea installs, since ARMv7 binaries are not available for v1.8.X but ARMv6 binaries are backwards compatible - sed -i 's/arm-7/arm-6/' /DietPi/dietpi/dietpi-software /DietPi/dietpi/dietpi-software reinstall 129 148 165 fi From 876905415c721c5e2b3f50d96cc2ae1fe01ed5d9 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Tue, 9 Jul 2019 17:37:53 +0200 Subject: [PATCH 017/184] v6.26 + DietPi-PREP | Disable serial login consoles on virtual machines --- PREP_SYSTEM_FOR_DIETPI.sh | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index 72c76130f4..1736e4c174 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -805,7 +805,7 @@ _EOF_ # - G_HW_MODEL specific required Kernel packages # ARMbian grab currently installed packages - elif dpkg --get-selections | grep -qi armbian; then + elif dpkg --get-selections | grep -qi 'armbian'; then systemctl stop armbian-* @@ -1325,15 +1325,25 @@ _EOF_ systemctl restart fake-hwclock # Failsafe, apply now if date is way far back... - G_DIETPI-NOTIFY 2 'Configuring enable serial console:' + G_DIETPI-NOTIFY 2 'Configuring serial login consoles:' - /DietPi/dietpi/func/dietpi-set_hardware serialconsole enable + # - On virtual machines, serial consoles are not required + if (( $G_HW_MODEL == 20 )); then - # - RPi: Depending on current config.txt and model, no all serial devices are available, so enable console manually for both: - if (( $G_HW_MODEL < 10 )); then + /DietPi/dietpi/func/dietpi-set_hardware serialconsole disable + + else - systemctl enable serial-getty@ttyAMA0 - systemctl enable serial-getty@ttyS0 + /DietPi/dietpi/func/dietpi-set_hardware serialconsole enable + # - RPi: Depending on current config.txt and model, not all serial devices are available, so enable console manually for both: + if (( $G_HW_MODEL < 10 )); then + + systemctl unmask serial-getty@ttyAMA0 + systemctl enable serial-getty@ttyAMA0 + systemctl unmask serial-getty@ttyS0 + systemctl enable serial-getty@ttyS0 + + fi fi From d8040b823764f6c05944ec76dfb357230075d9c0 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Thu, 11 Jul 2019 15:34:50 +0200 Subject: [PATCH 018/184] v6.26 + DietPi-PREP | Remove any autoremove prevention before doing autoremoval, e.g. firmware-linux-free, which is not required on VM. Assure instead that this package is explicitly installed on Native x86_64 PC via firmware meta package. On non x86_64 install misc-nonfree and free firmware packages only to exclude AMD graphics firmware + DietPi-PREP | Assure that on VM Realtek firmware is installed if WiFi is selected for certain reason. Generally it is never required due to host network via Ethernet emulation, however it is possible, e.g. for testing reasons. NB, final firmware stacks: - ARMbian: Full firmware stack via armbian-firmware package - x86_64 PC: Full misc firmware stack via firmware-linux meta package, including AMD graphics - ARM: Full misc firmware stack, excluding AMD graphics - All non-VM: firmware-realtek for additional Realtek Ethernet support - All WiFi-selected: All packages that contain WiFi firmware + DietPi-PREP | Minor coding --- PREP_SYSTEM_FOR_DIETPI.sh | 53 +++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index 1736e4c174..e07b4e66a0 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -791,8 +791,7 @@ _EOF_ G_AGI linux-image-amd64 os-prober # Grub EFI - if dpkg-query -s 'grub-efi-amd64' &> /dev/null || - [[ -d '/boot/efi' ]]; then + if dpkg-query -s 'grub-efi-amd64' &> /dev/null || [[ -d '/boot/efi' ]]; then G_AGI grub-efi-amd64 @@ -826,13 +825,9 @@ _EOF_ while read -r line do - if [[ $line ]]; then - - aPACKAGES_REQUIRED_INSTALL+=("$line") - apt-mark hold $line - G_DIETPI-NOTIFY 2 "PKG detected and set on hold: $line" - - fi + aPACKAGES_REQUIRED_INSTALL+=("$line") + apt-mark hold $line + G_DIETPI-NOTIFY 2 "PKG detected and set on hold: $line" done <<< "$(dpkg --get-selections | mawk -v pat="^$i" '$0~pat {print $1}')" @@ -874,7 +869,7 @@ _EOF_ # - Auto detect kernel package incl. ARMbian/others DTB else - AUTO_DETECT_KERN_PKG=$(dpkg --get-selections | grep -E '^linux-(image|dtb)' | mawk '{print $1}') + AUTO_DETECT_KERN_PKG=$(dpkg --get-selections | mawk '/^linux-(image|dtb)/ {print $1}') if [[ $AUTO_DETECT_KERN_PKG ]]; then G_AGI $AUTO_DETECT_KERN_PKG @@ -897,17 +892,31 @@ _EOF_ # Usually no firmware should be necessary for VMs. If user manually passes though some USB device, user might need to install the firmware then. if (( $G_HW_MODEL != 20 )); then - aPACKAGES_REQUIRED_INSTALL+=('firmware-realtek') # Eth/WiFi/BT dongle firmware - aPACKAGES_REQUIRED_INSTALL+=('firmware-linux-nonfree') # Various drivers for generic devices + aPACKAGES_REQUIRED_INSTALL+=('firmware-realtek') # Realtek Eth+WiFi+BT dongle firmware + if (( $G_HW_ARCH == 10 )); then + + aPACKAGES_REQUIRED_INSTALL+=('firmware-linux') # Misc free+nonfree firmware + + else + + aPACKAGES_REQUIRED_INSTALL+=('firmware-linux-free') # Misc free firmware + aPACKAGES_REQUIRED_INSTALL+=('firmware-misc-nonfree') # Misc nonfree firmware + Ralink WiFi + + fi fi if (( $WIFI_REQUIRED )); then - aPACKAGES_REQUIRED_INSTALL+=('firmware-atheros') # WiFi dongle firmware - aPACKAGES_REQUIRED_INSTALL+=('firmware-brcm80211') # WiFi dongle firmware - aPACKAGES_REQUIRED_INSTALL+=('firmware-iwlwifi') # Intel WiFi dongle/PCI-e firwmare - aPACKAGES_REQUIRED_INSTALL+=('firmware-misc-nonfree') # Intel/Nvidia/WiFi (Ralink) dongle firmware + aPACKAGES_REQUIRED_INSTALL+=('firmware-atheros') # Qualcomm/Atheros WiFi+BT dongle firmware + aPACKAGES_REQUIRED_INSTALL+=('firmware-brcm80211') # Breadcom WiFi dongle firmware + aPACKAGES_REQUIRED_INSTALL+=('firmware-iwlwifi') # Intel WiFi dongle+PCIe firmware + if (( $G_HW_MODEL == 20 )); then + + aPACKAGES_REQUIRED_INSTALL+=('firmware-realtek') # Realtek Eth+WiFi+BT dongle firmware + aPACKAGES_REQUIRED_INSTALL+=('firmware-misc-nonfree') # Misc nonfree firmware + Ralink WiFi + + fi fi @@ -925,6 +934,8 @@ _EOF_ # - dhcpcd5: https://github.com/MichaIng/DietPi/issues/1560#issuecomment-370136642 # - mountall: https://github.com/MichaIng/DietPi/issues/2613 G_AGP dbus dhcpcd5 mountall + # Remove any autoremove prevention + rm -f /etc/apt/apt.conf.d/01autoremove* G_AGA #------------------------------------------------------------------------------------------------ @@ -960,12 +971,12 @@ _EOF_ G_DIETPI-NOTIFY 2 'Deleting list of known users, not required by DietPi' getent passwd pi &> /dev/null && userdel -f pi - getent passwd test &> /dev/null && userdel -f test #@fourdee + getent passwd test &> /dev/null && userdel -f test # @fourdee getent passwd odroid &> /dev/null && userdel -f odroid getent passwd rock64 &> /dev/null && userdel -f rock64 - getent passwd linaro &> /dev/null && userdel -f linaro #ASUS TB - getent passwd dietpi &> /dev/null && userdel -f dietpi #recreated below - getent passwd debian &> /dev/null && userdel -f debian #BBB + getent passwd linaro &> /dev/null && userdel -f linaro # ASUS TB + getent passwd dietpi &> /dev/null && userdel -f dietpi # recreated below + getent passwd debian &> /dev/null && userdel -f debian # BBB G_DIETPI-NOTIFY 2 'Removing misc files/folders/services, not required by DietPi' @@ -1033,7 +1044,7 @@ _EOF_ [[ -d '/usr/lib/armbian' ]] && rm -R /usr/lib/armbian [[ -f '/usr/local/sbin/log2ram' ]] && rm /usr/local/sbin/log2ram [[ -d '/usr/share/armbian' ]] && rm -R /usr/share/armbian - #rm -f /etc/armbian* armbian-release required for kernel package update success. + #rm -f /etc/armbian* armbian-release required for kernel package update (initramfs postinst) rm -f /etc/apt/apt.conf.d/*armbian* rm -f /etc/cron.*/armbian* rm -f /etc/default/armbian* From de01cf774d34b23d55d6f8944834943be06caa99 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Thu, 11 Jul 2019 17:29:54 +0200 Subject: [PATCH 019/184] v6.26 + DietPi-PREP | Buster is now the current stable release --- PREP_SYSTEM_FOR_DIETPI.sh | 41 +++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index e07b4e66a0..b466c62cb9 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -31,10 +31,10 @@ #------------------------------------------------------------------------------------------------ # Critical checks and pre-reqs, with exit, prior to initial run of script #------------------------------------------------------------------------------------------------ - #Exit path for non-root logins + # Exit path for non-root executions if (( $UID )); then - echo -e 'ERROR: Root privileges required, please run the script with "sudo"\nIn case install the "sudo" package with root privileges:\n\t# apt-get install -y sudo\n' + echo -e '[FAILED] Root privileges required, please run the script with "sudo"\nIn case install the "sudo" package with root privileges:\n\t# apt-get install -y sudo\n' exit 1 fi @@ -67,10 +67,10 @@ # Removing conflicting /etc/apt/sources.list.d entries # - Meveric: https://github.com/MichaIng/DietPi/issues/1285#issuecomment-355759321 [[ -f '/etc/apt/sources.list.d/deb-multimedia.list' ]] && rm /etc/apt/sources.list.d/deb-multimedia.list - # - OMV: https://dietpi.com/phpbb/viewtopic.php?f=11&t=2772&p=10646#p10594 + # - OMV: https://dietpi.com/phpbb/viewtopic.php?f=11&t=2772 [[ -f '/etc/apt/sources.list.d/openmediavault.list' ]] && rm /etc/apt/sources.list.d/openmediavault.list - # Fixing sources.list due to Debian dropped Jessie support: https://github.com/MichaIng/DietPi/issues/2665 + # Fixing sources.list as Debian dropped Jessie support: https://github.com/MichaIng/DietPi/issues/2665 if grep -q 'jessie' /etc/os-release && ! grep -qi 'raspbian' /etc/os-release; then if [[ $(uname -m) == 'aarch64' ]]; then @@ -134,7 +134,7 @@ fi # - Update /etc/default/locales with new values (not effective until next load of bash session, eg: logout/in) - update-locale LC_ALL=en_GB.UTF-8 + update-locale 'LC_ALL=en_GB.UTF-8' # - Export locale vars to assure the following whiptail being beautiful export LC_ALL='en_GB.UTF-8' @@ -147,22 +147,19 @@ aWHIP_BRANCH=( - 'master' ': Stable release (recommended)' + 'master' ': Stable release branch (recommended)' 'beta' ': Public beta testing branch' - 'dev' ': Unstable dev branch' + 'dev' ': Unstable development branch' ) - if GITBRANCH=$(whiptail --title "$G_PROGRAM_NAME" --menu 'Please select the Git branch the installer should use:' --default-item 'master' --ok-button 'Ok' --cancel-button 'Exit' --backtitle "$G_PROGRAM_NAME" 12 80 3 "${aWHIP_BRANCH[@]}" 3>&1 1>&2 2>&3); then - - unset aWHIP_BRANCH - - else + if ! GITBRANCH=$(whiptail --title "$G_PROGRAM_NAME" --menu 'Please select the Git branch the installer should use:' --default-item 'master' --ok-button 'Ok' --cancel-button 'Exit' --backtitle "$G_PROGRAM_NAME" 12 80 3 "${aWHIP_BRANCH[@]}" 3>&1 1>&2 2>&3); then echo -e '[ INFO ] No choice detected. Aborting...\n' exit 0 fi + unset aWHIP_BRANCH fi @@ -271,7 +268,7 @@ do [[ -f $i ]] || continue - systemctl disable ${i##*/} + systemctl disable --now ${i##*/} rm $i done @@ -342,7 +339,6 @@ fi done - unset aDISALLOWED_NAMES if (( $DISALLOWED_NAME )); then @@ -510,8 +506,8 @@ # Distro Selection DISTRO_LIST_ARRAY=( - '4' ': Stretch (current stable release, recommended)' - '5' ': Buster (next stable release)' + '4' ': Stretch (oldstable, if SBC firmware is not yet Buster-compatible)' + '5' ': Buster (current stable release, recommended)' ) @@ -534,7 +530,6 @@ fi done - unset DISTRO_LIST_ARRAY if (( ! ${#G_WHIP_MENU_ARRAY[@]} )); then @@ -560,16 +555,16 @@ G_WHIP_DEFAULT_ITEM=${G_WHIP_MENU_ARRAY[0]} # Downgrades disabled, so first item matches current/lowest supported distro version G_WHIP_BUTTON_CANCEL_TEXT='Exit' - G_WHIP_MENU "Please select a distro version to install on this system. Selecting a distro that is older than the current installed on system, is not supported.\n\nCurrently installed:\n - $G_DISTRO $G_DISTRO_NAME" - if (( $? )); then + if G_WHIP_MENU "Please select a Debian version to install on this system.\n +Currently installed: $G_DISTRO $G_DISTRO_NAME"; then - G_DIETPI-NOTIFY 1 'No choice detected. Aborting...\n' - exit 0 + DISTRO_TARGET=$G_WHIP_RETURNED_VALUE + break else - DISTRO_TARGET=$G_WHIP_RETURNED_VALUE - break + G_DIETPI-NOTIFY 1 'No choice detected. Aborting...\n' + exit 0 fi From 5973cab0c5273dd742962e60e391dc8a9a09abfc Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Thu, 11 Jul 2019 22:28:40 +0200 Subject: [PATCH 020/184] v6.26 (#2981) + DietPi-Software | Pi-hole: Disable pihole.log by default: https://github.com/pi-hole/FTL/issues/614#issuecomment-510564476 + DietPi-Software | Pi-hole: Add Pi-hole specific Lighttpd include config based on: https://github.com/pi-hole/pi-hole/blob/master/advanced/lighttpd.conf.debian + DietPi-Software | Lighttpd: Do not create lighttpd.conf backup, since we only edit webroot or fix a Buster upgrade bug, which both is simply required and expected by user to have the just chosen software title + Lighttpd up and running. + DietPi-Logclear | Remove special pihole.log handling, which is not required since clearing it does not break the service/process anymore and query logs are holt in database. Also pihole.log is disabled now by default on our Pi-hole installs. + DietPi-Logclear | Remove log file exclusion code fragments, which was never really implemented + DietPi-Logclear | Further coding enhancements + DietPi-Cleaner | Never remove Git, since it is required often for internal updaters, e.g. Pi-hole + DietPi-Cleaner | Fix /var/tmp/dietpi/logs/dietpi-ramlog_store removal and use new DietPi-Set_software apt-cache function to clean APT + DietPi-Cleaner | Minor coding --- .conf/dps_93/lighttpd.pihole.conf | 20 +++ CHANGELOG.txt | 2 + dietpi/dietpi-cleaner | 44 ++---- dietpi/dietpi-software | 101 +++++++------ dietpi/func/dietpi-logclear | 226 ++++++++---------------------- dietpi/patch_file | 8 ++ 6 files changed, 162 insertions(+), 239 deletions(-) create mode 100644 .conf/dps_93/lighttpd.pihole.conf diff --git a/.conf/dps_93/lighttpd.pihole.conf b/.conf/dps_93/lighttpd.pihole.conf new file mode 100644 index 0000000000..a30db3bb32 --- /dev/null +++ b/.conf/dps_93/lighttpd.pihole.conf @@ -0,0 +1,20 @@ +# Based on: https://github.com/pi-hole/pi-hole/blob/master/advanced/lighttpd.conf.debian + +# If the URL starts with /admin, it is the Web interface +$HTTP["url"] =~ "^/admin/" { + # Create a response header for debugging using curl -I + setenv.add-response-header = ( + "X-Pi-hole" => "The Pi-hole Web interface is working!", + "X-Frame-Options" => "DENY" + ) + + $HTTP["url"] =~ ".ttf$" { + # Allow Block Page access to local fonts + setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" ) + } +} + +# Block . files from being served, such as .git, .github, .gitignore +$HTTP["url"] =~ "^/admin/\.(.*)" { + url.access-deny = ("") +} diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 8f2da09e94..2c166e9029 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,8 @@ v6.26 Changes / Improvements / Optimisations: - General | Support for Debian Jessie has now been fully dropped from DietPi code. Jessie systems are moved to the "jessie-support" Git branch and will stay on v6.25. Critical bugs, if reported, may still be fixed, but DietPi-Software related issues and new features will not be handled anymore by the DietPi code team. However, everyone is free to open related pull requests against the jessie-support branch: https://github.com/MichaIng/DietPi/tree/jessie-support +- DietPi-Software | Pi-hole: Logging to /var/log/pihole.log is now disabled by default, since it is not required in usual cases. Query logs, shown in web UI, are stored in database. This might also resolve possible pihole-FTL crashes in combination with DietPi-RAMlog and DietPi-Logclear. Many thanks to @kuerious for reporting and @Mcat12 for providing helpful information on this topic: https://github.com/pi-hole/FTL/issues/614 +- DietPi-Software | Pi-hole: Lighttpd config has been added to block access to .dot dirs (.git*) and enable local fonts for web UI, based on: https://github.com/pi-hole/pi-hole/blob/master/advanced/lighttpd.conf.debian Bug Fixes: - DietPi-Config | Resolved an issue on RPi where I2C baudrate was not applied correctly, thus selection was ineffective. Many thanks to @flashspys for reporting this issue: https://github.com/MichaIng/DietPi/issues/2966 diff --git a/dietpi/dietpi-cleaner b/dietpi/dietpi-cleaner index 742dccb509..83d9e8bd17 100644 --- a/dietpi/dietpi-cleaner +++ b/dietpi/dietpi-cleaner @@ -8,13 +8,13 @@ #//////////////////////////////////// # # Info: - # - Location: /DietPi/dietpi/dietpi-cleaner + # - Location: /{DietPi,boot}/dietpi/dietpi-cleaner # - Cleans "crap" on users system :) # # - Usage # /DietPi/dietpi/dietpi-cleaner no-input = menu - # /DietPi/dietpi/dietpi-cleaner 1 = Run Enabled cleaners (no menu). - # /DietPi/dietpi/dietpi-cleaner 2 = Run All cleaners (no menu). + # /DietPi/dietpi/dietpi-cleaner 1 = Run Enabled cleaners (no menu). + # /DietPi/dietpi/dietpi-cleaner 2 = Run All cleaners (no menu). #//////////////////////////////////// # Import DietPi-Globals -------------------------------------------------------------- @@ -54,15 +54,7 @@ Menu_Exit(){ G_WHIP_SIZE_X_MAX=50 - if G_WHIP_YESNO "Exit $G_PROGRAM_NAME?"; then - - TARGETMENUID=-1 # Exit - - else - - TARGETMENUID=0 # Main menu - - fi + G_WHIP_YESNO "Exit $G_PROGRAM_NAME?" && TARGETMENUID=-1 # Exit } @@ -85,7 +77,7 @@ ) G_WHIP_BUTTON_CANCEL_TEXT='Exit' - G_WHIP_MENU "Free up used space and system resources:\n - RootFS usage current = $ROOT_SPACE_USED_CURRENT MB\n - RootFS space cleared = $ROOT_SPACE_FREE_DELTA MB" + G_WHIP_MENU "Free up used space and system resources:\n - RootFS usage current = $ROOT_SPACE_USED_CURRENT MiB\n - RootFS space cleared = $ROOT_SPACE_FREE_DELTA MiB" if (( $? == 0 )); then case "$G_WHIP_RETURNED_VALUE" in @@ -294,16 +286,15 @@ Would you like to continue and start the cleaning process?" && Run_Cleaners #///////////////////////////////////////////////////////////////////////////////////// # Cleaner stats #///////////////////////////////////////////////////////////////////////////////////// - # Space free after running cleaner + # Space freed after running cleaner ROOT_SPACE_USED_BEFORE=0 ROOT_SPACE_USED_AFTER=0 ROOT_SPACE_USED_CURRENT=0 ROOT_SPACE_FREE_DELTA='Cleaner has not been run - 0' - ROOTFS_DEVICE_PATH=$(sed -n 4p /DietPi/dietpi/.hw_model) Update_Space_Used(){ - ROOT_SPACE_USED_CURRENT=$(df --block-size MB | mawk -v pat="$ROOTFS_DEVICE_PATH" '$0~pat {print $3}' | tr -d 'MB') + ROOT_SPACE_USED_CURRENT=$(df -m --output=used / | mawk 'NR==2 {print $1;exit}') } @@ -370,13 +361,7 @@ $G_PROGRAM_NAME simulation has finished: Press any key to continue..." Banner_Cleaning # Find packages and convert into 1 line string - local string_package_names='' - while read line - do - - [[ $line ]] && string_package_names+="$line " - - done <<< "$(dpkg --get-selections *-dev build-essential git make automake autoconf 2> /dev/null | mawk '{print $1}')" + local string_package_names=$(echo $(dpkg --get-selections *-dev build-essential make automake autoconf 2> /dev/null | mawk '{print $1}')) # Mark for autoremoval if (( $DRY_RUN )); then @@ -402,13 +387,7 @@ $G_PROGRAM_NAME simulation has finished: Press any key to continue..." Banner_Cleaning # Find packages and convert into 1 line string - local string_package_names='' - while read line - do - - [[ $line ]] && string_package_names+="$line " - - done <<< "$(dpkg --get-selections man-db manpages 2> /dev/null | mawk '{print $1}')" + local string_package_names=$(echo $(dpkg --get-selections man-db manpages 2> /dev/null | mawk '{print $1}')) # Mark for autoremoval if (( $DRY_RUN )); then @@ -522,7 +501,7 @@ $G_PROGRAM_NAME simulation has finished: Press any key to continue..." if (( ! $DRY_RUN )); then /DietPi/dietpi/func/dietpi-logclear 1 - rm -vf /var/tmp/dietpi/logs/* + rm -vRf /var/tmp/dietpi/logs/* fi @@ -536,8 +515,7 @@ $G_PROGRAM_NAME simulation has finished: Press any key to continue..." if (( ! $DRY_RUN )); then - apt-get clean - rm -vf /var/lib/apt/lists/* + /DietPi/dietpi/func/dietpi-set_software apt-cache clean G_AGUP fi diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 8720d85e3b..7f22005806 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -4151,7 +4151,7 @@ _EOF_ # Install wget "$INSTALL_URL_ADDRESS" -O install.sh chmod +x install.sh - # - Skip Lighttpd install, since user properly has chosen a different one, which was installed as pre-req. + # - Skip Lighttpd install, since we allow to choose and install prior to Pi-hole ./install.sh --disable-install-webserver # - We can't do reasonable exit code check, since installer always returns 5! rm install.sh @@ -6965,9 +6965,11 @@ _EOF_ Banner_Configuration - # www path - G_BACKUP_FP /etc/lighttpd/lighttpd.conf + # Webroot sed -i '/^server.document-root/c\server.document-root = "/var/www"' /etc/lighttpd/lighttpd.conf + # - Move default page + mv /var/www/html/index.lighttpd.html /var/www/ + rmdir --ignore-fail-on-non-empty /var/www/html # Fix in case Lighttpd got updated to Buster version (on ARMv6 due to PHP7.3 libssl1.1 depedency) # - "create-mime.assign.pl" has been renamed to "create-mime.conf.pl" @@ -6987,15 +6989,10 @@ fastcgi.server += ( ".php" => )) ) _EOF_ - - # Enable cgi/php + # - Enable modules lighttpd-enable-mod fastcgi lighttpd-enable-mod fastcgi-php - # Move default page - mv /var/www/html/index.lighttpd.html /var/www/ - rmdir --ignore-fail-on-non-empty /var/www/html - fi software_id=89 # PHP @@ -8738,15 +8735,29 @@ _EOF_ Banner_Configuration - # - Create symlinks to align Pi-hole admin and blocking page relative to webroot + # Generate web interface PW: https://github.com/MichaIng/DietPi/issues/662 + pihole -a -p "$GLOBAL_PW" + + # Add Lighttpd config + if (( ${aSOFTWARE_INSTALL_STATE[84]} > 0 )); then + + # Enable setenv module + G_CONFIG_INJECT '"mod_setenv",' ' "mod_setenv",' /etc/lighttpd/lighttpd.conf '"mod_.+",' + # Add and enable Pi-hole config + dps_index=$software_id Download_Install 'lighttpd.pihole.conf' /etc/lighttpd/conf-available/99-dietpi-pihole.conf + lighttpd-enable-mod dietpi-pihole + + fi + + # Create symlinks to align Pi-hole admin and blocking page relative to webroot cd /var/www - # Move existing files/dirs out of the way - [[ -L admin ]] || { [[ -e admin ]] && mv -v admin admin.bak; } + # - Move existing files/dirs out of the way + [[ -L 'admin' ]] || { [[ -e 'admin' ]] && mv -v admin admin.bak; } ln -vsf html/admin admin - [[ -L pihole ]] || { [[ -e pihole ]] && mv -v pihole pihole.bak; } + [[ -L 'pihole' ]] || { [[ -e 'pihole' ]] && mv -v pihole pihole.bak; } ln -vsf html/pihole pihole - # - Ask user whether to show blocking page + # Ask user whether to show blocking page G_WHIP_BUTTON_OK_TEXT='YES' G_WHIP_BUTTON_CANCEL_TEXT='NO' if G_WHIP_YESNO 'Pi-hole can show a blocking page, when clients access a blocked website. This allows you to whitelist domains directly from the blocking page and prevents the need to access the admin page or use the Pi-hole CLI for this.\n @@ -8754,8 +8765,8 @@ The downside is additional traffic and less performance compared to a silent req Do you want to enable the Pi-hole blocking page?'; then G_CONFIG_INJECT 'BLOCKINGMODE=' 'BLOCKINGMODE=IP-NODATA-AAAA' /etc/pihole/pihole-FTL.conf - # Link blocking page to webroot, where it is required - [[ -L index.php ]] || { [[ -e index.php ]] && mv -v index.php index.php.bak; } + # - Link blocking page to webroot, where it is required + [[ -L 'index.php' ]] || { [[ -e 'index.php' ]] && mv -v index.php index.php.bak; } ln -vsf pihole/index.php index.php else @@ -8765,16 +8776,17 @@ Do you want to enable the Pi-hole blocking page?'; then fi cd /tmp/$G_PROGRAM_NAME - # - Fix service to disable syslog pre-req preventing start + # Fix service to disable syslog pre-req preventing start G_CONFIG_INJECT '# Required-Stop:' '# Required-Stop: $network $remote_fs' /etc/init.d/pihole-FTL G_CONFIG_INJECT '# Required-Start:' '# Required-Start: $network $remote_fs' /etc/init.d/pihole-FTL systemctl enable pihole-FTL - # - Run Gravity - pihole -g + # Disable pihole.log: https://github.com/pi-hole/FTL/issues/614#issuecomment-510564476 + pihole -l off + rm /var/log/pihole.log - # - Generate web interface PW: https://github.com/MichaIng/DietPi/issues/662 - pihole -a -p "$GLOBAL_PW" &> /dev/null # do not print + # Run Gravity + pihole -g fi @@ -12412,10 +12424,10 @@ _EOF_ Banner_Uninstalling G_AGP lighttpd - # Remove certbot renewal hook: - rm /etc/systemd/system/certbot.service.d/dietpi-lighttpd.conf &> /dev/null - # Remove hook directory only, if empty: - rmdir /etc/systemd/system/certbot.service.d &> /dev/null + # Remove certbot renewal hook + [[ -f 'etc/systemd/system/certbot.service.d/dietpi-lighttpd.conf' ]] && rm /etc/systemd/system/certbot.service.d/dietpi-lighttpd.conf + # Remove hook directory if empty + rmdir --ignore-fail-on-non-empty /etc/systemd/system/certbot.service.d fi @@ -13103,26 +13115,31 @@ _EOF_ Banner_Uninstalling pihole uninstall - # - pihole-FTL service+binary - systemctl disable pihole-FTL &> /dev/null - systemctl stop pihole-FTL &> /dev/null - rm /etc/init.d/pihole-FTL &> /dev/null - rm /usr/bin/pihole-FTL &> /dev/null - - rm -R /etc/pihole &> /dev/null - rm -R /etc/.pihole &> /dev/null - rm -R /opt/pihole &> /dev/null - rm -R /var/www/html/admin &> /dev/null - rm -R /var/www/html/pihole &> /dev/null - - # - symlinks - rm /var/www/pihole &> /dev/null - rm /var/www/admin &> /dev/null + # pihole-FTL service+binary + if [[ -f '/etc/init.d/pihole-FTL' ]]; then + + systemctl unmask pihole-FTL + systemctl disable --now pihole-FTL + rm /etc/init.d/pihole-FTL + + fi + [[ -f '/usr/bin/pihole-FTL' ]] && rm /usr/bin/pihole-FTL + + # Dirs + [[ -d '/etc/pihole' ]] && rm -R /etc/pihole + [[ -d '/etc/.pihole' ]] && rm -R /etc/.pihole + [[ -d '/opt/pihole' ]] && rm -R /opt/pihole + [[ -d '/var/www/html/admin' ]] && rm -R /var/www/html/admin + [[ -d '/var/www/html/pihole' ]] && rm -R /var/www/html/pihole + + # Symlinks + [[ -L '/var/www/pihole' ]] && rm /var/www/pihole + [[ -L '/var/www/admin' ]] && rm /var/www/admin [[ $(readlink /var/www/index.php) == 'pihole/index.php' ]] && rm /var/www/index.php - # - pre Pi-hole v4 + # Pre Pi-hole v4 G_AGP dnsmasq - rm -R /etc/dnsmasq* &> /dev/null + rm -Rf /etc/dnsmasq* fi diff --git a/dietpi/func/dietpi-logclear b/dietpi/func/dietpi-logclear index f7c94eded9..fe71380c83 100644 --- a/dietpi/func/dietpi-logclear +++ b/dietpi/func/dietpi-logclear @@ -16,36 +16,27 @@ # - dietpi-logclear 2 | Delete all logs in $FILEPATH_LOGFOLDER and backups. #//////////////////////////////////// - #Import DietPi-Globals --------------------------------------------------------------- + # Import DietPi-Globals -------------------------------------------------------------- . /DietPi/dietpi/func/dietpi-globals G_PROGRAM_NAME='DietPi-Logclear' G_CHECK_ROOT_USER G_INIT - #Import DietPi-Globals --------------------------------------------------------------- + # Import DietPi-Globals -------------------------------------------------------------- - INPUT=-1 - disable_error=1 G_CHECK_VALIDINT "$1" && INPUT=$1 + disable_error=1 G_CHECK_VALIDINT "$1" && INPUT=$1 || INPUT=-1 #//////////////////////////////////////////////////////////////// # Global #//////////////////////////////////////////////////////////////// - TEMP_FILE='dietpi-logclear' - FILEPATH_LOGFOLDER='/var/log' - FILEPATH_BACKUPFOLDER="$HOME/logfile_storage" + FILEPATH_BACKUPFOLDER='/root/logfile_storage' FILE_NAME='' - #0=text log, 1=compressed, 2=Pi-hole + # 0=text log, 1=compressed FILE_TYPE=0 FILESIZE_BYTES=0 PROCESS_FILE=0 - #//////////////////////////////////////////////////////////////// - #Excluded log files (user created) - #//////////////////////////////////////////////////////////////// - FP_EXCLUDED_LOGFILES='/DietPi/dietpi/.dietpi-logclear_exclude' - INFO_EXCLUDED_LOGFILES=0 - #//////////////////////////////////////////////////////////////// # Info Printouts #//////////////////////////////////////////////////////////////// @@ -62,155 +53,83 @@ Process_Logfiles(){ #----------------------------------------------------------------------------------- - #Remove internally rotated LetsEncrypt log files, prior to log loop + # Remove internally rotated LetsEncrypt log files, prior to log loop [[ -d $FILEPATH_LOGFOLDER/letsencrypt ]] && rm -f $FILEPATH_LOGFOLDER/letsencrypt/letsencrypt.log.* #----------------------------------------------------------------------------------- - #Find existing logs and generate a filepath list. - find $FILEPATH_LOGFOLDER -type f > $TEMP_FILE + # Find existing logs and generate a filepath array, excluding symlinks + local ARRAY_LOG_FILEPATH=() + while read -r line + do + + ARRAY_LOG_FILEPATH+=("$line") - #Read logfile filepath list into array. - readarray -t ARRAY_LOG_FILEPATH < $TEMP_FILE + done <<< "$(find $FILEPATH_LOGFOLDER -type f)" #----------------------------------------------------------------------------------- - #Process Logfiles + # Process Logfiles for ((i=0; i<${#ARRAY_LOG_FILEPATH[@]}; i++)) do - #File details - FILE_NAME=${ARRAY_LOG_FILEPATH[$i]//\/var\/log\/} + # File details + FILE_NAME=${ARRAY_LOG_FILEPATH[$i]#/var/log/} FILESIZE_BYTES=$(stat -c%s "${ARRAY_LOG_FILEPATH[$i]}") PROCESS_FILE=1 FILE_TYPE=0 - #Special Filetypes - #Pi-hole logs (contains dns stats) | FILE_TYPE 2 - if [[ ${ARRAY_LOG_FILEPATH[$i]} == '/var/log/pihole.log' ]]; then - - FILE_TYPE=2 - - #Compessed files (zip etc) | FILE_TYPE 1 - elif [[ ${FILE_NAME: -4} == '.zip' || ${FILE_NAME: -3} == '.gz' ]]; then + # Filetypes + # - Compessed files (zip etc) | FILE_TYPE 1 + if [[ ${FILE_NAME: -4} == '.zip' || ${FILE_NAME: -3} == '.gz' ]]; then FILE_TYPE=1 - #Normal Log Files. - # - Exclude <= 10 byte size - # - Exclude .db* extentions SQLite (.db .db-shm .db.wal) - elif (( $FILESIZE_BYTES <= 10 )) || [[ $FILE_NAME =~ '.db' ]]; then + # - Normal Log Files + # Exclude <= 10 byte size + # Exclude .db* extentions SQLite (.db .db-shm .db.wal) + elif (( $FILESIZE_BYTES < 11 )) || [[ $FILE_NAME =~ '.db' ]]; then PROCESS_FILE=0 fi - #Process File + # Process File if (( $PROCESS_FILE == 1 )); then - #Pi-hole - if (( $FILE_TYPE == 2 )); then - - local pihole_restart_required=0 - - #Find all non-matching lines with todays date - # NB: day is space padded without trailling 0 (eg: Sep 1, Sep 11) - local month_day_today="$(date +'%b %e')" - - # - Check for at least 1 non-matching line before applying. Remove all lines in logfile for all other days, excluding today. - if grep -vqi "$month_day_today" /var/log/pihole.log; then - - # RAMlog mode 2: - if (( $INPUT == 0 )); then - - sed "/$month_day_today/d" "${ARRAY_LOG_FILEPATH[$i]}" >> "$FILEPATH_BACKUPFOLDER/$FILE_NAME" - ((INFO_BACKUPS_MADE++)) - - fi - - G_DIETPI-NOTIFY 2 'Clearing log entries for Pi-hole, that are not from today, please wait...' - sed -i '/'"$month_day_today"'/!d' /var/log/pihole.log - pihole_restart_required=1 - - fi - - # recheck size again - FILESIZE_BYTES=$(stat -c%s "${ARRAY_LOG_FILEPATH[$i]}") - - #Clear all entries if over (AUTO_SETUP_RAMLOG_MAXSIZE / 3) (we have to limit and prevent /var/log hitting the 50mb tmpfs limit) - local filesize_limit=$(( ( $(grep -m1 '^[[:blank:]]*AUTO_SETUP_RAMLOG_MAXSIZE=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') / 3 ) * 1024 * 1024 )) - if (( $FILESIZE_BYTES >= $filesize_limit )); then - - G_DIETPI-NOTIFY 2 "${ARRAY_LOG_FILEPATH[$i]} has exceeded ${filesize_limit}MB, clearing, please wait..." - - # RAMlog mode 2: - if (( $INPUT == 0 )); then - - cat "${ARRAY_LOG_FILEPATH[$i]}" >> "$FILEPATH_BACKUPFOLDER/$FILE_NAME" - ((INFO_BACKUPS_MADE++)) - - fi - - > "${ARRAY_LOG_FILEPATH[$i]}" - ((INFO_LOGS_CLEARED++)) - - pihole_restart_required=1 - - #Prevent size effecting results - else - - FILESIZE_BYTES=0 - - fi - - #restart PiHole if we modified the log file - if (( $pihole_restart_required )); then - - G_DIETPI-NOTIFY 2 'PiHole logs have been changed, restarting, please wait...' - systemctl stop pihole-FTL - # Handle dnsmasq only, if enabled (+installed), otherwise assume FTLDNS, which would be broken by dnsmasq start: https://github.com/MichaIng/DietPi/issues/1696 - systemctl is-enabled dnsmasq 2> /dev/null | grep -q '^enabled$' && systemctl stop dnsmasq - systemctl stop resolvconf - sleep 1 - systemctl start resolvconf - systemctl is-enabled dnsmasq 2> /dev/null | grep -q '^enabled$' && systemctl start dnsmasq - systemctl start pihole-FTL - - fi - - #Delete all compressed filetypes. - elif (( $FILE_TYPE == 1 )); then + # Delete all compressed filetypes + if (( $FILE_TYPE == 1 )); then rm "${ARRAY_LOG_FILEPATH[$i]}" ((INFO_LOGS_DELETED++)) ((INFO_LOGS_NOTSUPPORTED++)) - #Update current log files data to $FILEPATH_BACKUPFOLDER/*. Then clear. + # Update current log files data to $FILEPATH_BACKUPFOLDER/*, then clear elif (( $INPUT == 0 )); then - #Generate filepaths + # Generate filepaths if [[ ! -f $FILEPATH_BACKUPFOLDER/$FILE_NAME ]]; then - #This is a little "hack" to automatically generate the required subdirectories. + # This is a little "hack" to automatically generate the required subdirectories. # EG: /this/is/my/logfile.txt | will create the folders /this/is/my mkdir -p "$FILEPATH_BACKUPFOLDER/$FILE_NAME" rm -R "$FILEPATH_BACKUPFOLDER/$FILE_NAME" fi - #Write current logfile contents to existing. + # Write current logfile contents to existing. cat "${ARRAY_LOG_FILEPATH[$i]}" >> "$FILEPATH_BACKUPFOLDER/$FILE_NAME" ((INFO_BACKUPS_MADE++)) - #Clear logfile contents + # Clear logfile contents > "${ARRAY_LOG_FILEPATH[$i]}" ((INFO_LOGS_CLEARED++)) - #Clear logfile contents + # Clear logfile contents elif (( $INPUT == 1 )); then > "${ARRAY_LOG_FILEPATH[$i]}" ((INFO_LOGS_CLEARED++)) - #Hard delete log files + # Hard delete log files elif (( $INPUT == 2 )); then rm "${ARRAY_LOG_FILEPATH[$i]}" @@ -218,7 +137,7 @@ fi - #Update Size cleared. + # Update Size cleared INFO_SIZE_CLEARED=$(($INFO_SIZE_CLEARED + $FILESIZE_BYTES)) fi @@ -227,12 +146,6 @@ done - #Remove temp files - rm $TEMP_FILE - - #delete[] array - unset ARRAY_LOG_FILEPATH - } #//////////////////////////////////////////////////////////////// @@ -240,61 +153,46 @@ #//////////////////////////////////////////////////////////////// #---------------------------------------------------------------- - #How to use print. - if (( $INPUT == -1 )); then - - G_DIETPI-NOTIFY 2 'Available commands:' - echo '' - echo -e '\e[1m dietpi-logclear 0\e[0m' - echo -e "\e[38;5;244m Backup contents of all log files from $FILEPATH_LOGFOLDER to $FILEPATH_BACKUPFOLDER/*.\n Also clears the contents of all logs files in $FILEPATH_LOGFOLDER.\e[0m" - echo '' - echo -e '\e[1m dietpi-logclear 1\e[0m' - echo -e "\e[38;5;244m Clear contents of all logs files in $FILEPATH_LOGFOLDER.\e[0m" - echo '' - echo -e '\e[1m dietpi-logclear 2\e[0m' - echo -e "\e[38;5;244m Physically delete all files in $FILEPATH_LOGFOLDER and backups in $FILEPATH_BACKUPFOLDER/*.\n May prevent log files from being updated, restart services or reboot. \e[0m" - echo '' + # Print usage + if (( $INPUT > 2 || $INPUT < 0 )); then + + G_DIETPI-NOTIFY 2 "Available commands:\e[0m +\n\e[1m dietpi-logclear 0\e[0m +\e[38;5;244m Backup contents of all log files from $FILEPATH_LOGFOLDER to $FILEPATH_BACKUPFOLDER/*.\n Also clears the contents of all logs files in $FILEPATH_LOGFOLDER.\e[0m +\n\e[1m dietpi-logclear 1\e[0m +\e[38;5;244m Clear contents of all logs files in $FILEPATH_LOGFOLDER.\e[0m +\n\e[1m dietpi-logclear 2\e[0m +\e[38;5;244m Physically delete all files in $FILEPATH_LOGFOLDER and backups in $FILEPATH_BACKUPFOLDER/*.\n May prevent log files from being updated, restart services or reboot.\e[0m\n" #---------------------------------------------------------------- - #Process log files - elif (( $INPUT >= 0 )); then + # Process log files + else Process_Logfiles - #Delete logfile backups - (( $INPUT == 2 )) && rm -R $FILEPATH_BACKUPFOLDER &> /dev/null - - #Print Info - G_DIETPI-NOTIFY 2 - echo -e " - Log file directory \e[90m|\e[0m $FILEPATH_LOGFOLDER" - echo -e " - Processed files \e[90m|\e[0m $INFO_FILES_PROCESSED" - - #Excluded - echo -e " - Excluded files \e[90m|\e[0m $INFO_EXCLUDED_LOGFILES" - - #Cleared - echo -e " - Cleared log files \e[90m|\e[0m $INFO_LOGS_CLEARED" - - #Deleted - echo -e " - Unsupported files \e[90m|\e[0m $INFO_LOGS_NOTSUPPORTED" - echo -e " - Deleted files \e[90m|\e[0m $INFO_LOGS_DELETED" + # Delete logfile backups + [[ $INPUT == 2 && -f $FILEPATH_BACKUPFOLDER ]] && rm -R $FILEPATH_BACKUPFOLDER - #convert size to kb - #/= (i miss it) - INFO_SIZE_CLEARED=$(($INFO_SIZE_CLEARED / 1024)) - echo -e " - Space cleared \e[90m|\e[0m $INFO_SIZE_CLEARED KB" + # Print Info + info=" + - Log file directory \e[90m|\e[0m $FILEPATH_LOGFOLDER + - Processed files \e[90m|\e[0m $INFO_FILES_PROCESSED + - Cleared log files \e[90m|\e[0m $INFO_LOGS_CLEARED + - Unsupported files \e[90m|\e[0m $INFO_LOGS_NOTSUPPORTED + - Deleted files \e[90m|\e[0m $INFO_LOGS_DELETED + - Space cleared \e[90m|\e[0m $(($INFO_SIZE_CLEARED / 1024)) KiB" - #Backups + # + Backups if (( $INPUT == 0 )); then - echo '' - echo -e ' \e[38;5;244mBackup Info:\e[0m' - echo -e " - Backup directory \e[90m|\e[0m $FILEPATH_BACKUPFOLDER" - echo -e " - Updated log files \e[90m|\e[0m $INFO_BACKUPS_MADE" + info+=" + \e[38;5;244mBackup Info:\e[0m + - Backup directory \e[90m|\e[0m $FILEPATH_BACKUPFOLDER + - Updated log files \e[90m|\e[0m $INFO_BACKUPS_MADE" fi - echo '' + G_DIETPI-NOTIFY 2 "\e[0mSummary:$info\n" fi diff --git a/dietpi/patch_file b/dietpi/patch_file index ebd41d317d..390de80a57 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2085,6 +2085,14 @@ A backup will be created to "/etc/mympd/mympd.conf.bak_DDMMYYY_N" from where you # RPi: Remove invalid I2C baudrate entries from dietpi.txt. Do no apply any value to preserve current system state (default): https://github.com/MichaIng/DietPi/issues/2966 (( $G_HW_MODEL < 10 )) && sed -i '/^[[:blank:]]*i2c_arm_baudrate=/d' /DietPi/dietpi.txt #------------------------------------------------------------------------------- + # Disable pihole.log: https://github.com/pi-hole/FTL/issues/614#issuecomment-510564476 + if command -v pihole &> /dev/null; then + + pihole -l off + rm /var/log/pihole.log + + fi + #------------------------------------------------------------------------------- fi From 33045d370766b6d48cbc5e4ec832f1eb0e544958 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Thu, 11 Jul 2019 23:04:29 +0200 Subject: [PATCH 021/184] v6.26 + DietPi-PREP | Disable translated package state files by default. There is no real use for this, it has nothing to do with translations for the CLI/UI of the package/binary, it's just the DPKG status files. --- PREP_SYSTEM_FOR_DIETPI.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index b466c62cb9..0de69b076e 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -691,8 +691,10 @@ _EOF_ G_ERROR_HANDLER_EXITCODE=$? G_ERROR_HANDLER - G_DIETPI-NOTIFY 2 'Preserve modified config files on APT update:' + G_DIETPI-NOTIFY 2 'Disable package state translation downloads:' + echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/98-dietpi-no_translations + G_DIETPI-NOTIFY 2 'Preserve modified config files on APT update:' G_ERROR_HANDLER_COMMAND='/etc/apt/apt.conf.d/99-dietpi-forceconf' cat << _EOF_ > $G_ERROR_HANDLER_COMMAND Dpkg::options { From 0dd9c4f080b08cf3a13f9f17ccc83be2303c659f Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Thu, 11 Jul 2019 23:07:36 +0200 Subject: [PATCH 022/184] v6.26 + DietPi-Patch | Disable DPKG status file translations by default, which have hardly any use, but raise APT update times + disk I/O --- dietpi/patch_file | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dietpi/patch_file b/dietpi/patch_file index 390de80a57..31dcccabb7 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2093,6 +2093,9 @@ A backup will be created to "/etc/mympd/mympd.conf.bak_DDMMYYY_N" from where you fi #------------------------------------------------------------------------------- + # Disable DPKG status file translations by default, which have hardly any use, but raise APT update times + disk I/O + echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/98-dietpi-no_translations + #------------------------------------------------------------------------------- fi From dc655415dfa17328bef93b24b7b5a7cb7a9cfaf0 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Fri, 12 Jul 2019 12:49:42 +0200 Subject: [PATCH 023/184] v6.26 + DietPi-Patch | Do not remove pihole.log, it is still used for rare general dnsmasq logs and is recreated by pihole-FTL service anyway --- dietpi/patch_file | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/dietpi/patch_file b/dietpi/patch_file index 31dcccabb7..96b9d2fdde 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2085,13 +2085,8 @@ A backup will be created to "/etc/mympd/mympd.conf.bak_DDMMYYY_N" from where you # RPi: Remove invalid I2C baudrate entries from dietpi.txt. Do no apply any value to preserve current system state (default): https://github.com/MichaIng/DietPi/issues/2966 (( $G_HW_MODEL < 10 )) && sed -i '/^[[:blank:]]*i2c_arm_baudrate=/d' /DietPi/dietpi.txt #------------------------------------------------------------------------------- - # Disable pihole.log: https://github.com/pi-hole/FTL/issues/614#issuecomment-510564476 - if command -v pihole &> /dev/null; then - - pihole -l off - rm /var/log/pihole.log - - fi + # Disable pihole.log query logging: https://github.com/pi-hole/FTL/issues/614#issuecomment-510564476 + command -v pihole &> /dev/null && pihole -l off #------------------------------------------------------------------------------- # Disable DPKG status file translations by default, which have hardly any use, but raise APT update times + disk I/O echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/98-dietpi-no_translations From a64a1c19b7b4f4b863c8a4cc93375150043a78bd Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Fri, 12 Jul 2019 12:51:52 +0200 Subject: [PATCH 024/184] v6.26 + DietPi-Software | Pi-hole: Do not remove pihole.log, it is still used for rare general dnsmasq logs and is recreated by pihole-FTL service anyway --- dietpi/dietpi-software | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 7f22005806..6bcddd4972 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8781,9 +8781,8 @@ Do you want to enable the Pi-hole blocking page?'; then G_CONFIG_INJECT '# Required-Start:' '# Required-Start: $network $remote_fs' /etc/init.d/pihole-FTL systemctl enable pihole-FTL - # Disable pihole.log: https://github.com/pi-hole/FTL/issues/614#issuecomment-510564476 + # Disable pihole.log query logging: https://github.com/pi-hole/FTL/issues/614#issuecomment-510564476 pihole -l off - rm /var/log/pihole.log # Run Gravity pihole -g From ea5f5e60ae61f7c01ef177475b1d02785cb8ef30 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Fri, 12 Jul 2019 16:51:19 +0200 Subject: [PATCH 025/184] v6.26 + DietPi-PREP | Fix cleaning APT cache --- PREP_SYSTEM_FOR_DIETPI.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index 0de69b076e..cfc04ece25 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -1676,7 +1676,7 @@ _EOF_ G_DIETPI-NOTIFY 2 'Disabling and clearing APT cache' /DietPi/dietpi/func/dietpi-set_software apt-cache cache disable - /DietPi/dietpi/func/dietpi-set_software apt-cache cache clean + /DietPi/dietpi/func/dietpi-set_software apt-cache clean # - HW Specific # RPi remove saved G_HW_MODEL , allowing obtain-hw_model to auto detect RPi model From 2cdb032c1854d367c09fb2ffa6fd8e0553269dd0 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Fri, 12 Jul 2019 18:20:30 +0200 Subject: [PATCH 026/184] v6.26 + DietPi-PREP | Fix APT cache clean --- PREP_SYSTEM_FOR_DIETPI.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index c24ffbb5bd..48aa02c6bc 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -1674,7 +1674,7 @@ _EOF_ G_DIETPI-NOTIFY 2 'Disabling and clearing APT cache' /DietPi/dietpi/func/dietpi-set_software apt-cache cache disable - /DietPi/dietpi/func/dietpi-set_software apt-cache cache clean + /DietPi/dietpi/func/dietpi-set_software apt-cache clean # - HW Specific # RPi remove saved G_HW_MODEL , allowing obtain-hw_model to auto detect RPi model From 47b3fe9159a21559fe7d730972d93e54f17c7629 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Mon, 15 Jul 2019 15:11:42 +0200 Subject: [PATCH 027/184] v6.26 + DietPi-Banner | Only print MOTD if sourcing succeeded and $motd variable is not empty, else (download failed) remove the file to force a fresh download on next banner print. + DietPi-Banner | Do not print any output of sourcing the MOTD file, so only the $motd variable content is printed, if available. + DietPi-Banner | Minor coding --- dietpi/func/dietpi-banner | 49 ++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/dietpi/func/dietpi-banner b/dietpi/func/dietpi-banner index 9d75fac5b2..1b8e5f0f90 100644 --- a/dietpi/func/dietpi-banner +++ b/dietpi/func/dietpi-banner @@ -18,10 +18,6 @@ # - dietpi-banner 2 = banner customisation menu #//////////////////////////////////// - # Import DietPi-Globals -------------------------------------------------------------- - # Do in main menu and on demand - # Import DietPi-Globals -------------------------------------------------------------- - [[ $1 == [012] ]] && INPUT=$1 || INPUT=0 #///////////////////////////////////////////////////////////////////////////////////// @@ -87,7 +83,8 @@ Save(){ - > $FP_SAVEFILE + # Custom entry description + echo "aDESCRIPTION[10]='${aDESCRIPTION[10]}'" > $FP_SAVEFILE for i in ${!aDESCRIPTION[@]} do @@ -96,9 +93,6 @@ done - # Safe custom entry description - echo "aDESCRIPTION[10]='${aDESCRIPTION[10]}'" >> $FP_SAVEFILE - for i in ${!aCOLOUR[@]} do @@ -112,7 +106,7 @@ # Update Available? Obtain_Update_Available - local text_update_available_date='' + local text_update_available_date if (( $UPDATE_AVAILABLE )); then if [[ $UPDATE_AVAILABLE_VERSION == '-1' ]]; then @@ -139,7 +133,7 @@ $GREEN_LINE" Print_Local_Ip(){ - echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[5]} $GREEN_SEPARATOR $(mawk 'NR==3 {dev=$0} NR==4 {print $0" ("dev")"}' /DietPi/dietpi/.network 2>&1)" #5: LAN IP (adapter) + echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[5]} $GREEN_SEPARATOR $(mawk 'NR==3 {dev=$0} NR==4 {print $0" ("dev")"}' /DietPi/dietpi/.network 2>&1)" # 5: LAN IP (adapter) } @@ -147,13 +141,13 @@ $GREEN_LINE" echo -e " ${aCOLOUR[2]}DietPi Team : MichaIng (lead), Daniel Knight (founder)" - [[ -f /DietPi/dietpi/.prep_info ]] && mawk 'NR==1 {sub(/^0$/,"DietPi Core Team");a=$0} NR==2 {print " Image : "a" (pre-image: "$0")"}' /DietPi/dietpi/.prep_info + [[ -f '/DietPi/dietpi/.prep_info' ]] && mawk 'NR==1 {sub(/^0$/,"DietPi Core Team");a=$0} NR==2 {print " Image : "a" (pre-image: "$0")"}' /DietPi/dietpi/.prep_info echo ' Web : https://DietPi.com | https://twitter.com/dietpi_ Patreon Legends : PINE64 community Donate : https://DietPi.com/#donate' - local image_additional_credits=$(sed -n 8p /DietPi/dietpi/.hw_model) + local image_additional_credits=$(mawk 'NR==8 {print}' /DietPi/dietpi/.hw_model 2>&1) [[ $image_additional_credits ]] && echo " Device image possible thanks to: $image_additional_credits" echo -e " DietPi Hosting : Powered by https://MyVirtualServer.com$COLOUR_RESET\n" @@ -196,25 +190,32 @@ $GREEN_LINE" printf '\ec' # clear current terminal screen Print_Header - (( ${aENABLED[0]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[0]} $GREEN_SEPARATOR $(mawk 'NR==2 {print $0}' /DietPi/dietpi/.hw_model 2>&1)" #0: Device model - (( ${aENABLED[1]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[1]} $GREEN_SEPARATOR $(uptime -p 2>&1)" #1: Uptime - (( ${aENABLED[2]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[2]} $GREEN_SEPARATOR $(print_full_info=1 G_OBTAIN_CPU_TEMP 2>&1)" #2: CPU temp - (( ${aENABLED[3]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[3]} $GREEN_SEPARATOR $(hostname -f 2>&1)" #3: Hostname - (( ${aENABLED[4]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[4]} $GREEN_SEPARATOR $(hostname -y 2>&1)" #4: Domain name + (( ${aENABLED[0]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[0]} $GREEN_SEPARATOR $(mawk 'NR==2 {print}' /DietPi/dietpi/.hw_model 2>&1)" # 0: Device model + (( ${aENABLED[1]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[1]} $GREEN_SEPARATOR $(uptime -p 2>&1)" # 1: Uptime + (( ${aENABLED[2]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[2]} $GREEN_SEPARATOR $(print_full_info=1 G_OBTAIN_CPU_TEMP 2>&1)" # 2: CPU temp + (( ${aENABLED[3]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[3]} $GREEN_SEPARATOR $(hostname -f 2>&1)" # 3: Hostname + (( ${aENABLED[4]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[4]} $GREEN_SEPARATOR $(hostname -y 2>&1)" # 4: Domain name (( ${aENABLED[5]} == 1 )) && Print_Local_Ip - (( ${aENABLED[6]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[6]} $GREEN_SEPARATOR $(curl -sLm 2 https://dietpi.com/myip.php 2>&1)" #6: WAN IP # Move this to /DietPi/dietpi/.network? - (( ${aENABLED[7]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[7]} $GREEN_SEPARATOR $(df -h --output=avail / | mawk 'NR==2 {print $1}' 2>&1)" #7: Freespace (RootFS) - (( ${aENABLED[8]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[8]} $GREEN_SEPARATOR $(df -h --output=avail /mnt/dietpi_userdata | mawk 'NR==2 {print $1}' 2>&1)" #8: Freespace (DietPi userdata) - (( ${aENABLED[9]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[9]} $GREEN_SEPARATOR $(curl -sLm 2 https://wttr.in/?format=4 2>&1)" #9: Weather - (( ${aENABLED[10]} == 1 )) && [[ -x $FP_CUSTOM ]] && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[10]} $GREEN_SEPARATOR $(bash $FP_CUSTOM 2>&1)" #10: Custom + (( ${aENABLED[6]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[6]} $GREEN_SEPARATOR $(curl -sLm 2 https://dietpi.com/myip.php 2>&1)" # 6: WAN IP # Move this to /DietPi/dietpi/.network? + (( ${aENABLED[7]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[7]} $GREEN_SEPARATOR $(df -h --output=avail / | mawk 'NR==2 {print $1}' 2>&1)" # 7: Freespace (RootFS) + (( ${aENABLED[8]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[8]} $GREEN_SEPARATOR $(df -h --output=avail /mnt/dietpi_userdata | mawk 'NR==2 {print $1}' 2>&1)" # 8: Freespace (DietPi userdata) + (( ${aENABLED[9]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[9]} $GREEN_SEPARATOR $(curl -sLm 2 https://wttr.in/?format=4 2>&1)" # 9: Weather + (( ${aENABLED[10]} == 1 )) && [[ -x $FP_CUSTOM ]] && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[10]} $GREEN_SEPARATOR $(bash $FP_CUSTOM 2>&1)" # 10: Custom if (( ${aENABLED[12]} == 1 )); then local fp_motd='/tmp/.dietpi_motd' [[ -f $fp_motd ]] || curl -sLm 2 https://dietpi.com/motd > $fp_motd if [[ -f $fp_motd ]]; then - . $fp_motd # Creates $motd variable - echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[12]} $GREEN_SEPARATOR $motd" #12: MOTD + if . $fp_motd &> /dev/null && [[ $motd ]]; then + + echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[12]} $GREEN_SEPARATOR $motd" # 12: MOTD + + else + + rm $fp_motd + + fi fi From 99c16138edea7ecf34784093d1618e6d8c497dd9 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Fri, 19 Jul 2019 21:03:58 +0200 Subject: [PATCH 028/184] v6.26 + DietPi-Software | Coding: Simplify menu system to main menu ID only, since sub menus are only single layered, thus allow to proceed or return to main menu only. + DietPi-Software | Wording: In case of insufficient free space, show a clear message that install has been aborted. + DietPi-Software | Further minor coding and wording --- dietpi/dietpi-software | 149 ++++++++++++----------------------------- 1 file changed, 43 insertions(+), 106 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 6bcddd4972..6c539ef971 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -14610,11 +14610,8 @@ _EOF_ G_DIETPI-NOTIFY 3 "$G_PROGRAM_NAME" 'Running automated installation' - # Skip dietpi-software menu - TARGETMENUID=-1 - - # Set start install - GOSTARTINSTALL=1 + TARGETMENUID=-1 # Skip menu loop + GOSTARTINSTALL=1 # Set install start flag # Find all software entries of AUTO_SETUP_INSTALL_SOFTWARE_ID= in dietpi.txt. Then set to state 1 for installation. while read -r software_id @@ -14648,21 +14645,16 @@ _EOF_ #///////////////////////////////////////////////////////////////////////////////////// Input_Modes(){ - # Skip menu - TARGETMENUID=-1 - - DISABLE_REBOOT=1 - local input=$@ input=${input#*[[:blank:]]} - # Install software and exit. + # Process software and exit if [[ $1 == 'install' || $1 == 'reinstall' || $1 == 'uninstall' ]]; then G_DIETPI-NOTIFY 3 "$G_PROGRAM_NAME" "Automated $1" # - Make sure we have at least one entry - if [[ -z $2 ]]; then + if [[ -z $input ]]; then G_DIETPI-NOTIFY 1 'Please enter at least one software index ID or choice system INDEX_*_TARGET=-?' @@ -14697,7 +14689,7 @@ _EOF_ if (( ! ${aSOFTWARE_AVAIL_G_HW_ARCH[$i,$G_HW_ARCH]:=1} )); then - G_DIETPI-NOTIFY 1 "Software title (${aSOFTWARE_WHIP_NAME[$i]}) is not supported for $G_HW_ARCH_DESCRIPTION." + G_DIETPI-NOTIFY 1 "Software title (${aSOFTWARE_WHIP_NAME[$i]}) is not supported on $G_HW_ARCH_DESCRIPTION systems." elif (( ! ${aSOFTWARE_AVAIL_G_HW_MODEL[$i,$G_HW_MODEL]:=1} )); then @@ -14705,12 +14697,12 @@ _EOF_ elif (( ! ${aSOFTWARE_AVAIL_G_DISTRO[$i,$G_DISTRO]:=1} )); then - G_DIETPI-NOTIFY 1 "Software title (${aSOFTWARE_WHIP_NAME[$i]}) is not supported for Debian $G_DISTRO_NAME." + G_DIETPI-NOTIFY 1 "Software title (${aSOFTWARE_WHIP_NAME[$i]}) is not supported on Debian ${G_DISTRO_NAME^}." elif (( ${aSOFTWARE_INSTALL_STATE[$i]} == 2 )); then aSOFTWARE_INSTALL_STATE[$i]=1 - GOSTARTINSTALL=1 + GOSTARTINSTALL=1 # Set install start flag G_DIETPI-NOTIFY 0 "Reinstalling ${aSOFTWARE_WHIP_NAME[$i]}: ${aSOFTWARE_WHIP_DESC[$i]}" sleep 0.5 @@ -14727,7 +14719,7 @@ _EOF_ if (( ! ${aSOFTWARE_AVAIL_G_HW_ARCH[$i,$G_HW_ARCH]:=1} )); then - G_DIETPI-NOTIFY 1 "Software title (${aSOFTWARE_WHIP_NAME[$i]}) is not supported for $G_HW_ARCH_DESCRIPTION." + G_DIETPI-NOTIFY 1 "Software title (${aSOFTWARE_WHIP_NAME[$i]}) is not supported on $G_HW_ARCH_DESCRIPTION systems." elif (( ! ${aSOFTWARE_AVAIL_G_HW_MODEL[$i,$G_HW_MODEL]:=1} )); then @@ -14735,12 +14727,12 @@ _EOF_ elif (( ! ${aSOFTWARE_AVAIL_G_DISTRO[$i,$G_DISTRO]:=1} )); then - G_DIETPI-NOTIFY 1 "Software title (${aSOFTWARE_WHIP_NAME[$i]}) is not supported for Debian $G_DISTRO_NAME." + G_DIETPI-NOTIFY 1 "Software title (${aSOFTWARE_WHIP_NAME[$i]}) is not supported on Debian ${G_DISTRO_NAME^}." elif (( ${aSOFTWARE_INSTALL_STATE[$i]} != 2 )); then aSOFTWARE_INSTALL_STATE[$i]=1 - GOSTARTINSTALL=1 + GOSTARTINSTALL=1 # Set install start flag G_DIETPI-NOTIFY 0 "Installing ${aSOFTWARE_WHIP_NAME[$i]}: ${aSOFTWARE_WHIP_DESC[$i]}" sleep 0.5 @@ -14768,11 +14760,7 @@ _EOF_ elif [[ $1 == 'uninstall' ]]; then Uninstall_Software - - # - Save Write_InstallFileList - - # - Start services [[ $G_SERVICE_CONTROL == 0 ]] || /DietPi/dietpi/dietpi-services start fi @@ -15350,7 +15338,7 @@ This will allow you to choose which program loads automatically, after the syste 'Uninstall') - TARGETMENUID=3 + Menu_Uninstall_Software ;; @@ -15362,13 +15350,13 @@ This will allow you to choose which program loads automatically, after the syste 'Software Optimised') - TARGETMENUID=1 + Menu_CreateSoftwareList 0 ;; 'Software Additional'*) - TARGETMENUID=2 + Menu_CreateSoftwareList 1 ;; @@ -15788,7 +15776,7 @@ List of installed software and their URL links for online docs: Menu_ConfirmInstall(){ # Obtain list of pending software installation: - local string_output='' + local string_output for i in ${!aSOFTWARE_INSTALL_STATE[@]} do @@ -15805,15 +15793,8 @@ List of installed software and their URL links for online docs: if G_WHIP_YESNO "DietPi is now ready to install your software choices: $string_output\n Software details, usernames, passwords etc:\n - https://dietpi.com/software\n\nWould you like to begin?"; then - # Exit menu system - TARGETMENUID=-1 - - # Enable installation start flag - GOSTARTINSTALL=1 - - else - - TARGETMENUID=0 # Return to Main Menu + TARGETMENUID=-1 # Exit menu loop + GOSTARTINSTALL=1 # Set install start flag fi @@ -15821,73 +15802,39 @@ Software details, usernames, passwords etc:\n - https://dietpi.com/software\n\nW Menu_StartInstall(){ - # Check if the user has made changes to their software selections. + # Check if user made/changed software selections if (( $INSTALL_SOFTWARE_CHOICESMADE || $INSTALL_SSHSERVER_CHOICESMADE || $INSTALL_FILESERVER_CHOICESMADE || $INSTALL_LOGGING_CHOICESMADE )); then - # Confirm install with user + # List selections and ask for confirmation Menu_ConfirmInstall - else - - # 1st run install - if (( $G_DIETPI_INSTALL_STAGE == 1 )); then + # Allow to finish first run setup without any selections + elif (( $G_DIETPI_INSTALL_STAGE == 1 )); then - if G_WHIP_YESNO 'DietPi was unable to detect any additional software selections for install.\n + if G_WHIP_YESNO 'DietPi was unable to detect any additional software selections for install.\n NB: You can use dietpi-software at a later date, to install optimised software from our catalogue as required.\n Do you wish to continue with DietPi as a pure minimal image?'; then - TARGETMENUID=-1 # Exit menu - - DISABLE_REBOOT=1 - - # Enable installation start flag - GOSTARTINSTALL=1 - - else - - TARGETMENUID=0 # Main menu - - fi - - # Not 1st run - elif (( $G_DIETPI_INSTALL_STAGE == 2 )); then - - G_WHIP_MSG 'No changes have been detected. Unable to start installation.' + TARGETMENUID=-1 # Exit menu loop + DISABLE_REBOOT=1 # Skip reboot as no software will be installed + GOSTARTINSTALL=1 # Set install start flag fi - fi - - } - - # TARGETMENUID=1 - Menu_Dietpi_Software(){ - - # Generate Whiptail menu and store results into our software arrays - Menu_CreateSoftwareList 0 - - TARGETMENUID=0 # Main menu - - } - - # TARGETMENUID=2 - Menu_Linux_Software(){ + # After first run setup has finished, abort install without any selections + elif (( $G_DIETPI_INSTALL_STAGE == 2 )); then - # Generate Whiptail menu and store results into our software arrays - Menu_CreateSoftwareList 1 + G_WHIP_MSG 'No changes have been detected. Unable to start installation.' - TARGETMENUID=0 # Main menu + fi } - # TARGETMENUID=3 Menu_Uninstall_Software(){ - TARGETMENUID=0 # Return to Main Menu - # Array which will hold all software IDs to be removed. G_WHIP_CHECKLIST_ARRAY=() @@ -15953,7 +15900,7 @@ Do you wish to continue with DietPi as a pure minimal image?'; then # - Start services [[ $G_SERVICE_CONTROL == 0 ]] || /DietPi/dietpi/dietpi-services start - G_WHIP_MSG 'Uninstall completed.' + G_WHIP_MSG 'Uninstall completed' else @@ -16047,6 +15994,7 @@ Do you wish to continue with DietPi as a pure minimal image?'; then if [[ $1 ]]; then Input_Modes "$@" + DISABLE_REBOOT=1 # Skip reboot on automated (re)installs #-------------------------------------------------------------------------------------- # Standard launch @@ -16089,31 +16037,14 @@ Do you wish to continue with DietPi as a pure minimal image?'; then # Prevent continue if no Network or NTPD is not completed: https://github.com/MichaIng/DietPi/issues/786 Check_Internet_and_NTPD - # - Apply 1st run automation + # Apply 1st run automation (( $G_DIETPI_INSTALL_STAGE == 1 )) && FirstRun_Automation_Set # Start DietPi Menu while (( $TARGETMENUID > -1 )); do printf '\ec' # clear current terminal screen - - if (( $TARGETMENUID == 1 )); then - - Menu_Dietpi_Software - - elif (( $TARGETMENUID == 2 )); then - - Menu_Linux_Software - - elif (( $TARGETMENUID == 3 )); then - - Menu_Uninstall_Software - - else - - Menu_Main - - fi + Menu_Main done @@ -16121,8 +16052,15 @@ Do you wish to continue with DietPi as a pure minimal image?'; then #-------------------------------------------------------------------------------------- # Start DietPi-Software installs - # - Check for at least 500M free space available - if (( $GOSTARTINSTALL )) && G_CHECK_FREESPACE / 500; then + if (( $GOSTARTINSTALL )); then + + # Check for sufficient free space, 500 MiB should be enough for most software selections + if ! G_CHECK_FREESPACE / 500; then + + G_DIETPI-NOTIFY 1 'Install aborted due to insufficient free space' + exit 1 + + fi # Userdata location verify G_CHECK_USERDATA @@ -16138,8 +16076,7 @@ Do you wish to continue with DietPi as a pure minimal image?'; then G_RUN_CMD systemctl unmask systemd-logind # systemd-logind is currently a static unit, but to be failsafe: - systemctl enable systemd-logind &> /dev/null - systemctl start systemd-logind &> /dev/null + systemctl enable --now systemd-logind &> /dev/null fi @@ -16151,7 +16088,7 @@ Do you wish to continue with DietPi as a pure minimal image?'; then if (( $DISABLE_REBOOT )); then - # - Start services (restart to reload webserver configs) + # - Start services (restart to reload configs of possible running services) [[ $G_SERVICE_CONTROL == 0 ]] || /DietPi/dietpi/dietpi-services restart else From 41d43b0c7021190d8c36cc60e8246e9e3f562e89 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sat, 20 Jul 2019 02:32:26 +0200 Subject: [PATCH 029/184] v6.26 + DietPi-Software | Mopidy: Resolve a tiny visual-only error about moving data dir into itself. Create data dir as hidden (dot) dir first and rename to final non-hidden name afterwards. --- dietpi/dietpi-software | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 6c539ef971..a8665d00ce 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8312,14 +8312,16 @@ _EOF_ if [[ -d '/var/lib/mopidy' && ! -d $G_FP_DIETPI_USERDATA/mopidy ]]; then mv /var/lib/mopidy $G_FP_DIETPI_USERDATA/mopidy - mkdir -p $G_FP_DIETPI_USERDATA/mopidy/data + # - Workaround error about moving data dir into itself + mkdir -p $G_FP_DIETPI_USERDATA/mopidy/.hidden_data # - Non-hidden files/folders are data - mv $G_FP_DIETPI_USERDATA/mopidy/* $G_FP_DIETPI_USERDATA/mopidy/data + mv $G_FP_DIETPI_USERDATA/mopidy/* $G_FP_DIETPI_USERDATA/mopidy/.hidden_data + mv $G_FP_DIETPI_USERDATA/mopidy/.hidden_data $G_FP_DIETPI_USERDATA/mopidy/data else mkdir -p $G_FP_DIETPI_USERDATA/mopidy/data - [[ -d /var/lib/mopidy ]] && rm -R /var/lib/mopidy + [[ -d '/var/lib/mopidy' ]] && rm -R /var/lib/mopidy fi @@ -8331,7 +8333,7 @@ _EOF_ else mkdir -p $G_FP_DIETPI_USERDATA/mopidy/cache - [[ -d /var/cache/mopidy ]] && rm -R /var/cache/mopidy + [[ -d '/var/cache/mopidy' ]] && rm -R /var/cache/mopidy fi From eaf898017093291d3c9e4caa86f36e406119feea Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 21 Jul 2019 16:10:46 +0200 Subject: [PATCH 030/184] v6.26 + DietPi-PREP | Remove possible OpenMediaVault leftovers --- PREP_SYSTEM_FOR_DIETPI.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index cfc04ece25..11f26f709e 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -1051,6 +1051,9 @@ _EOF_ umount /var/log.hdd 2> /dev/null [[ -d '/var/log.hdd' ]] && rm -R /var/log.hdd + # - OMV: https://github.com/MichaIng/DietPi/issues/2994 + rm -f /etc/cron.*/openmediavault* + # - Meveric specific [[ -f '/usr/local/sbin/setup-odroid' ]] && rm /usr/local/sbin/setup-odroid From 0a63ba91627408ebbc62e28172c394e0a187d54d Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 21 Jul 2019 16:14:10 +0200 Subject: [PATCH 031/184] v6.26 + DietPi-Patch | Remove possible OpenMediaVault cron job, if related binary does not exist --- dietpi/patch_file | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dietpi/patch_file b/dietpi/patch_file index 96b9d2fdde..fe712e8f17 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2081,6 +2081,9 @@ A backup will be created to "/etc/mympd/mympd.conf.bak_DDMMYYY_N" from where you elif (( $G_DIETPI_VERSION_SUB == 25 )); then + #------------------------------------------------------------------------------- + # Remove possible OpenMediaVault cron job, if related binary does not exist: https://github.com/MichaIng/DietPi/issues/2994 + [[ -f '/etc/cron.d/openmediavault-rrdtoolgraph' && ! -f '/usr/sbin/omv-mkgraph' ]] || rm /etc/cron.d/openmediavault-rrdtoolgraph #------------------------------------------------------------------------------- # RPi: Remove invalid I2C baudrate entries from dietpi.txt. Do no apply any value to preserve current system state (default): https://github.com/MichaIng/DietPi/issues/2966 (( $G_HW_MODEL < 10 )) && sed -i '/^[[:blank:]]*i2c_arm_baudrate=/d' /DietPi/dietpi.txt From bd2f262515f645dabe70ce6a95ae12ddf219a8a5 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 21 Jul 2019 16:43:19 +0200 Subject: [PATCH 032/184] v6.26 + DietPi-Patch | OMV binary is present on our NanoPi NEO2 image as well. The reason is that those two files are not part of current OMV packages (e.g. binary got renamed), thus are not removed by purging them. As those are surely obsolete, remove them. --- dietpi/patch_file | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dietpi/patch_file b/dietpi/patch_file index fe712e8f17..d55d08aee2 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2082,8 +2082,9 @@ A backup will be created to "/etc/mympd/mympd.conf.bak_DDMMYYY_N" from where you elif (( $G_DIETPI_VERSION_SUB == 25 )); then #------------------------------------------------------------------------------- - # Remove possible OpenMediaVault cron job, if related binary does not exist: https://github.com/MichaIng/DietPi/issues/2994 - [[ -f '/etc/cron.d/openmediavault-rrdtoolgraph' && ! -f '/usr/sbin/omv-mkgraph' ]] || rm /etc/cron.d/openmediavault-rrdtoolgraph + # Remove possible OpenMediaVault leftovers, that are not part of current OMV packages, thus save to remove: https://github.com/MichaIng/DietPi/issues/2994 + [[ -f '/etc/cron.d/openmediavault-rrdtoolgraph' ]] && rm /etc/cron.d/openmediavault-rrdtoolgraph + [[ -f '/usr/sbin/omv-mkgraph' ]] && rm /usr/sbin/omv-mkgraph #------------------------------------------------------------------------------- # RPi: Remove invalid I2C baudrate entries from dietpi.txt. Do no apply any value to preserve current system state (default): https://github.com/MichaIng/DietPi/issues/2966 (( $G_HW_MODEL < 10 )) && sed -i '/^[[:blank:]]*i2c_arm_baudrate=/d' /DietPi/dietpi.txt From 2675e5fcf4b5cb305a4cdac4b06a6e72f86cd7fa Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 21 Jul 2019 16:44:27 +0200 Subject: [PATCH 033/184] v6.26 + DietPi-PREP | Remove obsolete OMV binary as well. Both, cron job and binary, are not part of current OMV packages, thus are not removed by purging the packages. --- PREP_SYSTEM_FOR_DIETPI.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index 11f26f709e..f4ed718ecd 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -15,7 +15,7 @@ # - G_DISTRO # - G_DISTRO_NAME # - # The following environment variables can be set to automate the this script (adjust example values to your needs): + # The following environment variables can be set to automate this script (adjust example values to your needs): # - GITOWNER='MichaIng' (optional, defaults to 'MichaIng') # - GITBRANCH='master' (must be one of 'master', 'beta' or 'dev') # - IMAGE_CREATOR='Mr. Tux' @@ -1053,6 +1053,7 @@ _EOF_ # - OMV: https://github.com/MichaIng/DietPi/issues/2994 rm -f /etc/cron.*/openmediavault* + rm -f /usr/sbin/omv-* # - Meveric specific [[ -f '/usr/local/sbin/setup-odroid' ]] && rm /usr/local/sbin/setup-odroid From 76728b1bf84bc2d7c20fb6d06b96587b74276a8c Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 21 Jul 2019 16:52:33 +0200 Subject: [PATCH 034/184] v6.26 + CHANGELOG | Removed an obsolete OpenMediaVault cron job and binary that was leftover on at least one of our images --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2c166e9029..7bdfdd4e7c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -7,6 +7,7 @@ Changes / Improvements / Optimisations: - DietPi-Software | Pi-hole: Lighttpd config has been added to block access to .dot dirs (.git*) and enable local fonts for web UI, based on: https://github.com/pi-hole/pi-hole/blob/master/advanced/lighttpd.conf.debian Bug Fixes: +- General | Removed an obsolete OpenMediaVault cron job and binary that was leftover on at least one of our images (NanoPi NEO2) and is not part of the current OMV packages, thus save to remove in every case. Many thanks to @kt1024 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2994 - DietPi-Config | Resolved an issue on RPi where I2C baudrate was not applied correctly, thus selection was ineffective. Many thanks to @flashspys for reporting this issue: https://github.com/MichaIng/DietPi/issues/2966 - DietPi-Software | Gitea: Resolved an issue where install fails on ARMv7 systems. Many thanks to @maschiw for reporting this issue: https://github.com/MichaIng/DietPi/issues/2959 - DietPi-Software | Node-RED: Resolved an isssue where install fails because of missing data dir creation. Many thanks to @hifitime for reporting this isssue: https://github.com/MichaIng/DietPi/issues/2974#issuecomment-509534045 From 7d5a2bc4c7a9c7426c57ef25ac2dbb0101a09382 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 21 Jul 2019 22:19:21 +0200 Subject: [PATCH 035/184] v6.26 (#2988) + DietPi-Set_hardware | soundcard: Skip installing alsa-utils via input value "none" + DietPi-Set_hardware | soundcard: Reset current and persistent control state before applying new soundcard setting + DietPi-Set_hardware | soundcard: Skip applying amixer settings via boot script or service. alsa-restore.service (or alsa-state.service, in case daemon mode enabled) safes and restores them automatically + DietPi-Set_hardware | soundcard: Store control states once and force alsa-restore.service restart, to assure it is active (states preserved) for next reboot + DietPi-Set_hardware | soundcard: Fix I2S on RPi which is a dtparam and no dtoverlay + DietPi-Set_hardware | soundcard: Skip dtoverlay=i2s-mmap on RPi which is not available since kernel 4.9 but enabled by default with I2S. + DietPi-Set_hardware | soundcard: Split RPi onboard options: HDMI, 3.5mm and auto + DietPi-Set_hardware | soundcard: Coding: Merge simple dtoverlay options on RPi + DietPi-Set_hardware | soundcard: Remove "pine64-analogue" which is not available anymore in DietPi-Config. Re-add when users can verify correct method to enable 3.5mm on new ARMbian-based Pine64 image. + DietPi-Set_hardware | soundcard: Enable all dtoverlays, kernel modules, services and scripts immediately to allow skipping reboot from DietPi-Config + DietPi-Set_hardware | soundcard: When USB DAC auto detection fails, inform user that it is reverted to "none" and skip creating asound.conf. + DietPi-Set_hardware | Coding: Use "systemctl enable/disable --now" (available since Stretch) to include start/stop into the same call. Skip "systemctl daemon-reload" after removing a unit, which has no relevant effect. + DietPi-Set_hardware | serialconsole: Remove obsolete block for Odroid C1 Jessie (kernel 3.x) + DietPi-Set_hardware | Minor coding + DietPi-Config | Audio: Split disabling audio capabilities as a separate menu entry, hide all other options when disabled. Install alsa-utils when enabling, as well mark as installed for DietPi-Software, purge when disabling. + DietPi-Config | Audio on RPi: Remove obsolete rpi-bcm2835-ultrahq entries and doubled allo-boss-dac-pcm512x-audio. Add additional available HifiBerry and IQaudio soundcard dtoverlay. + DietPi-Config | Audio: Coding: Sort all soundcard options into a single $G_HW_* if-then-elif statement to grant a better overview of options per device. Add default=HDMI entry only to those devices, where we explicitly configure it like that within DietPi-Set_hardware. Do not show any "default" entry on other devices. + DietPi-Config | Audio: Add generic /proc/asound based detection to the bottom of the list for all devices + DietPi-Config | Audio: Add Intel SST DSP as a separate option to all Intel CPU devices, instead of installing the related firmware by default. Most user will never need it. + DietPi-JustBoom | Minor coding and merge ALSA + soundcard check into single exit prompt. Either installing ALSA via DietPi-Software or selecting a soundcard via DietPi-Config works. + DietPi-Software | ALSA: Enable default soundcard for all devices, if set to "none". Last fallback for this will be hw:0,0. On RPi use newly added "rpi-bcm2835-auto" which replaces "rpi-bcm2835-ultrahq" to enable onboard sound which uses HDMI if plugged, else 3.5mm automatically. + DietPi-Software | ALSA: Rely on DietPi-Set_hardware to install "alsa-utils" + DietPi-PREP | alsa-utils and firmware-intel-sound is not installed anymore by "dietpi-set_hardware soundcard none", thus does not need to be purged anymore. + DietPi-PREP | Do not reduce subversion by 1 anymore. Due to RC versions this is not required anymore, which is always increased before doing stable release. + DietPi-PREP | Coding: Remove some empty lines between G_DIETPI-NOTIFY() calls and related singe commands, to optically merge code that belongs together + DietPi-Patch | Remove obsolete/invalid audio related services/scripts/settings + DietPi-Patch | I2C baudrate fix was applied to wrong config file, whoopsie! --- CHANGELOG.txt | 1 + PREP_SYSTEM_FOR_DIETPI.sh | 43 +--- dietpi/dietpi-config | 166 +++++++------- dietpi/dietpi-software | 13 +- dietpi/func/dietpi-set_hardware | 393 ++++++++++++-------------------- dietpi/misc/dietpi-justboom | 169 ++++++-------- dietpi/patch_file | 15 +- 7 files changed, 312 insertions(+), 488 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7bdfdd4e7c..da4a30064d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ v6.26 Changes / Improvements / Optimisations: - General | Support for Debian Jessie has now been fully dropped from DietPi code. Jessie systems are moved to the "jessie-support" Git branch and will stay on v6.25. Critical bugs, if reported, may still be fixed, but DietPi-Software related issues and new features will not be handled anymore by the DietPi code team. However, everyone is free to open related pull requests against the jessie-support branch: https://github.com/MichaIng/DietPi/tree/jessie-support +- DietPi-Config | Audio Options: Menu has been reworked. Audio capabilities (ALSA) can be enabled and disabled as a separate option. If enabled, generic soundcard auto-detection has been added to the bottom of the list for all devices. This allows the selection of generic sound devices on all SBCs, e.g. if unknown to DietPi or if our hardcoded card/device IDs are wrong due to additional attached audio hardware. - DietPi-Software | Pi-hole: Logging to /var/log/pihole.log is now disabled by default, since it is not required in usual cases. Query logs, shown in web UI, are stored in database. This might also resolve possible pihole-FTL crashes in combination with DietPi-RAMlog and DietPi-Logclear. Many thanks to @kuerious for reporting and @Mcat12 for providing helpful information on this topic: https://github.com/pi-hole/FTL/issues/614 - DietPi-Software | Pi-hole: Lighttpd config has been added to block access to .dot dirs (.git*) and enable local fonts for web UI, based on: https://github.com/pi-hole/pi-hole/blob/master/advanced/lighttpd.conf.debian diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index f4ed718ecd..fefcab5105 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -1186,7 +1186,6 @@ _EOF_ # MISC G_DIETPI-NOTIFY 2 'Disabling apt-daily services to prevent random APT cache lock' - for i in apt-daily{,-upgrade}.{service,timer} do @@ -1208,13 +1207,11 @@ _EOF_ cd /tmp/$G_PROGRAM_NAME G_DIETPI-NOTIFY 2 'Deleting all log files /var/log' - /DietPi/dietpi/func/dietpi-logclear 2 &> /dev/null # As this will report missing vars, however, its fine, does not break functionality. l_message='Starting DietPi-RAMlog service' G_RUN_CMD systemctl start dietpi-ramlog G_DIETPI-NOTIFY 2 'Updating DietPi HW_INFO' - /DietPi/dietpi/func/dietpi-obtain_hw_model G_DIETPI-NOTIFY 2 'Configuring network interfaces:' @@ -1329,12 +1326,9 @@ _EOF_ G_ERROR_HANDLER G_DIETPI-NOTIFY 2 'Configuring fake-hwclock:' - systemctl stop fake-hwclock - # - Allow times in the past G_CONFIG_INJECT 'FORCE=' 'FORCE=force' /etc/default/fake-hwclock - systemctl restart fake-hwclock # Failsafe, apply now if date is way far back... G_DIETPI-NOTIFY 2 'Configuring serial login consoles:' @@ -1360,7 +1354,6 @@ _EOF_ fi G_DIETPI-NOTIFY 2 'Reducing getty count and resource usage:' - systemctl mask getty-static # - logind features disabled by default. Usually not needed and all features besides auto getty creation are not available without libpam-systemd package. # - It will be unmasked/enabled, automatically if libpam-systemd got installed during dietpi-software install, usually with desktops. @@ -1368,13 +1361,11 @@ _EOF_ systemctl mask systemd-logind G_DIETPI-NOTIFY 2 'Configuring regional settings (TZdata):' - rm -Rf /etc/{localtime,timezone} ln -sf /usr/share/zoneinfo/UTC /etc/localtime G_RUN_CMD dpkg-reconfigure -f noninteractive tzdata G_DIETPI-NOTIFY 2 'Configuring regional settings (Keyboard):' - dpkg-reconfigure -f noninteractive keyboard-configuration # Keyboard must be plugged in for this to work! #G_DIETPI-NOTIFY 2 "Configuring regional settings (Locale):" # Runs at start of script @@ -1545,30 +1536,24 @@ _EOF_ l_message='Enable Dropbear autostart' G_RUN_CMD sed -i '/NO_START=1/c\NO_START=0' /etc/default/dropbear G_DIETPI-NOTIFY 2 'Configuring services' - /DietPi/dietpi/dietpi-services stop /DietPi/dietpi/dietpi-services dietpi_controlled G_DIETPI-NOTIFY 2 'Mask cron until 1st run setup is completed' - G_RUN_CMD systemctl mask cron G_DIETPI-NOTIFY 2 'Running general cleanup of misc files' - # - Remove Bash history file [[ -f '/root/.bash_history' ]] && rm /root/.bash_history rm -f /home/*/.bash_history - # - Remove Nano history file [[ -f '/root/.nano_history' ]] && rm /root/.nano_history rm -f /home/*/.nano_history G_DIETPI-NOTIFY 2 'Removing swapfile from image' - /DietPi/dietpi/func/dietpi-set_swapfile 0 /var/swap [[ -e '/var/swap' ]] && rm /var/swap # still exists on some images... - - # - re-enable for next run + # - Re-enable for next run G_CONFIG_INJECT 'AUTO_SETUP_SWAPFILE_SIZE=' 'AUTO_SETUP_SWAPFILE_SIZE=1' /DietPi/dietpi.txt G_DIETPI-NOTIFY 2 'Resetting boot.ini, config.txt, cmdline.txt etc' @@ -1580,13 +1565,11 @@ _EOF_ [[ -f '/boot/cmdline.txt' ]] && sed -i 's/ rootdelay=10//g' /boot/cmdline.txt G_DIETPI-NOTIFY 2 'Generating default wpa_supplicant.conf' - /DietPi/dietpi/func/dietpi-wifidb 1 # Move to /boot/ so users can modify as needed for automated G_RUN_CMD mv /var/lib/dietpi/dietpi-wifi.db /boot/dietpi-wifi.txt G_DIETPI-NOTIFY 2 'Disabling generic BT by default' - /DietPi/dietpi/func/dietpi-set_hardware bluetooth disable # - Set WiFi @@ -1609,6 +1592,9 @@ _EOF_ if (( $G_HW_ARCH == 10 )); then l_message='Detecting additional OS installed on system' G_RUN_CMD os-prober + # Purge "os-prober" again + G_AGP os-prober + G_AGA # - Native PC/EFI (assume x86_64 only possible) if dpkg-query -s 'grub-efi-amd64' &> /dev/null && [[ -d '/boot/efi' ]]; then @@ -1630,39 +1616,27 @@ _EOF_ fi G_DIETPI-NOTIFY 2 'Disabling soundcards by default' - /DietPi/dietpi/func/dietpi-set_hardware soundcard none - # Alsa-utils is auto installed to reset soundcard settings on some ARM devices. uninstall it afterwards - # - The same for firmware-intel-sound (sound over HDMI?) on intel CPU devices - # - Purge "os-prober" from previous step as well - G_AGP alsa-utils firmware-intel-sound os-prober - G_AGA G_DIETPI-NOTIFY 2 'Setting default CPU gov' - /DietPi/dietpi/func/dietpi-set_cpu G_DIETPI-NOTIFY 2 'Clearing log files' - /DietPi/dietpi/func/dietpi-logclear 2 G_DIETPI-NOTIFY 2 'Resetting DietPi generated globals/files' - rm /DietPi/dietpi/.??* G_DIETPI-NOTIFY 2 'Set init .install_stage to -1 (first boot)' - echo -1 > /DietPi/dietpi/.install_stage G_DIETPI-NOTIFY 2 'Writing PREP information to file' - cat << _EOF_ > /DietPi/dietpi/.prep_info $IMAGE_CREATOR $PREIMAGE_INFO _EOF_ G_DIETPI-NOTIFY 2 'Generating GPL license readme' - cat << _EOF_ > /var/lib/dietpi/license.txt ----------------------- DietPi - GPLv2 License: @@ -1678,7 +1652,6 @@ You should have received a copy of the GNU General Public License along with thi _EOF_ G_DIETPI-NOTIFY 2 'Disabling and clearing APT cache' - /DietPi/dietpi/func/dietpi-set_software apt-cache cache disable /DietPi/dietpi/func/dietpi-set_software apt-cache clean @@ -1700,19 +1673,13 @@ _EOF_ fi l_message='Enabling first boot installation process' G_RUN_CMD systemctl enable dietpi-firstboot - G_DIETPI-NOTIFY 2 'Storing DietPi version info' - + G_DIETPI-NOTIFY 2 'Storing DietPi version info:' G_CONFIG_INJECT 'DEV_GITBRANCH=' "DEV_GITBRANCH=$G_GITBRANCH" /DietPi/dietpi.txt G_CONFIG_INJECT 'DEV_GITOWNER=' "DEV_GITOWNER=$G_GITOWNER" /DietPi/dietpi.txt - - # Reduce sub_version by 1, allows us to create image, prior to release and patch if needed. - ((G_DIETPI_VERSION_SUB--)) G_VERSIONDB_SAVE - G_RUN_CMD cp /DietPi/dietpi/.version /var/lib/dietpi/.dietpi_image_version G_DIETPI-NOTIFY 2 'Sync changes to disk. Please wait, this may take some time...' - G_RUN_CMD systemctl stop dietpi-ramlog G_RUN_CMD systemctl stop dietpi-ramdisk diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index d1a5e4b23c..70c12fc419 100644 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -3861,41 +3861,55 @@ Additional benchmarks: TARGETMENUID=0 - local soundcard_current=$(grep -m1 '^[[:blank:]]*CONFIG_SOUNDCARD=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') + if ! command -v aplay &> /dev/null; then - G_WHIP_MENU_ARRAY=('Soundcard' ": [$soundcard_current]") + G_WHIP_MENU_ARRAY=('Enable' ': Install ALSA to enable audio capabilities') - if dpkg-query -s alsa-utils &> /dev/null; then + else + local soundcard_current=$(sed -n '/^[[:blank:]]*CONFIG_SOUNDCARD=/{s/^[^=]*=//;p;q}' /DietPi/dietpi.txt) + G_WHIP_MENU_ARRAY=('Soundcard' ": [$soundcard_current]") G_WHIP_MENU_ARRAY+=('DietPi-JustBoom' ': Launches EQ and MPD audio options menu') - fi + # - RPi, low power mode (PSU noise ripple reduction): https://github.com/MichaIng/DietPi/issues/757 + if (( $G_HW_MODEL < 10 )); then - # - RPi, low power mode (PSU noise ripple reduction): https://github.com/MichaIng/DietPi/issues/757 - if (( $G_HW_MODEL < 10 )); then + local psu_noise_reduction_enabled=0 + local psu_noise_reduction_text='Off' + if grep -q '^[[:blank:]]*CONFIG_CPU_GOVERNOR=powersave' /DietPi/dietpi.txt && + grep -q '^[[:blank:]]*hdmi_ignore_hotplug=1' /DietPi/config.txt && + grep -q '^[[:blank:]]*hdmi_ignore_composite=1' /DietPi/config.txt; then - local current_cpu_governor=$(grep -m1 '^[[:blank:]]*CONFIG_CPU_GOVERNOR=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') - local hdmi_output=1 - grep -q '^[[:blank:]]*hdmi_ignore_hotplug=1' /DietPi/config.txt && grep -q '^[[:blank:]]*hdmi_ignore_composite=1' /DietPi/config.txt && hdmi_output=0 - local psu_noise_reduction_enabled=0 - if [[ $current_cpu_governor == 'powersave' && $hdmi_output == 0 ]]; then + psu_noise_reduction_enabled=1 + psu_noise_reduction_text='On' - G_WHIP_MENU_ARRAY+=('PSU noise reduction' ': [On]') - psu_noise_reduction_enabled=1 - - else - - G_WHIP_MENU_ARRAY+=('PSU noise reduction' ': [Off]') + fi + G_WHIP_MENU_ARRAY+=('PSU noise reduction' ": [$psu_noise_reduction_text]") fi + G_WHIP_MENU_ARRAY+=('' '●─' 'Disable' ': Disable all audio capabilities') + fi + G_WHIP_DEFAULT_ITEM='Soundcard' if G_WHIP_MENU 'Please select an option:'; then TARGETMENUID=14 # Return to this menu - if [[ $G_WHIP_RETURNED_VALUE == 'PSU noise reduction' ]]; then + if [[ $G_WHIP_RETURNED_VALUE == 'Disable' ]]; then + + /DietPi/dietpi/func/dietpi-set_hardware soundcard none + G_AGP alsa-utils firmware-intel-sound + G_AGA + [[ -f '/DietPi/dietpi/.installed' ]] && G_CONFIG_INJECT 'aSOFTWARE_INSTALL_STATE\[5\]=' 'aSOFTWARE_INSTALL_STATE[5]=0' /DietPi/dietpi/.installed + + elif [[ $G_WHIP_RETURNED_VALUE == 'Enable' ]]; then + + G_AGI alsa-utils + [[ -f '/DietPi/dietpi/.installed' ]] && G_CONFIG_INJECT 'aSOFTWARE_INSTALL_STATE\[5\]=' 'aSOFTWARE_INSTALL_STATE[5]=2' /DietPi/dietpi/.installed + + elif [[ $G_WHIP_RETURNED_VALUE == 'PSU noise reduction' ]]; then if (( ! $psu_noise_reduction_enabled )); then @@ -3904,14 +3918,12 @@ The following will now be applied:\n - CPU gov = Powersave\n - HDMI output = Dis G_CONFIG_INJECT 'CONFIG_CPU_GOVERNOR=' 'CONFIG_CPU_GOVERNOR=powersave' /DietPi/dietpi.txt /DietPi/dietpi/func/dietpi-set_cpu - /DietPi/dietpi/func/dietpi-set_hardware headless 1 else G_CONFIG_INJECT 'CONFIG_CPU_GOVERNOR=' 'CONFIG_CPU_GOVERNOR=ondemand' /DietPi/dietpi.txt /DietPi/dietpi/func/dietpi-set_cpu - /DietPi/dietpi/func/dietpi-set_hardware headless 0 fi @@ -3922,17 +3934,13 @@ The following will now be applied:\n - CPU gov = Powersave\n - HDMI output = Dis G_WHIP_MENU_ARRAY=() - # - Global: # RPi, all but rpi-bcm2835 disables if (( $G_HW_MODEL < 10 )); then - G_WHIP_MENU_ARRAY+=('none' ': Disables HDMI sound + 3.5mm analogue') - G_WHIP_MENU_ARRAY+=('rpi-bcm2835' ': Onboard: HDMI (if plugged in, else 3.5mm)') + G_WHIP_MENU_ARRAY+=('rpi-bcm2835-auto' ': Onboard: HDMI if plugged in, else 3.5mm') G_WHIP_MENU_ARRAY+=('rpi-bcm2835-3.5mm' ': Onboard: 3.5mm forced output') - G_WHIP_MENU_ARRAY+=('rpi-bcm2835-ultrahq' ': Onboard HQ: HDMI (if plugged in, else 3.5mm)') - G_WHIP_MENU_ARRAY+=('rpi-bcm2835-ultrahq-3.5mm' ': Onboard HQ: 3.5mm forced output') + G_WHIP_MENU_ARRAY+=('rpi-bcm2835-hdmi' ': Onboard: HDMI forced output') G_WHIP_MENU_ARRAY+=('allo-boss-dac-pcm512x-audio' ': Allo Boss DAC') - G_WHIP_MENU_ARRAY+=('allo-boss-dac-pcm512x-audio' ': Allo Mini Boss DAC') G_WHIP_MENU_ARRAY+=('allo-digione' ': Allo DigiOne') G_WHIP_MENU_ARRAY+=('allo-katana-dac-audio' ': Allo Katana DAC') G_WHIP_MENU_ARRAY+=('allo-piano-dac-pcm512x-audio' ': Allo Piano DAC') @@ -3944,9 +3952,11 @@ The following will now be applied:\n - CPU gov = Powersave\n - HDMI output = Dis G_WHIP_MENU_ARRAY+=('hifiberry-amp' ': HifiBerry AMP / AMP+') G_WHIP_MENU_ARRAY+=('hifiberry-dac' ': HifiBerry DAC / MiniAMP') G_WHIP_MENU_ARRAY+=('hifiberry-dacplus' ': HifiBerry DAC+ / DAC+ Pro / AMP2') + G_WHIP_MENU_ARRAY+=('hifiberry-dacplusadc' ': HifiBerry DAC+ADC') G_WHIP_MENU_ARRAY+=('hifiberry-digi' ': HifiBerry DIGI / DIGI+') G_WHIP_MENU_ARRAY+=('hifiberry-digi-pro' ': HifiBerry DIGI Pro') G_WHIP_MENU_ARRAY+=('i-sabre-q2m' ': AudioPhonics I-Sabre ES9028Q2M / ES9038Q2M') + G_WHIP_MENU_ARRAY+=('iqaudio-dac' ': IQaudio DAC audio card') G_WHIP_MENU_ARRAY+=('iqaudio-dacplus' ': Pi-DAC+, Pi-DACZero, Pi-DAC Pro, Pi-DigiAMP+') G_WHIP_MENU_ARRAY+=('iqaudio-digi-wm8804-audio' ': Pi-DIGI+') G_WHIP_MENU_ARRAY+=('iqaudio-dacplus,auto_mute_amp' ': Pi-DigiAMP+') @@ -3955,82 +3965,40 @@ The following will now be applied:\n - CPU gov = Powersave\n - HDMI output = Dis G_WHIP_MENU_ARRAY+=('justboom-digi' ': JustBoom: Digi HAT and Digi Zero') G_WHIP_MENU_ARRAY+=('rpi-dac' ': Soekris DAM1021 (pcm1794a)') - # NanoPi M2/M3, BPi Pro, OPi Zero - elif (( $G_HW_MODEL == 32 || $G_HW_MODEL == 51 || $G_HW_MODEL == 61 || $G_HW_MODEL == 62 )); then - - G_WHIP_MENU_ARRAY+=('default' ': 3.5mm Analogue') - - # Native PC/MISC devices | Detect and list available - elif (( $G_HW_MODEL == 15 || - $G_HW_MODEL == 21 || - $G_HW_MODEL == 40 || $G_HW_MODEL == 42 || $G_HW_MODEL == 43 || - $G_HW_MODEL == 44 || $G_HW_MODEL == 67 )); then - - G_WHIP_MENU_ARRAY+=('default' ': HW:0,0') - - # Install prereqs to allow for detection - dpkg-query -s alsa-utils &> /dev/null || /DietPi/dietpi/func/dietpi-set_hardware soundcard default - - for i in {0..9} - do - - if [[ -f /proc/asound/card$i/id ]]; then - - for j in {0..9} - do - - if [[ -f /proc/asound/card$i/pcm${j}p/info ]]; then - - local card_index=$(mawk '/^card:/ {print $2;exit}' /proc/asound/card$i/pcm${j}p/info) - local device_index=$(mawk '/^device:/ {print $2;exit}' /proc/asound/card$i/pcm${j}p/info) - local card_name=$( /dev/null + [[ -f $fp_log ]] && rm $fp_log if (( $STRESS_TEST_MODE == 0 )); then diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index a8665d00ce..cd5b6fefc6 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6023,20 +6023,19 @@ Mycroft AI requires at least 2 GiB memory on first start. We will now increase y Banner_Installing - G_AGI alsa-utils - - # Apply soundcard + # Get chosen soundcard local soundcard=$(grep -m1 '^[[:blank:]]*CONFIG_SOUNDCARD=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') soundcard=${soundcard:-none} - # - RPi enable internal HDMI+Analogue if currently set to 'none' - if (( $G_HW_MODEL < 10 )) && [[ $soundcard == 'none' || $soundcard == 'default' ]]; then + # Enable defaults, if set to "none" + if [[ $soundcard == 'none' ]]; then - soundcard='rpi-bcm2835-ultrahq' + # - RPi: Onboard auto, Others: default + (( $G_HW_MODEL < 10 )) && soundcard='rpi-bcm2835-auto' || soundcard='default' fi - # - Apply + # Apply: Installs "alsa-utils" /DietPi/dietpi/func/dietpi-set_hardware soundcard "$soundcard" fi diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 93b41f17bb..7d2962f68d 100644 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -29,8 +29,7 @@ $FP_SCRIPT gpumemsplit 64/128/256 # RPi only $FP_SCRIPT rpi-camera enable/disable $FP_SCRIPT rpi-opengl vc4-kms-v3d/vc4-fkms-v3d/disable $FP_SCRIPT rpi3_usb_boot enable -" - #//////////////////////////////////// +" #//////////////////////////////////// # Grab Inputs INPUT_DEVICE_NAME=${1,,} @@ -62,7 +61,7 @@ $FP_SCRIPT rpi3_usb_boot enable [[ -f $FP_RPI_CONFIG ]] || FP_RPI_CONFIG='/boot/config.txt' # ARMbian uses armbianEnv.txt instead which requires different syntax - elif [[ -f /boot/armbianEnv.txt ]]; then + elif [[ -f '/boot/armbianEnv.txt' ]]; then ARMBIAN=1 FP_UENV='/boot/armbianEnv.txt' @@ -188,7 +187,6 @@ _EOF_ systemctl disable dietpi-rm_program_usb_boot_mode rm /etc/systemd/system/dietpi-rm_program_usb_boot_mode.service - systemctl daemon-reload fi @@ -304,10 +302,8 @@ _EOF_ if [[ -f '/etc/systemd/system/justboom-ir-mpd.service' ]]; then - systemctl stop justboom-ir-mpd - systemctl disable justboom-ir-mpd + systemctl disable --now justboom-ir-mpd rm /etc/systemd/system/justboom-ir-mpd.service - systemctl daemon-reload fi @@ -317,10 +313,8 @@ _EOF_ # Disable Odroids elif (( $G_HW_MODEL < 20 )) && [[ -f '/etc/systemd/system/odroid-remote.service' ]]; then - systemctl stop odroid-remote - systemctl disable odroid-remote + systemctl disable --now odroid-remote rm /etc/systemd/system/odroid-remote.service - systemctl daemon-reload fi @@ -520,8 +514,7 @@ ExecStart=$(command -v irexec) WantedBy=default.target _EOF_ systemctl daemon-reload - systemctl enable justboom-ir-mpd - systemctl start justboom-ir-mpd + systemctl enable --now justboom-ir-mpd elif [[ $INPUT_DEVICE_VALUE == 'none' ]]; then @@ -559,17 +552,14 @@ ExecStart=$(command -v ethtool) -s $eth_adapter speed $eth_force_speed duplex fu WantedBy=ifup@$eth_adapter.service _EOF_ systemctl daemon-reload - systemctl enable ethtool_force_speed - systemctl start ethtool_force_speed + systemctl enable --now ethtool_force_speed elif [[ $INPUT_DEVICE_VALUE == 'disable' ]]; then # 0 is converted to 'disable' if [[ -f '/etc/systemd/system/ethtool_force_speed.service' ]]; then - systemctl stop ethtool_force_speed - systemctl disable ethtool_force_speed + systemctl disable --now ethtool_force_speed rm /etc/systemd/system/ethtool_force_speed.service - systemctl daemon-reload fi @@ -593,7 +583,7 @@ _EOF_ if [[ $INPUT_DEVICE_VALUE == 'vc4-'* ]]; then - (( $G_HW_MODEL < 2 )) && { Unsupported_Input_Mode; return 1; } # RPi 2/3+ only + (( $G_HW_MODEL < 2 )) && { Unsupported_Input_Mode; return 1; } # RPi 2/3/4 only # - GL packages G_AG_CHECK_INSTALL_PREREQ libgl1-mesa-dri libgles2-mesa mesa-utils @@ -749,7 +739,7 @@ _EOF_ sed -i '/"SwapAxes"/c\ Option "SwapAxes" "1"' /etc/X11/xorg.conf.d/99-waveshare32_calibration.conf # - Move fb0 xorg.conf out the way: https://github.com/MichaIng/DietPi/issues/767 - [[ -f /usr/share/X11/xorg.conf.d/99-fbturbo.conf ]] && mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf /usr/share/X11/99-fbturbo.conf + [[ -f '/usr/share/X11/xorg.conf.d/99-fbturbo.conf' ]] && mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf /usr/share/X11/99-fbturbo.conf # Odroids else @@ -824,10 +814,8 @@ _EOF_ if [[ -f '/etc/systemd/system/con2fbmap.service' ]]; then - systemctl stop con2fbmap - systemctl disable con2fbmap + systemctl disable --now con2fbmap rm /etc/systemd/system/con2fbmap.service - systemctl daemon-reload fi [[ -f '/etc/modprobe.d/waveshare32.conf' ]] && rm /etc/modprobe.d/waveshare32.conf @@ -865,7 +853,7 @@ _EOF_ # Odroid LCD 3.5 Lcd_Panel_OdroidLCD35_Enable(){ - (( $G_HW_MODEL >= 10 && $G_HW_MODEL < 20 )) || { Unsupported_Input_Mode; return 1; } # Exit path for non-Odroid + (( $G_HW_MODEL > 9 && $G_HW_MODEL < 20 )) || { Unsupported_Input_Mode; return 1; } # Exit path for non-Odroid # Reset to disabled: Lcd_Panel_OdroidLCD35_Disable @@ -894,12 +882,12 @@ _EOF_ fi - for i in ${!amodules[@]} + for i in ${amodules[@]} do # - Enable modules now, as we need to detect pwm path for service - G_RUN_CMD modprobe ${amodules[$i]} - G_CONFIG_INJECT "${amodules[$i]}" "${amodules[$i]}" /etc/modules + G_RUN_CMD modprobe $i + G_CONFIG_INJECT "$i" "$i" /etc/modules done @@ -942,9 +930,9 @@ PathExists=/dev/fb2 [Service] Type=oneshot RemainAfterExit=yes -ExecStart=/bin/bash -c 'echo 500000 > $fp_control/freq0' -ExecStart=/bin/bash -c 'echo 1 > $fp_control/enable0' -ExecStart=/bin/bash -c 'echo 1023 > $fp_control/duty0' +ExecStart=/bin/dash -c 'echo 500000 > $fp_control/freq0' +ExecStart=/bin/dash -c 'echo 1 > $fp_control/enable0' +ExecStart=/bin/dash -c 'echo 1023 > $fp_control/duty0' ExecStart=$(command -v setterm) -blank 0 -powersave off ExecStart=$(command -v con2fbmap) 1 2 StandardOutput=tty @@ -987,10 +975,8 @@ _EOF_ [[ -f '/etc/modprobe.d/odroid-lcd35.conf' ]] && rm /etc/modprobe.d/odroid-lcd35.conf if [[ -f '/etc/systemd/system/odroid-lcd35.service' ]]; then - systemctl stop odroid-lcd35 - systemctl disable odroid-lcd35 + systemctl disable --now odroid-lcd35 rm /etc/systemd/system/odroid-lcd35.service - systemctl daemon-reload fi [[ -f '/etc/X11/xorg.conf.d/99-odroid-lcd35.conf' ]] && rm /etc/X11/xorg.conf.d/99-odroid-lcd35.conf @@ -1072,21 +1058,18 @@ _EOF_ # + all Broadcom-based models that need brcm_patchram_plus if (( $G_HW_MODEL == 61 || $G_HW_MODEL == 62 )); then - systemctl stop brcm_patchram_plus 2> /dev/null - systemctl disable brcm_patchram_plus 2> /dev/null + systemctl disable --now brcm_patchram_plus 2> /dev/null # + RPi 3 (apply to all, as pi-bluetooth package is default installed on all RPi's now) # + ASUS TB elif (( $G_HW_MODEL < 10 || $G_HW_MODEL == 52 )); then - systemctl stop hciuart 2> /dev/null - systemctl disable hciuart 2> /dev/null + systemctl disable --now hciuart 2> /dev/null fi # Bluetooth last - systemctl stop bluetooth 2> /dev/null - systemctl disable bluetooth 2> /dev/null + systemctl disable --now bluetooth 2> /dev/null for ((i=$(( ${#aBLUETOOTH_MODULES[@]} - 1 )); i>=0; i--)) do @@ -1146,19 +1129,16 @@ Do you want to continue and disable the serial login console?'; then # + all Broadcom-based models that need brcm_patchram_plus if (( $G_HW_MODEL == 61 || $G_HW_MODEL == 62 )); then - systemctl enable brcm_patchram_plus 2> /dev/null - G_RUN_CMD systemctl start brcm_patchram_plus + G_RUN_CMD systemctl enable --now brcm_patchram_plus fi - systemctl enable bluetooth 2> /dev/null - G_RUN_CMD systemctl start bluetooth + G_RUN_CMD systemctl enable --now bluetooth # + RPi if (( $G_HW_MODEL < 10 )); then - systemctl enable hciuart - G_RUN_CMD systemctl start hciuart + G_RUN_CMD systemctl enable --now hciuart fi @@ -1184,7 +1164,7 @@ Do you want to continue and disable the serial login console?'; then elif [[ $INPUT_DEVICE_VALUE == 'enable' ]]; then - [[ -f /etc/sysctl.d/dietpi-disable_ipv6.conf ]] && rm /etc/sysctl.d/dietpi-disable_ipv6.conf + [[ -f '/etc/sysctl.d/dietpi-disable_ipv6.conf' ]] && rm /etc/sysctl.d/dietpi-disable_ipv6.conf # - Apply to current session: # - "all" => all existing interfaces # - "default" => all future interfaces @@ -1427,13 +1407,8 @@ Do you want to continue and disable the serial login console?'; then Serial_Main(){ #------------------------------------------------------------------------------------- - #C1 on 3.x with Jessie, causes kernel hang. - if (( $G_HW_MODEL == 10 )); then - - echo 'Not supported' - # Enable - elif [[ $INPUT_DEVICE_VALUE == 'enable' ]]; then + if [[ $INPUT_DEVICE_VALUE == 'enable' ]]; then # Enable for specific Serial/UART device if [[ $INPUT_ADDITIONAL ]]; then @@ -1541,8 +1516,7 @@ Do you want to continue and DISABLE Bluetooth now?'; then if [[ $INPUT_ADDITIONAL ]]; then G_DIETPI-NOTIFY 2 "Disabling serial-getty on: /dev/$INPUT_ADDITIONAL" - systemctl stop serial-getty@$INPUT_ADDITIONAL - systemctl disable serial-getty@$INPUT_ADDITIONAL + systemctl disable --now serial-getty@$INPUT_ADDITIONAL # - Place a mask only if device exists [[ -e /dev/$INPUT_ADDITIONAL ]] && systemctl mask serial-getty@$INPUT_ADDITIONAL @@ -1621,18 +1595,19 @@ Do you want to continue and DISABLE Bluetooth now?'; then # Disable all soundcards and revert back to default output if available. Soundcard_Reset_All(){ + # All SOUNDCARD_TARGET_CARD=0 SOUNDCARD_TARGET_DEVICE=0 ALSA_EQ_ENABLED=0 - # Remove previous asound.conf + # - Remove previous asound.conf [[ -f '/etc/asound.conf' ]] && rm /etc/asound.conf - # - Pre-Reqs for any soundcard - G_AG_CHECK_INSTALL_PREREQ alsa-utils + # - Remove previously stored alsactl state + [[ -f '/var/lib/alsa/state' ]] && rm /var/lib/alsa/state - # Intel sound firmware - grep -qi 'vendor_id.*intel' /proc/cpuinfo && G_AG_CHECK_INSTALL_PREREQ firmware-intel-sound + # - Reset active alsactl/amixer state + [[ $INPUT_DEVICE_VALUE != 'none' ]] && alsactl init # HW specific # - RPi @@ -1672,16 +1647,11 @@ Do you want to continue and DISABLE Bluetooth now?'; then fi - systemctl daemon-reload - } Soundcard_Reset_RPi(){ - # - Disable onboard sound - G_CONFIG_INJECT 'dtparam=audio=' 'dtparam=audio=off' $FP_RPI_CONFIG - - # - Remove known soundcard dtoverlays + # Remove known soundcard dtoverlays sed -i '/^[[:blank:]]*dtoverlay=hifiberry-/d' $FP_RPI_CONFIG sed -i '/^[[:blank:]]*dtoverlay=iqaudio-/d' $FP_RPI_CONFIG sed -i '/^[[:blank:]]*dtoverlay=justboom-/d' $FP_RPI_CONFIG @@ -1692,22 +1662,11 @@ Do you want to continue and DISABLE Bluetooth now?'; then sed -i '/^[[:blank:]]*dtoverlay=googlevoicehat-soundcard/d' $FP_RPI_CONFIG sed -i '/^[[:blank:]]*dtoverlay=applepi-/d' $FP_RPI_CONFIG - # - Remove I2C maps - sed -i '/^[[:blank:]]*dtoverlay=i2s-mmap/d' $FP_RPI_CONFIG + # Disable I2S sed -i '/^[[:blank:]]*dtparam=i2s=/d' $FP_RPI_CONFIG - # - Disable forced analogue out - if [[ -f '/etc/systemd/system/rpi-bcm2835_forced_3.5mm.service' ]]; then - - systemctl stop rpi-bcm2835_forced_3.5mm - systemctl disable rpi-bcm2835_forced_3.5mm - rm /etc/systemd/system/rpi-bcm2835_forced_3.5mm.service - systemctl daemon-reload - - fi - - # - Return Auto - amixer -c 0 cset numid=3 0 &> /dev/null + # Disable onboard sound + G_CONFIG_INJECT 'dtparam=audio=' 'dtparam=audio=off' $FP_RPI_CONFIG } @@ -1715,21 +1674,19 @@ Do you want to continue and DISABLE Bluetooth now?'; then [[ -f '/var/lib/dietpi/postboot.d/c2_smp.sh' ]] && rm /var/lib/dietpi/postboot.d/c2_smp.sh - # - HiFi shield plus + # HiFi shield plus sed -i '/^[[:blank:]]*snd-soc-pcm5102/d' /etc/modules sed -i '/^[[:blank:]]*snd-soc-odroid-dac/d' /etc/modules - # - HiFi shield 2 + # HiFi shield 2 sed -i '/^[[:blank:]]*snd-soc-pcm512x/d' /etc/modules sed -i '/^[[:blank:]]*snd-soc-pcm512x-i2c/d' /etc/modules sed -i '/^[[:blank:]]*snd-soc-odroid-dac2/d' /etc/modules if [[ -f '/etc/systemd/system/odroid-hifishield2.service' ]]; then - systemctl stop odroid-hifishield2 - systemctl disable odroid-hifishield2 + systemctl disable --now odroid-hifishield2 rm /etc/systemd/system/odroid-hifishield2.service - systemctl daemon-reload fi @@ -1738,14 +1695,14 @@ Do you want to continue and DISABLE Bluetooth now?'; then Soundcard_Reset_H2(){ # Set 3.5mm - amixer set -c 0 'Audio lineout' unmute &> /dev/null + [[ $INPUT_DEVICE_VALUE == 'none' ]] || amixer set -c 0 'Audio lineout' unmute &> /dev/null } Soundcard_Reset_H3(){ # Set HDMI - amixer set -c 0 'Audio lineout' mute &> /dev/null + [[ $INPUT_DEVICE_VALUE == 'none' ]] || amixer set -c 0 'Audio lineout' mute &> /dev/null SOUNDCARD_TARGET_CARD=1 } @@ -1759,43 +1716,48 @@ Do you want to continue and DISABLE Bluetooth now?'; then Soundcard_Reset_SparkySBC(){ + # Allo Piano DAC sed -i '/^[[:blank:]]*snd-soc-allo-piano-dac/d' /etc/modules - # Set HDMI - SOUNDCARD_TARGET_DEVICE=1 - amixer -c 0 sset 'audio output mode switch' 'hdmi' - # Disable USB 1.1 compat sed -i 's/aotg.aotg1_speed=1/aotg.aotg1_speed=0/' $FP_UENV - # Auto unmute - [[ -f '/var/lib/dietpi/postboot.d/sparky_unmute.sh' ]] && rm /var/lib/dietpi/postboot.d/sparky_unmute.sh + # Set HDMI + SOUNDCARD_TARGET_DEVICE=1 + [[ $INPUT_DEVICE_VALUE != 'none' ]] && amixer -c 0 sset 'audio output mode switch' 'hdmi' } Soundcard_Reset_BPi_Pro(){ # Set 3.5mm: https://github.com/MichaIng/DietPi/issues/732#issuecomment-275915919 - SOUNDCARD_TARGET_CARD=0 + if [[ $INPUT_DEVICE_VALUE != 'none' ]]; then + + amixer sset 'Left Mixer Left DAC' off + amixer sset 'Power Amplifier' 62 + amixer sset 'Power Amplifier DAC' on + amixer sset 'Power Amplifier Mixer' off + amixer sset 'Power Amplifier Mute' on + amixer sset 'Right Mixer Left DAC' off + amixer sset 'Right Mixer Right DAC' off - amixer sset 'Left Mixer Left DAC' off - amixer sset 'Power Amplifier' 62 - amixer sset 'Power Amplifier DAC' on - amixer sset 'Power Amplifier Mixer' off - amixer sset 'Power Amplifier Mute' on - amixer sset 'Right Mixer Left DAC' off - amixer sset 'Right Mixer Right DAC' off + fi } Soundcard_Main(){ #----------------------------------------------------------------------------- - # Always reset soundcards and revert back to HDMI + # Failsafe: Assure installed alsa-utils, if soundcard has been selected + [[ $INPUT_DEVICE_VALUE == 'none' ]] || G_AG_CHECK_INSTALL_PREREQ alsa-utils + # Always reset soundcards and revert back to defaults Soundcard_Reset_All + # Save selection to dietpi.txt + G_CONFIG_INJECT 'CONFIG_SOUNDCARD=' "CONFIG_SOUNDCARD=$INPUT_DEVICE_VALUE" /DietPi/dietpi.txt + # Return now if no soundcard has been selected + [[ $INPUT_DEVICE_VALUE == 'none' ]] && return #----------------------------------------------------------------------------- - # Apply specific asound.confs and additional settings - + # Apply specific asound.conf and additional settings # - ALSA EQ enabled? if [[ $INPUT_DEVICE_VALUE == *'-eq' ]]; then @@ -1806,54 +1768,45 @@ Do you want to continue and DISABLE Bluetooth now?'; then fi - # - Update DietPi global soundcard var - G_CONFIG_INJECT 'CONFIG_SOUNDCARD=' "CONFIG_SOUNDCARD=$INPUT_DEVICE_VALUE" /DietPi/dietpi.txt + # - RPi: Quick workaround for vc4 taking card 0: https://github.com/MichaIng/DietPi/issues/2173 + (( $G_HW_MODEL < 10 )) && grep -q '^[[:blank:]]*dtoverlay=vc4-' $FP_RPI_CONFIG && ((SOUNDCARD_TARGET_CARD++)) - # Cards + # - Cards case "$INPUT_DEVICE_VALUE" in - # ALL: ---------------------------------------------------------------------- - - # Specify card + device indexs + # --------------- Generic --------------- + # - Specific card + device, e.g. from auto-detection hw:*) - echo "$INPUT_DEVICE_VALUE" - local split=$(sed 's/,/ /g' <<< "$INPUT_DEVICE_VALUE" | sed -E 's/(hw:|-eq)//g') - SOUNDCARD_TARGET_CARD=$(mawk '{print $1}' <<< "$split") - SOUNDCARD_TARGET_DEVICE=$(mawk '{print $2}' <<< "$split") + SOUNDCARD_TARGET_CARD=$(mawk -F, '{print $1}' <<< ${INPUT_DEVICE_VALUE#hw:}) + SOUNDCARD_TARGET_DEVICE=$(mawk -F, '{print $2}' <<< ${INPUT_DEVICE_VALUE#hw:}) ;; + # - Auto detect USB DAC usb-dac*) - # - detect card local usb_detection_card_index=$(aplay -l | mawk '/USB Audio/ {print $2;exit}' | sed 's/://g') if disable_error=1 G_CHECK_VALIDINT "$usb_detection_card_index"; then SOUNDCARD_TARGET_CARD=$usb_detection_card_index + SOUNDCARD_TARGET_DEVICE=0 - # - Sparky unmute all (re: @sudeep) + # Sparky SBC if (( $G_HW_MODEL == 70 )); then - # USB 1.1 compat mode (Sparky currently) - if [[ $INPUT_DEVICE_VALUE == 'usb-dac-1.1' ]]; then + # - USB 1.1 compat mode (Sparky currently) + [[ $INPUT_DEVICE_VALUE == *'1.1' ]] && sed -i 's/aotg.aotg1_speed=0/aotg.aotg1_speed=1/' $FP_UENV - sed -i 's/aotg.aotg1_speed=0/aotg.aotg1_speed=1/' $FP_UENV + # - Unmute all (re: @sudeep) + for x in $(amixer -c $SOUNDCARD_TARGET_CARD controls | grep layback) + do - fi - - cat << _EOF_ > /var/lib/dietpi/postboot.d/sparky_unmute.sh -#!/bin/bash -for x in \$(amixer controls | grep layback) -do + amixer -c $SOUNDCARD_TARGET_CARD cset "$x" 100% - amixer cset "\$x" 100% &> /dev/null + done -done -alsactl store &> /dev/null -_EOF_ - - # https://github.com/MichaIng/DietPi/issues/2101 + # Odroid C2: https://github.com/MichaIng/DietPi/issues/2101 elif (( $G_HW_MODEL == 12 )); then cat << _EOF_ > /var/lib/dietpi/postboot.d/c2_smp.sh @@ -1861,93 +1814,94 @@ _EOF_ echo 4 > /proc/irq/63/smp_affinity echo 8 > /proc/irq/62/smp_affinity _EOF_ + . /var/lib/dietpi/postboot.d/c2_smp.sh fi # - Not found else - G_DIETPI-NOTIFY 1 'Unable to find a USB-DAC on system.' + G_DIETPI-NOTIFY 1 'Unable to find a USB DAC on your system, reverting to "none"...' EXIT_CODE=1 - - # - Reset G_CONFIG_INJECT 'CONFIG_SOUNDCARD=' 'CONFIG_SOUNDCARD=none' /DietPi/dietpi.txt + return fi - SOUNDCARD_TARGET_DEVICE=0 + ;; + + # Intel SST DSP + intel-sst-dsp) + + G_AG_CHECK_INSTALL_PREREQ 'firmware-intel-sound' ;; - # RPi - # rpi-bcm2835 - # rpi-bcm2835-ultrahq + # --------------- RPi ------------------- + # Onboard + # rpi-bcm2835-auto + # rpi-bcm2835-hdmi # rpi-bcm2835-3.5mm - # rpi-bcm2835-ultrahq-3.5mm rpi-bcm2835*) # - Enable onboard audio dtparm G_CONFIG_INJECT 'dtparam=audio=' 'dtparam=audio=on' $FP_RPI_CONFIG + dtparam audio=on # - Force 3.5mm out? if [[ $INPUT_DEVICE_VALUE == *'3.5mm' ]]; then - cat << _EOF_ > /etc/systemd/system/rpi-bcm2835_forced_3.5mm.service -[Unit] -Description=Forces sound through 3.5mm analogue -Before=sound.target -After=dietpi-boot.service + amixer -c $SOUNDCARD_TARGET_CARD cset numid=3 1 -[Service] -RemainAfterExit=yes -ExecStart=/usr/bin/amixer -c 0 cset numid=3 1 + elif [[ $INPUT_DEVICE_VALUE == *'hdmi' ]]; then -[Install] -WantedBy=multi-user.target -_EOF_ - systemctl daemon-reload - systemctl enable rpi-bcm2835_forced_3.5mm - systemctl start rpi-bcm2835_forced_3.5mm + amixer -c $SOUNDCARD_TARGET_CARD cset numid=3 2 + + else + + amixer -c $SOUNDCARD_TARGET_CARD cset numid=3 0 fi ;; - # RPi (dtoverlay) + # dtoverlay # hifiberry-dac # hifiberry-dacplus # hifiberry-digi # hifiberry-digi-pro # hifiberry-amp - hifiberry-*) + # JustBoom-dac: DAC HAT, Amp HAT, DAC Zero and Amp Zero + # JustBoom-digi: Digi HAT and Digi Zero + # allo-boss-dac-pcm512x-audio + # allo-digione + # allo-katana-dac-audio + # rpi-dac + # i-sabre-q2m + # applepi-dac + # iqaudio-* + # dionaudio-loco(-v2) + hifiberry-*|justboom-*|allo-*|rpi-dac|i-sabre-q2m|applepi*|iqaudio-*|dionaudio-loco*) - # - enable dtoverlay + # Enable dtoverlay G_CONFIG_INJECT "dtoverlay=$INPUT_DEVICE_VALUE" "dtoverlay=$INPUT_DEVICE_VALUE" $FP_RPI_CONFIG + dtoverlay $INPUT_DEVICE_VALUE ;; - # RPi (dtoverlay) + # dtoverlay + I2S # googlevoicehat-soundcard googlevoicehat-soundcard*) - # - enable dtoverlay + # Enable dtoverlay + I2S + G_CONFIG_INJECT 'dtparam=i2s=' 'dtparam=i2s=on' $FP_RPI_CONFIG + dtparam i2s=on G_CONFIG_INJECT "dtoverlay=$INPUT_DEVICE_VALUE" "dtoverlay=$INPUT_DEVICE_VALUE" $FP_RPI_CONFIG - G_CONFIG_INJECT 'dtoverlay=i2s-mmap' 'dtoverlay=i2s-mmap' $FP_RPI_CONFIG - G_CONFIG_INJECT 'dtparam=i2s=' 'dtoverlay=i2s=on' $FP_RPI_CONFIG + dtoverlay $INPUT_DEVICE_VALUE ;; - # RPi (dtoverlay) - # JustBoom-dac: DAC HAT, Amp HAT, DAC Zero and Amp Zero - # JustBoom-digi: Digi HAT and Digi Zero - justboom-*) - - # - enable dtoverlay - G_CONFIG_INJECT "dtoverlay=$INPUT_DEVICE_VALUE" "dtoverlay=$INPUT_DEVICE_VALUE" $FP_RPI_CONFIG - - ;; - - # RPi (dtoverlay) + # Allo Piano DAC (firmware + dtoverlay) # allo-piano-dac-pcm512x-audio # allo-piano-dac-plus-pcm512x-audio (2.1) allo-piano-dac*) @@ -1969,7 +1923,8 @@ _EOF_ ;; - # Sparky SBC (module) + # --------------- Sparky SBC ------------ + # Allo Piano DAC (firmware + module) # snd-soc-allo-piano-dac # snd-soc-allo-piano-dac-plus (2.1) snd-soc-allo-piano-dac*) @@ -1985,13 +1940,14 @@ _EOF_ fi G_CONFIG_INJECT "$INPUT_DEVICE_VALUE" "$INPUT_DEVICE_VALUE" /etc/modules + modprobe $INPUT_DEVICE_VALUE SOUNDCARD_TARGET_CARD=1 SOUNDCARD_TARGET_DEVICE=0 amixer -c 0 sset 'audio output mode switch' 'i2s' ;; - # Sparky SBC + # Allo Cheapo # allo-cheapo-analogue # 3.5mm/RCA # allo-cheapo-optical # Optical out allo-cheapo*) @@ -2015,64 +1971,12 @@ _EOF_ ;; - # RPi (dtoverlay) - # allo-boss-dac-pcm512x-audio - # allo-digione - # allo-katana-dac-audio - allo-*) - - # - enable dtoverlay - G_CONFIG_INJECT "dtoverlay=$INPUT_DEVICE_VALUE" "dtoverlay=$INPUT_DEVICE_VALUE" $FP_RPI_CONFIG - - ;; - - # RPi (dtoverlay) - # rpi-dac - rpi-dac) - - # - enable dtoverlay - G_CONFIG_INJECT "dtoverlay=$INPUT_DEVICE_VALUE" "dtoverlay=$INPUT_DEVICE_VALUE" $FP_RPI_CONFIG - - ;; - - # AudioPhonics I-Sabre-Q2M/K2M (dtoverlay) - # i-sabre-q2m - i-sabre-q2m) - - # - enable dtoverlay - G_CONFIG_INJECT "dtoverlay=$INPUT_DEVICE_VALUE" "dtoverlay=$INPUT_DEVICE_VALUE" $FP_RPI_CONFIG - - ;; - - # RPi (dtoverlay) - # applepi-dac - applepi*) - - # - enable dtoverlay - G_CONFIG_INJECT "dtoverlay=$INPUT_DEVICE_VALUE" "dtoverlay=$INPUT_DEVICE_VALUE" $FP_RPI_CONFIG - - ;; - - iqaudio-*) - - # - enable dtoverlay - G_CONFIG_INJECT "dtoverlay=$INPUT_DEVICE_VALUE" "dtoverlay=$INPUT_DEVICE_VALUE" $FP_RPI_CONFIG - - ;; - - # dionaudio-loco(-v2) - dionaudio-loco*) - - # - enable dtoverlay - G_CONFIG_INJECT "dtoverlay=$INPUT_DEVICE_VALUE" "dtoverlay=$INPUT_DEVICE_VALUE" $FP_RPI_CONFIG - - ;; - - # Odroid ------------------------------------------------------------------------------- + # --------------- Odroid ---------------- odroid-hifishield-plus) G_CONFIG_INJECT 'snd-soc-pcm5102' 'snd-soc-pcm5102' /etc/modules G_CONFIG_INJECT 'snd-soc-odroid-dac' 'snd-soc-odroid-dac' /etc/modules + modprobe snd-soc-pcm5102 snd-soc-odroid-dac SOUNDCARD_TARGET_CARD=1 @@ -2084,6 +1988,7 @@ _EOF_ G_CONFIG_INJECT 'snd-soc-pcm512x' 'snd-soc-pcm512x' /etc/modules G_CONFIG_INJECT 'snd-soc-pcm512x-i2c' 'snd-soc-pcm512x-i2c' /etc/modules G_CONFIG_INJECT 'snd-soc-odroid-dac2' 'snd-soc-odroid-dac2' /etc/modules + modprobe aml_i2c snd-soc-pcm512x snd-soc-pcm512x-i2c snd-soc-odroid-dac2 SOUNDCARD_TARGET_CARD=1 @@ -2104,46 +2009,34 @@ ExecStart=$(command -v amixer) -c 1 sset Deemphasis on WantedBy=sound.target _EOF_ systemctl daemon-reload - systemctl enable odroid-hifishield2 + systemctl enable --now odroid-hifishield2 ;; - # H2 ------------------------------------------------------------------------------- + # --------------- H2 -------------------- h2-hdmi) - amixer set -c 0 'Audio lineout' mute &> /dev/null + amixer set -c 0 'Audio lineout' mute SOUNDCARD_TARGET_CARD=1 ;; - # H3 ------------------------------------------------------------------------------- + # --------------- H3 -------------------- h3-analogue) - amixer set -c 0 'Audio lineout' unmute &> /dev/null - SOUNDCARD_TARGET_CARD=0 - - ;; - - # Pine A64 ------------------------------------------------------------------------------- - pine64-analogue) - - cat << _EOF_ > /etc/modules-load.d/pine64-audiojack.conf -sunxi_codec -sunxi_i2s -sunxi_sndcodec -_EOF_ + amixer set -c 0 'Audio lineout' unmute SOUNDCARD_TARGET_CARD=0 ;; - # NanoPi M2/M3 ------------------------------------------------------------------------------- + # --------------- NanoPi M2/M3 ---------- s5pxx18-hdmi) SOUNDCARD_TARGET_CARD=1 ;; - # Asus tinker ------------------------------------------------------------------------------- + # --------------- ASUS TB --------------- asus-tb-analogue) SOUNDCARD_TARGET_CARD=0 @@ -2153,9 +2046,6 @@ _EOF_ esac - # - Quick RPi workaround for vc4 taking card 0: https://github.com/MichaIng/DietPi/issues/2173 - (( $G_HW_MODEL < 10 )) && grep -q '^[[:blank:]]*dtoverlay=vc4-' $FP_RPI_CONFIG && ((SOUNDCARD_TARGET_CARD++)) - # - Apply asound.conf if [[ $INPUT_DEVICE_VALUE == 'googlevoicehat-soundcard'* ]]; then @@ -2192,6 +2082,8 @@ _EOF_ elif (( $ALSA_EQ_ENABLED )); then + G_AG_CHECK_INSTALL_PREREQ libasound2-plugin-equal + cat << _EOF_ > /etc/asound.conf ctl.eq { type equal @@ -2216,8 +2108,6 @@ ctl.!default { } _EOF_ - G_AG_CHECK_INSTALL_PREREQ libasound2-plugin-equal - else cat << _EOF_ > /etc/asound.conf @@ -2235,13 +2125,16 @@ _EOF_ fi + # Store control states once and force restore service, to assure it is active (states preserved) for next reboot + alsactl store + systemctl restart alsa-restore + } #///////////////////////////////////////////////////////////////////////////////////// # Main Loop #///////////////////////////////////////////////////////////////////////////////////// #----------------------------------------------------------------------------------- - # info G_DIETPI-NOTIFY 3 "$G_PROGRAM_NAME" "$INPUT_DEVICE_NAME ($INPUT_DEVICE_VALUE)" #----------------------------------------------------------------------------------- diff --git a/dietpi/misc/dietpi-justboom b/dietpi/misc/dietpi-justboom index ecd40a0761..4827f4c2ed 100644 --- a/dietpi/misc/dietpi-justboom +++ b/dietpi/misc/dietpi-justboom @@ -14,36 +14,31 @@ # - /DietPi/dietpi/misc/dietpi-justboom #//////////////////////////////////// - #Import DietPi-Globals --------------------------------------------------------------- + # Import DietPi-Globals -------------------------------------------------------------- . /DietPi/dietpi/func/dietpi-globals - G_PROGRAM_NAME='DietPi-Justboom' + G_PROGRAM_NAME='DietPi-JustBoom' G_CHECK_ROOT_USER G_CHECK_ROOTFS_RW G_INIT - #Import DietPi-Globals --------------------------------------------------------------- + # Import DietPi-Globals -------------------------------------------------------------- - #Prereq ALSA installed from dietpi-software - if ! dpkg-query -s alsa-utils &> /dev/null; then + # Prereq ALSA installed from dietpi-software + if [[ ! -f '/etc/asound.conf' ]] || ! dpkg-query -s alsa-utils &> /dev/null; then - G_WHIP_MSG "$G_PROGRAM_NAME requires ALSA to be installed, before it can be run.\n\nPlease install ALSA, or ideally, an audio application through 'dietpi-software' before use." - exit 1 - - elif [ ! -f /etc/asound.conf ]; then - - G_WHIP_MSG "$G_PROGRAM_NAME requires an active soundcard to be installed, before it can be run.\n\nPlease use 'dietpi-config' to setup a soundcard for this system." + G_WHIP_MSG "$G_PROGRAM_NAME requires ALSA to be installed and a soundcard to be configured.\n +Please select a soundcard via 'dietpi-config' or install ALSA, or ideally an audio application, through 'dietpi-software' before use." exit 1 fi #///////////////////////////////////////////////////////////////////////////////////// - #Script Globals + # Script Globals #///////////////////////////////////////////////////////////////////////////////////// EQ_ENABLED=0 SOUNDCARD_CURRENT=0 - SOUNDCARD_CARD_INDEX=0 - [[ -f /etc/asound.conf ]] && SOUNDCARD_CARD_INDEX=$(mawk '/card / {print $2;exit}' /etc/asound.conf) + SOUNDCARD_CARD_INDEX=$(mawk '/card / {print $2;exit}' /etc/asound.conf) - # - MPD + # MPD OUTPUT_FREQ_CURRENT=0 OUTPUT_FREQ_TARGET=0 OUTPUT_BITRATE_CURRENT=0 @@ -56,7 +51,7 @@ MPD_INSTALLED=0 [[ -f $FP_MPD_CONF ]] && MPD_INSTALLED=1 - # - CAVA + # CAVA CAVA_ENABLED=1 CAVA_FRAMERATE=0 CAVA_COLOUR_FG=0 @@ -65,17 +60,17 @@ CAVA_BAR_WIDTH=0 CAVA_MAINSCREENINUSE_DISPLAYED=0 - FP_CAVA_CONF="$HOME/.config/cava/config" + FP_CAVA_CONF='/root/.config/cava/config' CAVA_INSTALLED=0 [[ -f $FP_CAVA_CONF ]] && CAVA_INSTALLED=1 Reset_Globals(){ - #ALSA EQ levels - [[ -f $HOME/.alsaequal.bin ]] && rm $HOME/.alsaequal.bin + # ALSA EQ levels + [[ -f '/root/.alsaequal.bin' ]] && rm /root/.alsaequal.bin - #MPD + # MPD OUTPUT_FREQ_TARGET=44100 OUTPUT_BITRATE_TARGET=16 SOXR_ENABLED=0 @@ -83,7 +78,7 @@ EQ_ENABLED=0 MPD_AUDIO_BUFFER_SIZE=2048 - # - Reset CAVA config + # Reset CAVA config cp /var/lib/dietpi/dietpi-software/conf/cava.conf $HOME/.config/cava/config CAVA_ENABLED=1 @@ -93,7 +88,7 @@ CAVA_BAR_GRAVITY='1.75' CAVA_BAR_WIDTH=2 - # - Save changes + # Save changes Write_Apply_Globals } @@ -102,22 +97,22 @@ SOUNDCARD_CURRENT=$(grep -m1 'CONFIG_SOUNDCARD=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') - EQ_ENABLED=$(grep -ci -m1 '^pcm.plugequal' /etc/asound.conf) + EQ_ENABLED=$(grep -cim1 '^pcm.plugequal' /etc/asound.conf) - #MPD specific + # MPD specific if (( $MPD_INSTALLED )); then OUTPUT_FREQ_CURRENT=$(grep -m1 '^format' $FP_MPD_CONF | sed 's/\"//g' | sed 's/:/ /g' | mawk '{print $2}') OUTPUT_FREQ_TARGET=$OUTPUT_FREQ_CURRENT OUTPUT_BITRATE_CURRENT=$(grep -m1 '^format' $FP_MPD_CONF | sed 's/\"//g' | sed 's/:/ /g' | mawk '{print $3}') OUTPUT_BITRATE_TARGET=$OUTPUT_BITRATE_CURRENT - SOXR_ENABLED=$(grep -ci -m1 '^samplerate_converter \"soxr' $FP_MPD_CONF) + SOXR_ENABLED=$(grep -cim1 '^samplerate_converter \"soxr' $FP_MPD_CONF) SOXR_QUALITY=$(grep -m1 'samplerate_converter \"soxr' $FP_MPD_CONF | sed 's/\"//g' | mawk '{for(i=3;i<=NF;i++){printf "%s ", $i}; printf "\n"}' | sed 's/ *$//') MPD_AUDIO_BUFFER_SIZE=$(grep -m1 '^audio_buffer_size' $FP_MPD_CONF | mawk '{print $2}' | sed 's/\"//g') fi - #CAVA specific + # CAVA specific if (( $CAVA_INSTALLED )); then CAVA_FRAMERATE=$(mawk '/framerate =/ {print $NF;exit}' $FP_CAVA_CONF) @@ -142,7 +137,7 @@ fi - #MPD specific + # MPD specific if (( $MPD_INSTALLED )); then # - Output freq/bit @@ -167,7 +162,7 @@ fi - #CAVA specific + # CAVA specific if (( $CAVA_INSTALLED )); then G_CONFIG_INJECT 'framerate =' "framerate = $CAVA_FRAMERATE" $FP_CAVA_CONF @@ -188,12 +183,12 @@ killall -w cava &> /dev/null - # - Running on current screen + # Running on current screen if (( $CAVA_ENABLED )); then if [[ $(tty) == '/dev/tty1' ]]; then - # - display this warning once only + # - Display this warning once only if (( ! $CAVA_MAINSCREENINUSE_DISPLAYED )); then G_WHIP_MSG "Error:\n\nMain screen in use. To launch CAVA on the main screen, please exit $G_PROGRAM_NAME and run the following command:\n - cava\n\nNB: Press CTRL+C to exit cava." @@ -204,7 +199,7 @@ else - setterm -blank 0 -powersave off <> /dev/fb2 >&0 2>&1 #Odroid 3.5 inch + setterm -blank 0 -powersave off <> /dev/fb2 >&0 2>&1 # Odroid 3.5 inch cava <> /dev/console >&0 2>&1 & fi @@ -222,17 +217,7 @@ Menu_Exit(){ G_WHIP_SIZE_X_MAX=50 - if G_WHIP_YESNO "Exit $G_PROGRAM_NAME?"; then - - #exit - TARGETMENUID=-1 - - else - - #Return to Main Menu - TARGETMENUID=0 - - fi + G_WHIP_YESNO "Exit $G_PROGRAM_NAME?" && TARGETMENUID=-1 # Exit } @@ -241,20 +226,17 @@ Read_Globals - local eq_enabled_text='[Off]' - (( $EQ_ENABLED )) && eq_enabled_text='[On]' - - local soxr_enabled_text='[Off]' - (( $SOXR_ENABLED )) && soxr_enabled_text='[On]' + local eq_enabled_text='Off' + (( $EQ_ENABLED )) && eq_enabled_text='On' G_WHIP_MENU_ARRAY=('' '●─ Global Options ') G_WHIP_MENU_ARRAY+=('ALSA Mixer' ': Launches ALSA Mixer, tweak sound card settings') G_WHIP_MENU_ARRAY+=('ALSA Output Info' ': View info on current ALSA playback stream') - G_WHIP_MENU_ARRAY+=("EQ Enable" ": $eq_enabled_text | Select to toggle EQ") + G_WHIP_MENU_ARRAY+=("EQ Enable" ": [$eq_enabled_text] | Select to toggle EQ") (( $EQ_ENABLED )) && G_WHIP_MENU_ARRAY+=('EQ Configure' ': Launches AlsaMixer to configure EQ settings') G_WHIP_MENU_ARRAY+=('Reset' ': Reset all options to defaults') - #Allo Piano 2.1 specials + # Allo Piano 2.1 specials if grep -qi 'piano-dac-plus' <<< "$SOUNDCARD_CURRENT"; then G_WHIP_MENU_ARRAY+=('' '●─ Allo Piano 2.1 ') @@ -276,16 +258,12 @@ G_WHIP_MENU_ARRAY+=('Subwoofer Mode' ": $subwoofer_mode") G_WHIP_MENU_ARRAY+=('Subwoofer Volume' ": $subwoofer_volume_int ($subwoofer_volume_db)") - # - only active with subwoofer 2.1+ modes - if [[ $subwoofer_mode != '2.0' ]]; then - - G_WHIP_MENU_ARRAY+=('Subwoofer Crossover' ": $subwoofer_crossover_frequency Hz") - - fi + # - Only active with subwoofer 2.1+ modes + [[ $subwoofer_mode != '2.0' ]] && G_WHIP_MENU_ARRAY+=('Subwoofer Crossover' ": $subwoofer_crossover_frequency Hz") fi - #MPD specific + # MPD specific if (( $MPD_INSTALLED )); then G_WHIP_MENU_ARRAY+=('' '●─ MPD Specific ') @@ -293,12 +271,14 @@ G_WHIP_MENU_ARRAY+=('Output BitRate' ": $OUTPUT_BITRATE_CURRENT Bit | Select to change") G_WHIP_MENU_ARRAY+=('Audio Buffer' ": $MPD_AUDIO_BUFFER_SIZE Bytes | Select to change") - G_WHIP_MENU_ARRAY+=('SOXR Enable' ": $soxr_enabled_text | Select to toggle SOXR resampling") + local soxr_enabled_text='Off' + (( $SOXR_ENABLED )) && soxr_enabled_text='On' + G_WHIP_MENU_ARRAY+=('SOXR Enable' ": [$soxr_enabled_text] | Select to toggle SOXR resampling") (( $SOXR_ENABLED )) && G_WHIP_MENU_ARRAY+=('SOXR Quality' ": $SOXR_QUALITY | Select SOXR quality level") fi - #CAVA specific + # CAVA specific if (( $CAVA_INSTALLED )); then G_WHIP_MENU_ARRAY+=('' '●─ CAVA Specific ') @@ -314,18 +294,17 @@ fi - G_WHIP_DEFAULT_ITEM="$LAST_SELECTED_NAME" + G_WHIP_DEFAULT_ITEM=$LAST_SELECTED_NAME G_WHIP_BUTTON_CANCEL_TEXT='Exit' if G_WHIP_MENU 'Tweak your High-End Audiophile JustBoom (and others) sound card:'; then - LAST_SELECTED_NAME="$G_WHIP_RETURNED_VALUE" + LAST_SELECTED_NAME=$G_WHIP_RETURNED_VALUE if [[ $G_WHIP_RETURNED_VALUE == 'ALSA Output Info' ]]; then G_DIETPI-NOTIFY 3 DietPi-JustBoom "ALSA Output Info" - local stream_result=$(cat /proc/asound/card*/pcm0p/sub0/hw_params) - echo -e "$stream_result" - echo -e "" + local stream_result=$( 1 )) && EQ_ENABLED=0 - + (( $EQ_ENABLED )) && EQ_ENABLED=0 || EQ_ENABLED=1 Write_Apply_Globals elif [[ $G_WHIP_RETURNED_VALUE == 'SOXR Enable' ]]; then - ((SOXR_ENABLED++)) - (( $SOXR_ENABLED > 1 )) && SOXR_ENABLED=0 - + (( $SOXR_ENABLED )) && SOXR_ENABLED=0 || SOXR_ENABLED=1 Write_Apply_Globals elif [[ $G_WHIP_RETURNED_VALUE == 'SOXR Quality' ]]; then @@ -636,7 +601,7 @@ ) - G_WHIP_DEFAULT_ITEM="$SOXR_QUALITY" + G_WHIP_DEFAULT_ITEM=$SOXR_QUALITY if G_WHIP_MENU 'Please select a SOXR quality level:'; then SOXR_QUALITY=$G_WHIP_RETURNED_VALUE @@ -659,7 +624,7 @@ ) - G_WHIP_DEFAULT_ITEM="$MPD_AUDIO_BUFFER_SIZE" + G_WHIP_DEFAULT_ITEM=$MPD_AUDIO_BUFFER_SIZE if G_WHIP_MENU 'Please select a audio buffer size (bytes):'; then MPD_AUDIO_BUFFER_SIZE=$G_WHIP_RETURNED_VALUE @@ -682,7 +647,7 @@ ) - G_WHIP_DEFAULT_ITEM="$OUTPUT_FREQ_CURRENT" + G_WHIP_DEFAULT_ITEM=$OUTPUT_FREQ_CURRENT if G_WHIP_MENU 'Please select a output frequency:'; then OUTPUT_FREQ_TARGET=$G_WHIP_RETURNED_VALUE @@ -700,7 +665,7 @@ ) - G_WHIP_DEFAULT_ITEM="$OUTPUT_BITRATE_CURRENT" + G_WHIP_DEFAULT_ITEM=$OUTPUT_BITRATE_CURRENT if G_WHIP_MENU 'Please select a output bitrate:'; then OUTPUT_BITRATE_TARGET=$G_WHIP_RETURNED_VALUE @@ -732,7 +697,7 @@ while (( $TARGETMENUID >= 0 )) do - (( $TARGETMENUID == 0 )) && Menu_Main + Menu_Main done #----------------------------------------------------------------------------------- diff --git a/dietpi/patch_file b/dietpi/patch_file index d55d08aee2..8cb6532d25 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2086,15 +2086,24 @@ A backup will be created to "/etc/mympd/mympd.conf.bak_DDMMYYY_N" from where you [[ -f '/etc/cron.d/openmediavault-rrdtoolgraph' ]] && rm /etc/cron.d/openmediavault-rrdtoolgraph [[ -f '/usr/sbin/omv-mkgraph' ]] && rm /usr/sbin/omv-mkgraph #------------------------------------------------------------------------------- - # RPi: Remove invalid I2C baudrate entries from dietpi.txt. Do no apply any value to preserve current system state (default): https://github.com/MichaIng/DietPi/issues/2966 - (( $G_HW_MODEL < 10 )) && sed -i '/^[[:blank:]]*i2c_arm_baudrate=/d' /DietPi/dietpi.txt - #------------------------------------------------------------------------------- # Disable pihole.log query logging: https://github.com/pi-hole/FTL/issues/614#issuecomment-510564476 command -v pihole &> /dev/null && pihole -l off #------------------------------------------------------------------------------- # Disable DPKG status file translations by default, which have hardly any use, but raise APT update times + disk I/O echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/98-dietpi-no_translations #------------------------------------------------------------------------------- + # Remove obsolete audio related services/scripts/settings: https://github.com/MichaIng/DietPi/pull/2988 + # RPi: Remove invalid I2C baudrate entries from config.txt. Do no apply any value to preserve current system state (default): https://github.com/MichaIng/DietPi/issues/2966 + [[ -f '/var/lib/dietpi/postboot.d/sparky_unmute.sh' ]] && rm /var/lib/dietpi/postboot.d/sparky_unmute.sh + [[ -f '/etc/systemd/system/rpi-bcm2835_forced_3.5mm.service' ]] && rm /etc/systemd/system/rpi-bcm2835_forced_3.5mm.service + if (( $G_HW_MODEL < 10 )); then + + sed -i '/dtoverlay=i2s-mmap/d' /DietPi/config.txt + sed -i '/dtoverlay=i2s=/d' /DietPi/config.txt + sed -i '/^[[:blank:]]*i2c_arm_baudrate=/d' /DietPi/config.txt + + fi + #------------------------------------------------------------------------------- fi From b697c9c13723b75178208509c09a54337add454b Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 21 Jul 2019 23:32:53 +0200 Subject: [PATCH 036/184] v6.26 + DietPi-Set_hardware | RPi Camera: Since kernel 4.19 all camera related kernel modules are loaded by default, regardless of start_x=1 (extended start file) being set or not. Thus we now need to add a blacklist for them when disabling the camera instead of adding them to /etc/modules when enabling the camera. --- dietpi/func/dietpi-set_hardware | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 7d2962f68d..5a97e91a99 100644 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -118,29 +118,27 @@ $FP_SCRIPT rpi3_usb_boot enable if [[ $INPUT_DEVICE_VALUE == 'enable' ]]; then - # - Enable RPi Camera module - G_CONFIG_INJECT 'start_x=' 'start_x=1' $FP_RPI_CONFIG + # - Remove modules blacklist + [[ -f '/etc/modprobe.d/dietpi-disable_rpi_camera.conf' ]] && rm /etc/modprobe.d/dietpi-disable_rpi_camera.conf - # - v4l2 module (motioneye /dev/video0) - G_CONFIG_INJECT 'bcm2835-v4l2' 'bcm2835-v4l2' /etc/modules + # - Enable video devices via extended start file + G_CONFIG_INJECT 'start_x=' 'start_x=1' $FP_RPI_CONFIG - local gpu_mem=$(sed -n '/^[[:blank:]]*gpu_mem_1024/{s/^[^=]*=//p;q}' $FP_RPI_CONFIG) - # - requires 128MB memory split min. + local gpu_mem=$(sed -n '/^[[:blank:]]*gpu_mem_1024=/{s/^[^=]*=//p;q}' $FP_RPI_CONFIG) + # - Requires 128 MiB memory split min. if (( ${gpu_mem:-0} < 128 )); then - local tmp=$INPUT_DEVICE_VALUE - INPUT_DEVICE_VALUE=128 - - Gpu_Memory_Split_Main - - INPUT_DEVICE_VALUE=$tmp + INPUT_DEVICE_VALUE=128 Gpu_Memory_Split_Main fi elif [[ $INPUT_DEVICE_VALUE == 'disable' ]]; then + # - Revert to default start file G_CONFIG_INJECT 'start_x=' 'start_x=0' $FP_RPI_CONFIG - sed -i '/^[[:blank:]]*bcm2835-v4l2/d' /etc/modules + + # - Add modules blacklist, which are otherwise loaded by default since kernel 4.19 + echo -e 'blacklist bcm2835_codec\nblacklist bcm2835_v4l2' > /etc/modprobe.d/dietpi-disable_rpi_camera.conf else From 5cec2e201e12bd39960d48607012fd746d20bb5b Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 21 Jul 2019 23:36:29 +0200 Subject: [PATCH 037/184] v6.26 + DietPi-PREP | Disable RPi camera to add modules blacklist --- PREP_SYSTEM_FOR_DIETPI.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index fefcab5105..c255004a8a 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -1474,7 +1474,7 @@ _EOF_ # Use performance gov for stability. G_CONFIG_INJECT 'CONFIG_CPU_GOVERNOR=' 'CONFIG_CPU_GOVERNOR=performance' /DietPi/dietpi.txt - # - RPI: + # - RPi: elif (( $G_HW_MODEL < 10 )); then # - Scroll lock fix for RPi by Midwan: https://github.com/MichaIng/DietPi/issues/474#issuecomment-243215674 @@ -1482,6 +1482,9 @@ _EOF_ ACTION=="add", SUBSYSTEM=="leds", ENV{DEVPATH}=="*/input*::scrolllock", ATTR{trigger}="kbd-scrollock" _EOF_ + # - Disable RPi camera to add modules blacklist + /DietPi/dietpi/func/dietpi-set_hardware rpi-camera disable + # - PINE64 (and possibily others): Cursor fix for FB elif (( $G_HW_MODEL == 40 )); then @@ -1499,7 +1502,7 @@ _EOF_ # - Ensure WiFi module pre-exists G_CONFIG_INJECT '8723bs' '8723bs' /etc/modules - # - Rock64, remove HW accell config, as its not currently functional: https://github.com/MichaIng/DietPi/issues/2086 + # - Rock64, remove HW accell config, as it's not currently functional: https://github.com/MichaIng/DietPi/issues/2086 elif (( $G_HW_MODEL == 43 )); then [[ -f '/etc/X11/xorg.conf.d/20-armsoc.conf' ]] && rm /etc/X11/xorg.conf.d/20-armsoc.conf From 2587a52ae8e851c90ffb7eb4ad4d88c7efe6cd9e Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 21 Jul 2019 23:40:52 +0200 Subject: [PATCH 038/184] v6.26 + DietPi-Patch | RPi: Remove obsolete camera module entry, which is loaded by default since kernel 4.19, instead add a blacklist entry if camera is disabled. --- dietpi/patch_file | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dietpi/patch_file b/dietpi/patch_file index 8cb6532d25..ccaed42e63 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2094,6 +2094,7 @@ A backup will be created to "/etc/mympd/mympd.conf.bak_DDMMYYY_N" from where you #------------------------------------------------------------------------------- # Remove obsolete audio related services/scripts/settings: https://github.com/MichaIng/DietPi/pull/2988 # RPi: Remove invalid I2C baudrate entries from config.txt. Do no apply any value to preserve current system state (default): https://github.com/MichaIng/DietPi/issues/2966 + # RPi: Remove obsolete camera module entry, which is loaded by default since kernel 4.19, instead add a blacklist entry if camera is disabled. [[ -f '/var/lib/dietpi/postboot.d/sparky_unmute.sh' ]] && rm /var/lib/dietpi/postboot.d/sparky_unmute.sh [[ -f '/etc/systemd/system/rpi-bcm2835_forced_3.5mm.service' ]] && rm /etc/systemd/system/rpi-bcm2835_forced_3.5mm.service if (( $G_HW_MODEL < 10 )); then @@ -2101,6 +2102,8 @@ A backup will be created to "/etc/mympd/mympd.conf.bak_DDMMYYY_N" from where you sed -i '/dtoverlay=i2s-mmap/d' /DietPi/config.txt sed -i '/dtoverlay=i2s=/d' /DietPi/config.txt sed -i '/^[[:blank:]]*i2c_arm_baudrate=/d' /DietPi/config.txt + sed -i '/^[[:blank:]]*bcm2835-v4l2/d' /etc/modules + grep -q '^[[:blank:]]*start_x=1' /DietPi/config.txt || /DietPi/dietpi/func/dietpi-set_hardware rpi-camera disable fi #------------------------------------------------------------------------------- From 2c0cd0fbc762969ca7dee3f3fea8644b3a1539d1 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 21 Jul 2019 23:58:49 +0200 Subject: [PATCH 039/184] v6.26 + DietPi-PREP | Remove v6.25 post-release fixes, not required and insecure on v6.26+ code --- dietpi/patch_file | 6 ------ 1 file changed, 6 deletions(-) diff --git a/dietpi/patch_file b/dietpi/patch_file index e100ddde56..ccaed42e63 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2053,12 +2053,6 @@ _EOF_ # Remove flag/status files from disk once, which will be done from now on before DietPi-RAMdisk stores to disk rm -f /boot/dietpi/.{update_available,timesync_exit_status} #------------------------------------------------------------------------------- - # Post release hotfixes: MUST BE REMOVED WITH v6.26! - # - Gitea: No ARMv7 binaries available for v1.8.X: https://github.com/MichaIng/DietPi/issues/2959 - sed -i 's/arm-7/arm-6/' /DietPi/dietpi/dietpi-software - # - Node-RED: Missing data dir creation: https://github.com/MichaIng/DietPi/issues/2975 - grep -q 'mkdir -p $G_FP_DIETPI_USERDATA/node-red' /DietPi/dietpi/dietpi-software || sed -i '\|cat << _EOF_ > /etc/systemd/system/node-red.service|i\mkdir -p $G_FP_DIETPI_USERDATA/node-red' /DietPi/dietpi/dietpi-software - #------------------------------------------------------------------------------- # Reinstalls: # O!MPD update to master: https://github.com/MichaIng/DietPi/pull/2884 # myMPD update to master: https://github.com/MichaIng/DietPi/pull/2883 From cc65890a1f7b723187559dce68e16bf3ec3de66f Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Mon, 22 Jul 2019 23:32:57 +0200 Subject: [PATCH 040/184] v6.26 + DietPi-Software | Node-RED: Only add user to "gpio" group, if it exists, otherwise useradd/usermod commands fail and user is not created or modified, e.g. on x86_64 with no GPIO. + DietPi-Software | Failsafe user creation: Add "-U" option to assure a same-named group is always created. This is default on fresh Raspbian/Debian but can be changed. Never use "-m" for users with "nologin" shell, to prevent unnecessary skeleton file creation (.profile/.bashrc). Instead use "-M" and pre-create home dir manually in case used by program. --- dietpi/dietpi-software | 157 ++++++++++++++++++++++------------------- 1 file changed, 83 insertions(+), 74 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index cd5b6fefc6..edc30f4719 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -4651,7 +4651,7 @@ _EOF_ G_AGI lsb-release iptables-persistent dnsutils expect net-tools openvpn # Requires underpriv user: https://github.com/MichaIng/DietPi/issues/570#issuecomment-255588307 - useradd pivpn + getent passwd pivpn &> /dev/null || useradd pivpn mkdir -p /home/pivpn wget "$INSTALL_URL_ADDRESS" -O pivpn_install.sh @@ -5960,7 +5960,7 @@ Pin-Priority: -1' > /etc/apt/preferences.d/dietpi-docker_fix dps_index=$software_id Download_Install 'mycroft.conf' /etc/mycroft/mycroft.conf # Create "mycroft" user with home=data dir beforehand, to have everything at right locations with right permissions directly - local usercmd='useradd -rM' + local usercmd='useradd -rMU' getent passwd mycroft &> /dev/null && usercmd='usermod -a' $usercmd -G audio -d $G_FP_DIETPI_USERDATA/mycroft-data -s $(command -v nologin) mycroft mkdir -p $G_FP_DIETPI_USERDATA/mycroft-data @@ -7978,7 +7978,7 @@ NB: This port needs to be forwarded by your router and/or opened in your firewal Banner_Configuration # Create MPD user - local usercmd='useradd -rM' + local usercmd='useradd -rMU' getent passwd mpd &> /dev/null && usercmd='usermod -a' $usercmd -G dietpi,audio -d $G_FP_DIETPI_USERDATA/.mpd_cache -s $(command -v nologin) mpd # - Add to new "render" group on Buster @@ -8142,7 +8142,7 @@ _EOF_ Banner_Configuration - local usercmd='useradd -rM' + local usercmd='useradd -rMU' getent passwd ympd &> /dev/null && usercmd='usermod -a' $usercmd -G dietpi,audio -s $(command -v nologin) ympd # - Add to new "render" group on Buster @@ -8203,24 +8203,17 @@ _EOF_ Banner_Configuration - #useradd -rM roon -G dietpi,audio,render -s $(command -v nologin) - #root required for remote updates - - mkdir -p $G_FP_DIETPI_USERDATA/roon + #useradd -rMU -G dietpi,audio,render -d $G_FP_DIETPI_USERDATA/roon -s $(command -v nologin) roon + # root required for remote updates dps_index=$software_id Download_Install 'roonbridge.service' /etc/systemd/system/roonbridge.service - # - Move logfiles to /var/log/ (dietpi-ramlog) - # Remove any previous folders to clear for symlink - [[ -d $G_FP_DIETPI_USERDATA/roon/RoonBridge/Logs ]] && rm -R $G_FP_DIETPI_USERDATA/roon/RoonBridge/Logs - [[ -d $G_FP_DIETPI_USERDATA/roon/RAATServer/Logs ]] && rm -R $G_FP_DIETPI_USERDATA/roon/RAATServer/Logs - - mkdir -p $G_FP_DIETPI_USERDATA/roon/RoonBridge - mkdir -p $G_FP_DIETPI_USERDATA/roon/RAATServer - mkdir -p /var/log/roon - - ln -sf /var/log/roon $G_FP_DIETPI_USERDATA/roon/RoonBridge/Logs - ln -sf /var/log/roon $G_FP_DIETPI_USERDATA/roon/RAATServer/Logs + # Move logfiles to /var/log (dietpi-ramlog) + mkdir -p /var/log/roon $G_FP_DIETPI_USERDATA/roon/{RoonBridge,RAATServer} + # - Clear symlink locations + rm -Rf $G_FP_DIETPI_USERDATA/roon/{RoonBridge,RAATServer}/Logs + ln -s /var/log/roon $G_FP_DIETPI_USERDATA/roon/RoonBridge/Logs + ln -s /var/log/roon $G_FP_DIETPI_USERDATA/roon/RAATServer/Logs fi @@ -8229,15 +8222,21 @@ _EOF_ Banner_Configuration - usercmd='useradd -r' - getent passwd nodered &> /dev/null && usercmd='usermod -a' - $usercmd -G gpio -d $G_FP_DIETPI_USERDATA/node-red -s $(command -v nologin) nodered + # Data dir + mkdir -p $G_FP_DIETPI_USERDATA/node-red + + # User + local usercmd='useradd -rMU' + getent passwd nodered &> /dev/null && usercmd='usermod' + $usercmd -d $G_FP_DIETPI_USERDATA/node-red -s $(command -v nologin) nodered - # Allow sudo calls - echo 'nodered ALL=NOPASSWD: ALL' > /etc/sudoers.d/nodered + # - Only add user to "gpio" group, if it does exist (most SBCs), otherwise user creation fails: https://github.com/MichaIng/DietPi/issues/2975#issuecomment-513917360 + getent group gpio &> /dev/null && usermod -aG gpio nodered - mkdir -p $G_FP_DIETPI_USERDATA/node-red + # - Allow sudo calls + echo 'nodered ALL=NOPASSWD: ALL' > /etc/sudoers.d/nodered + # - Service cat << _EOF_ > /etc/systemd/system/node-red.service [Unit] Description=Node-RED (DietPi) @@ -8377,11 +8376,11 @@ _EOF_ Banner_Configuration - userdel -rf minidlna &> /dev/null - useradd -rM minidlna -G dietpi -s $(command -v nologin) + local usercmd='useradd -rMU' + getent passwd minidlna &> /dev/null && usercmd='usermod -a' + $usercmd -G dietpi -s $(command -v nologin) minidlna [[ -f '/etc/init.d/minidlna' ]] && rm /etc/init.d/minidlna - [[ -f '/etc/systemd/system/minidlna.service' ]] && rm /etc/systemd/system/minidlna.service [[ -f '/lib/systemd/system/minidlna.service' ]] && rm /lib/systemd/system/minidlna.service cat << _EOF_ > /etc/systemd/system/minidlna.service @@ -8631,7 +8630,7 @@ _EOF_ Banner_Configuration - local usercmd='useradd -rM' + local usercmd='useradd -rMU' getent passwd debian-deluged &> /dev/null && usercmd='usermod -a' $usercmd -G dietpi -d $G_FP_DIETPI_USERDATA/deluge -s $(command -v nologin) debian-deluged @@ -8795,11 +8794,11 @@ Do you want to enable the Pi-hole blocking page?'; then Banner_Configuration - local usercmd='useradd -rM' + local usercmd='useradd -rMU' getent passwd airsonic &> /dev/null && usercmd='usermod -a' $usercmd -G dietpi,audio -d $G_FP_DIETPI_USERDATA/airsonic -s $(command -v nologin) airsonic # - Add to new "render" group on Buster - (( $G_DISTRO > 4 )) && usermod -a -G render airsonic + (( $G_DISTRO > 4 )) && usermod -aG render airsonic # Optimise memory limit local airsonic_memory_max=$(( $RAM_TOTAL / 5 )) @@ -8834,11 +8833,11 @@ _EOF_ Banner_Configuration - local usercmd='useradd -rM' + local usercmd='useradd -rMU' getent passwd subsonic &> /dev/null && usercmd='usermod -a' $usercmd -G dietpi,audio -d /var/subsonic -s $(command -v nologin) subsonic # - Add to new "render" group on Buster - (( $G_DISTRO > 4 )) && usermod -a -G render subsonic + (( $G_DISTRO > 4 )) && usermod -aG render subsonic # Optimise memory limit local subsonic_memory_max=$(( $RAM_TOTAL / 5 )) @@ -9295,11 +9294,11 @@ _EOF_ Banner_Configuration - local usercmd='useradd -rM' + local usercmd='useradd -rMU' getent passwd ubooquity &> /dev/null && usercmd='usermod -a' $usercmd -G dietpi -s $(command -v nologin) ubooquity - mkdir -p $G_FP_DIETPI_USERDATA/ebooks $G_FP_DIETPI_USERDATA/comics + mkdir -p $G_FP_DIETPI_USERDATA/{ebooks,comics} chmod +x $G_FP_DIETPI_USERDATA/ubooquity/Ubooquity.jar cat << _EOF_ > /etc/systemd/system/ubooquity.service @@ -9851,7 +9850,9 @@ alsa = _EOF_ # Create shairport user - useradd -rM shairport-sync -G audio -s $(command -v nologin) + local usercmd='useradd -rMU' + getent passwd shairport-sync &> /dev/null && usercmd='usermod -a' + $usercmd -G audio -s $(command -v nologin) shairport-sync chmod +x /usr/local/bin/shairport-sync @@ -10042,8 +10043,11 @@ _EOF_ # - Service dps_index=$software_id Download_Install 'netdata.service' /etc/systemd/system/netdata.service + # - Dir (failsafe) + mkdir -p /var/lib/netdata + # - User - local usercmd='useradd -rm' + local usercmd='useradd -rMU' getent passwd netdata &> /dev/null && usercmd='usermod' $usercmd -d /var/lib/netdata -s $(command -v nologin) netdata @@ -10174,7 +10178,7 @@ location = /.well-known/caldav { Banner_Configuration - local usercmd='useradd -rM' + local usercmd='useradd -rMU' getent passwd cuberite &> /dev/null && usercmd='usermod -a' $usercmd -G dietpi -d $G_FP_DIETPI_USERDATA/cubrite -s $(command -v nologin) cuberite @@ -10211,8 +10215,7 @@ _EOF_ Banner_Configuration # Add underprivilged user for web access | no longer works, could be a nodejs v8 issue? - useradd mineos - echo -e "$GLOBAL_PW\n$GLOBAL_PW\n" | passwd mineos + getent passwd mineos &> /dev/null || useradd -p "$GLOBAL_PW" mineos # Stop mineos from running while we config it. When we didnt do this, the program would constantly overwrite our symlink from (/var/games/minecraft). #/DietPi/dietpi/dietpi-services stop # Already done after install step now @@ -10227,10 +10230,9 @@ _EOF_ G_BACKUP_FP /etc/mineos.conf cp $G_FP_DIETPI_USERDATA/mineos/minecraft/mineos.conf /etc/mineos.conf - rm -R /var/games/minecraft &> /dev/null - mkdir -p /var/games - mkdir -p $G_FP_DIETPI_USERDATA/mineos/serverdata - ln -sf $G_FP_DIETPI_USERDATA/mineos/serverdata /var/games/minecraft + rm -Rf /var/games/minecraft + mkdir -p /var/games $G_FP_DIETPI_USERDATA/mineos/serverdata + ln -s $G_FP_DIETPI_USERDATA/mineos/serverdata /var/games/minecraft # - setup SSL cert cd $G_FP_DIETPI_USERDATA/mineos/minecraft @@ -10248,7 +10250,6 @@ autostart=true autorestart=true redirect_stderr=true _EOF_ - supervisorctl reload fi @@ -10259,7 +10260,7 @@ _EOF_ Banner_Configuration # User - local usercmd='useradd -rM' + local usercmd='useradd -rMU' getent passwd gogs &> /dev/null && usercmd='usermod' $usercmd -d /etc/gogs -s $(command -v nologin) gogs @@ -10293,7 +10294,7 @@ _EOF_ Banner_Configuration - local usercmd='useradd -rm' + local usercmd='useradd -rMU' getent passwd qbittorrent &> /dev/null && usercmd='usermod -a' $usercmd -G dietpi -p "$GLOBAL_PW" -s $(command -v nologin) qbittorrent @@ -10501,7 +10502,7 @@ _EOF_ mkdir -p $G_FP_DIETPI_USERDATA/$FOLDER_DOWNLOADS/.session # Create rTorrent run user - local usercmd='useradd -rM' + local usercmd='useradd -rMU' getent passwd rtorrent &> /dev/null && usercmd='usermod -a' $usercmd -G dietpi -d $G_FP_DIETPI_USERDATA/rtorrent -s $(command -v nologin) rtorrent @@ -10809,7 +10810,7 @@ _EOF_ Banner_Configuration # User - local usercmd='useradd -rM' + local usercmd='useradd -rMU' getent passwd medusa &> /dev/null && usercmd='usermod -a' $usercmd -G dietpi -d $G_FP_DIETPI_USERDATA/medusa -s $(command -v nologin) medusa @@ -10825,7 +10826,7 @@ _EOF_ Banner_Configuration - local usercmd='useradd -rm' + local usercmd='useradd -rMU' getent passwd tonido &> /dev/null && usercmd='usermod -a' $usercmd -G dietpi -s $(command -v nologin) tonido @@ -10845,15 +10846,16 @@ WantedBy=multi-user.target _EOF_ # User dirs - mkdir -p $G_FP_DIETPI_USERDATA/tonido/sync - mkdir -p $G_FP_DIETPI_USERDATA/tonido/syncdata - + mkdir -p /home/tonido $G_FP_DIETPI_USERDATA/tonido/sync{,data} # - Symlink cp -R /home/tonido/tonido $G_FP_DIETPI_USERDATA/ &> /dev/null - rm -R /home/tonido/tonido &> /dev/null - ln -sf $G_FP_DIETPI_USERDATA/tonido /home/tonido/tonido - ln -sf $G_FP_DIETPI_USERDATA/tonido/sync /home/tonido/TonidoSync - ln -sf $G_FP_DIETPI_USERDATA/tonido/syncdata /home/tonido/TonidoSyncData + rm -Rf /home/tonido/{tonido,TonidoSync{,Data}} + ln -s $G_FP_DIETPI_USERDATA/tonido /home/tonido/tonido + ln -s $G_FP_DIETPI_USERDATA/tonido/sync /home/tonido/TonidoSync + ln -s $G_FP_DIETPI_USERDATA/tonido/syncdata /home/tonido/TonidoSyncData + + # Permissions + chown -R tonido:dietpi $G_FP_DIETPI_USERDATA/tonido /home/tonido # ARMv7 switch if (( $G_HW_ARCH == 2 )); then @@ -11100,7 +11102,7 @@ _EOF_ fi # User - local usercmd='useradd -rM' + local usercmd='useradd -rMU' getent passwd blynk &> /dev/null && usercmd='usermod -a' $usercmd -G dietpi -d $G_FP_DIETPI_USERDATA/blynk -s $(command -v nologin) blynk @@ -11186,7 +11188,7 @@ _EOF_ Banner_Configuration # User - local usercmd='useradd -rM' + local usercmd='useradd -rMU' getent passwd sabnzbd &> /dev/null && usercmd='usermod -a' $usercmd -G dietpi -d /etc/sabnzbd -s $(command -v nologin) sabnzbd @@ -11300,7 +11302,7 @@ _EOF_ Banner_Configuration - local usercmd='useradd -rM' + local usercmd='useradd -rMU' getent passwd koel &> /dev/null && usercmd='usermod -a' $usercmd -G dietpi -s $(command -v nologin) koel @@ -11347,7 +11349,7 @@ _EOF_ Banner_Configuration - local usercmd='useradd -rM' + local usercmd='useradd -rMU' getent passwd sonarr &> /dev/null && usercmd='usermod -a' $usercmd -G dietpi -d $G_FP_DIETPI_USERDATA/sonarr -s $(command -v nologin) sonarr @@ -11382,7 +11384,7 @@ _EOF_ Banner_Configuration - local usercmd='useradd -rM' + local usercmd='useradd -rMU' getent passwd radarr &> /dev/null && usercmd='usermod -a' $usercmd -G dietpi -d $G_FP_DIETPI_USERDATA/radarr -s $(command -v nologin) radarr @@ -11417,7 +11419,7 @@ _EOF_ Banner_Configuration - local usercmd='useradd -rM' + local usercmd='useradd -rMU' getent passwd lidarr &> /dev/null && usercmd='usermod -a' $usercmd -G dietpi -d $G_FP_DIETPI_USERDATA/lidarr -s $(command -v nologin) lidarr @@ -11453,7 +11455,7 @@ _EOF_ Banner_Configuration # User - local usercmd='useradd -rM' + local usercmd='useradd -rMU' getent passwd plexpy &> /dev/null && usercmd='usermod -a' $usercmd -G dietpi -d /opt/plexpy -s $(command -v nologin) plexpy @@ -11485,7 +11487,7 @@ _EOF_ Banner_Configuration # User - local usercmd='useradd -rM' + local usercmd='useradd -rMU' getent passwd jackett &> /dev/null && usercmd='usermod' $usercmd -d /opt/jackett -s $(command -v nologin) jackett @@ -11527,7 +11529,7 @@ _EOF_ Banner_Configuration - local usercmd='useradd -rM' + local usercmd='useradd -rMU' getent passwd nzbget &> /dev/null && usercmd='usermod -a' $usercmd -G dietpi -s $(command -v nologin) nzbget @@ -11806,8 +11808,10 @@ _EOF_ Banner_Configuration # Create allo user for GUI - useradd -m allo -s /bin/bash -G www-data - chpasswd <<< 'allo:allo' + local usercmd='useradd -mU' + getent passwd allo &> /dev/null && usercmd='usermod -a' + $usercmd -G www-data -p 'allo' -s /bin/bash allo + # - Grant sudo permissions echo 'allo ALL=NOPASSWD: ALL' > /etc/sudoers.d/allo # Always Drop DB, and, recreate it, due to error issue with reinstall over the top. @@ -11816,7 +11820,7 @@ _EOF_ /DietPi/dietpi/func/create_mysql_db allo_db allo_db "$GLOBAL_PW" mysql allo_db < /var/www/allo_db.sql - [[ -f /var/www/allo_db.sql ]] && rm /var/www/allo_db.sql + [[ -f '/var/www/allo_db.sql' ]] && rm /var/www/allo_db.sql # Redirect to web interface by default: rm -f /var/www/index.htm* @@ -11886,17 +11890,22 @@ _EOF_ Banner_Configuration # Create/Edit user - local usercmd='useradd -rm' + local usercmd='useradd -rMU' getent passwd gmrender &> /dev/null && usercmd='usermod -a' $usercmd -G dietpi,audio -s $(command -v nologin) gmrender # - Add to new "render" group on Buster - (( $G_DISTRO > 4 )) && usermod -a -G render gmrender + (( $G_DISTRO > 4 )) && usermod -aG render gmrender + + # Home dir (failsafe) + mkdir -p /home/gmrender - # Pre-create log file + # Log file >> /var/log/gmrender.log - chown gmrender:dietpi /var/log/gmrender.log - # Create systemd unit + # Permissions + chown -R gmrender:dietpi /home/gmrender /var/log/gmrender.log + + # Service cat << _EOF_ > /etc/systemd/system/gmrender.service [Unit] Description=GMediaRender (DietPi) From d7604eab07a9f85aebf436df6633965ab4ba31d4 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Mon, 22 Jul 2019 23:41:24 +0200 Subject: [PATCH 041/184] v6.26 + CHANGELOG | Node-RED: Resolved an issue where user creation fails due to missing "gpio" group + CHANGELOG | Fix wrong Node-RED data dir issue reference --- CHANGELOG.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index da4a30064d..9e158e2c79 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -11,7 +11,8 @@ Bug Fixes: - General | Removed an obsolete OpenMediaVault cron job and binary that was leftover on at least one of our images (NanoPi NEO2) and is not part of the current OMV packages, thus save to remove in every case. Many thanks to @kt1024 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2994 - DietPi-Config | Resolved an issue on RPi where I2C baudrate was not applied correctly, thus selection was ineffective. Many thanks to @flashspys for reporting this issue: https://github.com/MichaIng/DietPi/issues/2966 - DietPi-Software | Gitea: Resolved an issue where install fails on ARMv7 systems. Many thanks to @maschiw for reporting this issue: https://github.com/MichaIng/DietPi/issues/2959 -- DietPi-Software | Node-RED: Resolved an isssue where install fails because of missing data dir creation. Many thanks to @hifitime for reporting this isssue: https://github.com/MichaIng/DietPi/issues/2974#issuecomment-509534045 +- DietPi-Software | Node-RED: Resolved an issue where install fails due to missing data dir creation. Many thanks to @Orfait for reporting this isssue: https://github.com/MichaIng/DietPi/issues/2975 +- DietPi-Software | Node-RED: Resolved an issue where user creation fails if "gpio" group is not present. Many thanks to @marcobrianza for reporting this issue: https://github.com/MichaIng/DietPi/issues/2975#issuecomment-513917360 As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/XXXX From 091aea224aa0392891ca9d689ce21b1112907f89 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Tue, 23 Jul 2019 16:26:04 +0200 Subject: [PATCH 042/184] v6.26 + DietPi-PREP | On Buster+ x86_64 images, enable secure boot compatibility --- PREP_SYSTEM_FOR_DIETPI.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index c255004a8a..617baea862 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -790,7 +790,10 @@ _EOF_ # Grub EFI if dpkg-query -s 'grub-efi-amd64' &> /dev/null || [[ -d '/boot/efi' ]]; then - G_AGI grub-efi-amd64 + local efi_packages='grub-efi-amd64' + # On Buster+ enable secure boot compatibility: https://packages.debian.org/buster/grub-efi-amd64-signed + (( $DISTRO_TARGET > 4 )) && efi_packages+='grub-efi-amd64-signed shim-signed' + G_AGI $efi_packages # Grub BIOS else From c1fe41e51d68100f8440b5b1b3cafc27c488c8ce Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Tue, 23 Jul 2019 22:21:49 +0200 Subject: [PATCH 043/184] META | DietPi-Imager (#2982) + Drive source: Run dd after partition and file system minimise has been done on source drive, to avoid copying the whole drive size. This implies that in case of hard failure, the source drive might need to be rewritten. However the current behaviour makes my usual schedule impossible and we should trust our script and the used commands to not destroy source drive data. + Check for existing output .img file after name has been chosen and allow to backup in case. + GPT error leads to parted hang, waiting for user input, before it's corrected by gdisk, thus run non-interactively via "-s" + Add visual space between dev name and space in menus + Add additional user notifications about what we're doing --- .meta/dietpi-imager | 192 +++++++++++++++++++++++--------------------- 1 file changed, 102 insertions(+), 90 deletions(-) diff --git a/.meta/dietpi-imager b/.meta/dietpi-imager index eb85386986..7899e6cadf 100755 --- a/.meta/dietpi-imager +++ b/.meta/dietpi-imager @@ -8,9 +8,9 @@ # Updated by MichaIng / micha@dietpi.com / dietpi.com # #//////////////////////////////////// - # - Reads disk to image | or use existing .img file - # - Resizes RootFS partition - # - Hashes and 7z's the final image ready for release. + # - Create new .img file from drive | or use existing .img file + # - Minimises root partition and file system + # - Hashes and 7z's the final image ready for release #//////////////////////////////////// # Import DietPi-Globals --------------------------------------------------------------- @@ -21,24 +21,19 @@ G_INIT # Import DietPi-Globals --------------------------------------------------------------- + FP_SOURCE_IMG='' FP_SOURCE='' - FP_LOOPBACK='' FP_ROOT_DEV='' - ROOT_PARTITION_INDEX='' + ROOT_PARTITION_INDEX=0 OUTPUT_IMG_NAME='' OUTPUT_7Z_NAME='' GPT=0 - DIETPI_VERSION='v6.25' - Delete_Loopback(){ - - [[ $FP_LOOPBACK ]] && G_RUN_CMD losetup -d $FP_LOOPBACK - - } + Delete_Loopback(){ [[ -b $FP_SOURCE ]] && G_RUN_CMD losetup -d $FP_SOURCE; } Exit_On_Fail(){ - Delete_Loopback + [[ $FP_SOURCE_IMG ]] && Delete_Loopback exit 1 } @@ -47,58 +42,73 @@ G_WHIP_MENU_ARRAY=( - 'Drive' ': Save a drive/disk contents to an image, that you can work with' - 'Image' ': Use an existing image file (.img) to work with' + 'Drive' ': The OS is stored on an attached drive.' + 'Image' ': The OS is stored as an image (.img) file.' ) - G_WHIP_MENU 'Please select an option:' || Exit_On_Fail + G_WHIP_MENU 'Please select how the input OS is stored:' || Exit_On_Fail if [[ $G_WHIP_RETURNED_VALUE == 'Drive' ]]; then # Detect drives and list for selection G_WHIP_MENU_ARRAY=($(lsblk -npo NAME,SIZE | grep '^/')) - if [[ ! $G_WHIP_MENU_ARRAY ]] || ! G_WHIP_MENU 'Please select the drive you wish to save as an image:'; then - - Exit_On_Fail - - fi - FP_SOURCE='/root/dietpi-imager_tmp.img' - dd if=$G_WHIP_RETURNED_VALUE of=$FP_SOURCE bs=4K status=progress || Exit_On_Fail + # - Visually separate dev name and space + for ((i=1;i<${#G_WHIP_MENU_ARRAY[@]};i+=2)); do G_WHIP_MENU_ARRAY[$i]=": ${G_WHIP_MENU_ARRAY[$i]}"; done + [[ $G_WHIP_MENU_ARRAY ]] && G_WHIP_MENU 'Please select the drive you wish to create the image from:' || Exit_On_Fail + FP_SOURCE=$G_WHIP_RETURNED_VALUE elif [[ $G_WHIP_RETURNED_VALUE == 'Image' ]]; then - /DietPi/dietpi/dietpi-explorer 1 /root + # Open DietPi-Explorer for image file selection local fp_selected='/tmp/.dietpi-explorer_selected_location' - [[ -f $fp_selected ]] || Exit_On_Fail - FP_SOURCE=$(<$fp_selected) + [[ -f $fp_selected ]] && rm $fp_selected # Failsafe + /DietPi/dietpi/dietpi-explorer 1 /root + [[ -f $fp_selected && $(<$fp_selected) ]] || Exit_On_Fail + FP_SOURCE_IMG=$(<$fp_selected) rm $fp_selected - if [[ ! -f $FP_SOURCE ]]; then + if [[ ! -f $FP_SOURCE_IMG ]]; then - G_DIETPI-NOTIFY 1 "Source image file ($FP_SOURCE) does not exist, aborting..." + G_DIETPI-NOTIFY 1 "Selected image file ($FP_SOURCE_IMG) does not exist, aborting..." Exit_On_Fail fi - fi + # Create loopback device from .img file + modprobe loop || Exit_On_Fail + FP_SOURCE=$(losetup -f) + losetup $FP_SOURCE "$FP_SOURCE_IMG" || Exit_On_Fail + partprobe $FP_SOURCE || Exit_On_Fail + G_DIETPI-NOTIFY 0 "Mounted the image ($FP_SOURCE_IMG) as loopback device: $FP_SOURCE" - # Attach .img file to loop device - modprobe loop || Exit_On_Fail - FP_LOOPBACK=$(losetup -f) - losetup $FP_LOOPBACK "$FP_SOURCE" || Exit_On_Fail - partprobe $FP_LOOPBACK || Exit_On_Fail + fi # Detect partitions and list for selection - G_WHIP_MENU_ARRAY=($(lsblk -npo NAME,SIZE ${FP_LOOPBACK}?*)) - G_WHIP_MENU "Please select the root partition of $FP_LOOPBACK" || Exit_On_Fail - ROOT_PARTITION_INDEX=${G_WHIP_RETURNED_VALUE: -1} + G_WHIP_MENU_ARRAY=($(lsblk -npo NAME,SIZE ${FP_SOURCE}?*)) + # - Visually separate dev name and space + for ((i=1;i<${#G_WHIP_MENU_ARRAY[@]};i+=2)); do G_WHIP_MENU_ARRAY[$i]=": ${G_WHIP_MENU_ARRAY[$i]}"; done + G_WHIP_MENU 'Please select the OS root partition:' || Exit_On_Fail + FP_ROOT_DEV=$G_WHIP_RETURNED_VALUE + ROOT_PARTITION_INDEX=${FP_ROOT_DEV: -1} G_WHIP_DEFAULT_ITEM='DietPi_--' - G_WHIP_INPUTBOX "Please enter the new/output filename for $FP_SOURCE\n - DietPi_--\n - EG: DietPi_RPi-ARMv6-Stretch" || Exit_On_Fail + G_WHIP_INPUTBOX 'Please enter the filename for the new image:\n - DietPi_--\n - EG: DietPi_RPi-ARMv6-Buster' || Exit_On_Fail OUTPUT_IMG_NAME=$G_WHIP_RETURNED_VALUE + OUTPUT_7Z_NAME="$OUTPUT_IMG_NAME.7z" + + # Add version number to output file name + G_WHIP_DEFAULT_ITEM='v6.25' + G_WHIP_INPUTBOX 'Please enter the DietPi version for this image:\n - EG: v6.25' || Exit_On_Fail + OUTPUT_IMG_NAME="${OUTPUT_IMG_NAME//DietPi_/DietPi_${G_WHIP_RETURNED_VALUE}_}.img" + + # Check for existing file, in case offer backup + if [[ -f '/root/'$OUTPUT_IMG_NAME ]]; then - G_WHIP_DEFAULT_ITEM=$DIETPI_VERSION - G_WHIP_INPUTBOX 'Please enter the DietPi version for this image:' || Exit_On_Fail - DIETPI_VERSION=$G_WHIP_RETURNED_VALUE + G_WHIP_BUTTON_OK_TEXT='Overwrite' + G_WHIP_BUTTON_CANCEL_TEXT='Backup' + G_WHIP_YESNO "[WARNING] /root/$OUTPUT_IMG_NAME already exists\n +Do you want to overwrite or backup the existing file to $OUTPUT_IMG_NAME.bak?" || mv /root/$OUTPUT_IMG_NAME /root/$OUTPUT_IMG_NAME.bak + + fi } @@ -107,56 +117,51 @@ Menu_Main # Install required packages - G_AG_CHECK_INSTALL_PREREQ gdisk dosfstools parted zerofree p7zip + G_AG_CHECK_INSTALL_PREREQ parted gdisk zerofree p7zip # Auto detect GPT partition table, failsafe detection of MBR to debug possibly other wording/partition table types - if [[ $(parted $FP_LOOPBACK print) == *'Partition Table: msdos'* ]]; then + if [[ $(parted -s $FP_SOURCE print) == *'Partition Table: msdos'* ]]; then + G_DIETPI-NOTIFY 2 'MBR partition table detected, applying gdisk fix...' GPT=0 - elif [[ $(parted $FP_LOOPBACK print) == *'Partition Table: gpt'* ]]; then + elif [[ $(parted -s $FP_SOURCE print) == *'Partition Table: gpt'* ]]; then + G_DIETPI-NOTIFY 2 'GPT partition table detected' GPT=1 else - G_DIETPI-NOTIFY 1 "Unknown partition table type ($(parted $FP_LOOPBACK print | mawk '/^Partition Table:/ {print $3;exit}')), aborting..." + G_DIETPI-NOTIFY 1 "Unknown partition table type ($(parted -s $FP_SOURCE print | mawk '/^Partition Table:/ {print $3;exit}')), aborting..." Exit_On_Fail fi - # GPT images (RockPro64) after reading the image AND again after shrinking - # To fix: - # - GPT PMBR size mismatch (4458495 != 15523839) will be corrected by w(rite). - # - 15523806 - # RUN - # - gdisk "$IMAGE_FP/$IMAGE_NAME" - # w | y - (( $GPT )) && echo -e 'w\ny\nq\n' | gdisk $FP_LOOPBACK # Needs testing for automation... + # GPT images: + # - "GPT PMBR size mismatch (4458495 != 15523839)" + # - "Error: The backup GPT table is corrupt, but the primary appears OK, so that will be used." + # - gdisk write will correct this + (( $GPT )) && echo -e 'w\ny\nq\n' | gdisk $FP_SOURCE - # root partition dev - FP_ROOT_DEV="${FP_LOOPBACK}p${ROOT_PARTITION_INDEX}" - - # Fsck e2fsck -f $FP_ROOT_DEV # Remount image for any required edits. - fp_mnt='loopback_rootfs' + fp_mnt='tmp_rootfs' mkdir -p /mnt/$fp_mnt if G_ERROR_HANDLER_INFO_ONLY=1 G_RUN_CMD mount $FP_ROOT_DEV /mnt/$fp_mnt; then G_WHIP_MSG "Image mounted for file editing, make changes if required: $FP_ROOT_DEV > /mnt/$fp_mnt\n\nPress 'Ok' when you are finished." sync G_RUN_CMD umount /mnt/$fp_mnt - partprobe $FP_LOOPBACK # Probably not required as no partition changes, regardless, no harm. + partprobe $FP_SOURCE # Failsafe fi - # Fsck - e2fsck -f $FP_ROOT_DEV + e2fsck -f $FP_ROOT_DEV # Failsafe # Shrink file system to minimum # - Run multiple times until no change is done any more + G_DIETPI-NOTIFY 2 'Shrinking RootFS to minimum size...' local out FS_SIZE=0 while : @@ -183,50 +188,53 @@ done # Estimate minimum end sector - PART_START=$(fdisk -l -o Start $FP_LOOPBACK | tail -1) # 512 byte sectors + PART_START=$(fdisk -l -o Start $FP_SOURCE | tail -1) # 512 byte sectors PART_END=$(( $PART_START + $FS_SIZE )) G_DIETPI-NOTIFY 2 "Shrinking root partition to: $(( $FS_SIZE / 2048 + 1 )) MiB" - parted $FP_LOOPBACK unit s resizepart $ROOT_PARTITION_INDEX $PART_END yes - partprobe $FP_LOOPBACK - sync + parted $FP_SOURCE unit s resizepart $ROOT_PARTITION_INDEX $PART_END yes + partprobe $FP_SOURCE - # Override free space with zeros to purge removed data and allow further image/archive size reduction + G_DIETPI-NOTIFY 2 'Overriding root partition free space with zeros to purge removed data and allow further archive size reduction...' zerofree -v $FP_ROOT_DEV + sync - # GPT images (RockPro64) after reading the image AND again after shrinking - # To fix: - # - GPT PMBR size mismatch (4458495 != 15523839) will be corrected by w(rite). - # - 15523806 - # RUN - # - gdisk "$IMAGE_FP/$IMAGE_NAME" - # w | y - (( $GPT )) && echo -e 'w\ny\nq\n' | gdisk $FP_LOOPBACK + # GPT images: + # - "GPT PMBR size mismatch (4458495 != 15523839)" + # - "Error: The backup GPT table is corrupt, but the primary appears OK, so that will be used." + # - gdisk write will correct this + (( $GPT )) && echo -e 'w\ny\nq\n' | gdisk $FP_SOURCE - # Estimate used size - PART_SIZE=$(( ( $(fdisk -l -o End $FP_LOOPBACK | tail -1) + 1 ) * 512 )) # 512 byte sectors => Byte - IMAGE_SIZE=$(( $PART_SIZE + ( 512 * 256 ) )) # 64 byte for secondary GPT + safety net + # Finished: Re-estimate partition end (failsafe) and derive final image size + partprobe $FP_SOURCE + PART_END=$(( ( $(fdisk -l -o End $FP_SOURCE | tail -1) + 1 ) * 512 )) # 512 byte sectors => Byte + IMAGE_SIZE=$(( $PART_END + ( 512 * 256 ) )) # 64 byte for secondary GPT + safety net - # Create final image in /root + # Created final image + archive in /root cd /root - # Truncate image file to used size - truncate --size=$IMAGE_SIZE "$FP_SOURCE" + # Image file source + if [[ $FP_SOURCE_IMG ]]; then - # Loopback finished, clear loop - partprobe $FP_LOOPBACK - sync - Delete_Loopback + # Clear loop + Delete_Loopback - # Add version number to output file name - OUTPUT_7Z_NAME="$OUTPUT_IMG_NAME.7z" - OUTPUT_IMG_NAME="${OUTPUT_IMG_NAME//DietPi_/DietPi_${DIETPI_VERSION}_}.img" + G_DIETPI-NOTIFY 2 "Truncating final image file to actually used size: $(( $IMAGE_SIZE / 1024 / 1024 + 1 )) MiB" + truncate --size=$IMAGE_SIZE "$FP_SOURCE_IMG" - # Move new img to /root - mv $FP_SOURCE $OUTPUT_IMG_NAME # TODO: if not same already location/file... + # Rename and move to /root + mv "$FP_SOURCE_IMG" $OUTPUT_IMG_NAME + + # Drive source + else + + G_DIETPI-NOTIFY 2 "Creating final image with actually used size: $(( $IMAGE_SIZE / 1024 / 1024 + 1 )) MiB" + dd if=$FP_SOURCE of=$OUTPUT_IMG_NAME bs=1M status=progress count=$(( $IMAGE_SIZE / 1024 / 1024 + 1 )) + + fi # Generate hashes: MD5, SHA1, SHA256 - G_DIETPI-NOTIFY 2 'Generating hash.txt, please wait...' + G_DIETPI-NOTIFY 2 'Generating hashes to pack with image, please wait...' cat << _EOF_ > hash.txt FILE: $OUTPUT_IMG_NAME DATE: $(date) @@ -236,15 +244,19 @@ SHA256: $(sha256sum $OUTPUT_IMG_NAME | mawk '{print $1}') _EOF_ # Download current README + G_DIETPI-NOTIFY 2 'Downloading current README.md to pack with image...' wget https://raw.githubusercontent.com/MichaIng/DietPi/master/README.md -O README.md || Exit_On_Fail # Generate 7z archive # NB: LZMA2 ultra compression method requires 2G RAM [[ -f $OUTPUT_7Z_NAME ]] && rm $OUTPUT_7Z_NAME + G_DIETPI-NOTIFY 2 'Creating final 7zip archive...' if 7zr a -m0=lzma2 -mx=9 $OUTPUT_7Z_NAME $OUTPUT_IMG_NAME hash.txt README.md; then rm hash.txt README.md - G_WHIP_MSG "[INFO] /root/$OUTPUT_7Z_NAME created" + G_WHIP_MSG "[ OK ] DietPi-Imager has successfully finished.\n +Final image file: /root/$OUTPUT_IMG_NAME +Final 7z archive: /root/$OUTPUT_7Z_NAME" fi From 88b069664131148178bd27563527c2343ddaa279 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Tue, 23 Jul 2019 23:06:57 +0200 Subject: [PATCH 044/184] v6.26 + DietPi-Globals | G_AGP: Convert installed packages list into one-liner via awk ORS=' ' + DietPi-Globals | G_AGP: Print initial command as well if no matching packages are installed, to avoid confusion due to "none currently installed" message --- dietpi/func/dietpi-globals | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 826fecef4d..1641f2c01c 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -1536,12 +1536,12 @@ $print_logfile_info G_ERROR_HANDLER_COMMAND="G_AGP $string" G_ERROR_HANDLER_ONERROR_FPLOGFILE=$G_FP_LOG_APT - # - Create list of matching installed packages - local packages=$(dpkg --get-selections $string 2> /dev/null | mawk '{print $1}') + G_DIETPI-NOTIFY 2 "\e[0mAPT removal for: \e[33m$string\e[0m, please wait..." + # - Create one-lined list of matching installed packages, abort if none were found + local packages=$(dpkg --get-selections $string 2> /dev/null | mawk '{print $1}' ORS=' ') if [[ $packages ]]; then - G_DIETPI-NOTIFY 2 "\e[0mAPT removal for: \e[33m$packages\e[0m, please wait..." echo -ne '\e[90m' DEBIAN_FRONTEND=noninteractive apt-get -qq $options purge $packages 2>&1 | tee $G_FP_LOG_APT G_ERROR_HANDLER_EXITCODE=${PIPESTATUS[0]} From 023fc39ff45a9664be449d660cfd5d2e84f5ece4 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Wed, 24 Jul 2019 00:10:56 +0200 Subject: [PATCH 045/184] v6.26 (#3000) + DietPi-Set_hardware | RPi: Fix deprecated or renamed dtoverlays/params: https://github.com/raspberrypi/firmware/commit/d36bde339b067bf13b610fd9741d6351c1dafc38#diff-32265084aeae5fd34fbaf894f22fb20f + DietPi-Set_hardware | RPi: Disable Onboard WiFi and Bluetooth via dtoverlay + DietPi-Set_hardware | Add "dietpi-" prefix to WiFi and Bluetooth blacklist files to show they are from us + DietPi-Set_hardware | wifimodules: Merge WiFi powersaving settings into a single file with "dietpi-" prefix, to simplify and show it's from us + DietPi-Set_hardware | wifimodules: Offer to purge WiFi APT packages on disable + DietPi-Set_hardware | wifimodules: Enable modules first, install APT packages afterwards, to allow possible auto-configuration + DietPi-Set_hardware | wifimodules: Do not exit immediately when APT installs fail, instead set $EXIT_CODE=1 to have .network file updated and print script failure for user info + DietPi-Config | Adjust RPi onboard WiFi state detection based on dtoverlay=disable_wifi + DietPi-Config | Adjust Bluetooth state detection based on renamed blacklist file + DietPi-Config | Minor coding wording and visual + DietPi-Patch | WiFi+BT config file renaming, method changes and config.txt fixes due to changes in recent firmware --- CHANGELOG.txt | 2 + dietpi/dietpi-config | 201 +++++++++++++------------------- dietpi/func/dietpi-set_hardware | 136 +++++++++++---------- dietpi/patch_file | 28 +++++ 4 files changed, 185 insertions(+), 182 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 9e158e2c79..9169c805a5 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,8 @@ v6.26 Changes / Improvements / Optimisations: - General | Support for Debian Jessie has now been fully dropped from DietPi code. Jessie systems are moved to the "jessie-support" Git branch and will stay on v6.25. Critical bugs, if reported, may still be fixed, but DietPi-Software related issues and new features will not be handled anymore by the DietPi code team. However, everyone is free to open related pull requests against the jessie-support branch: https://github.com/MichaIng/DietPi/tree/jessie-support - DietPi-Config | Audio Options: Menu has been reworked. Audio capabilities (ALSA) can be enabled and disabled as a separate option. If enabled, generic soundcard auto-detection has been added to the bottom of the list for all devices. This allows the selection of generic sound devices on all SBCs, e.g. if unknown to DietPi or if our hardcoded card/device IDs are wrong due to additional attached audio hardware. +- DietPi-Config | RPi: Update certain config.txt settings to match new firmware version. WiFi and Bluetooth is now disabled via related dtoverlays, which should further reduce hardware and firmware loads. +- DietPi-Config | Some /etc/modprobe.d/ configs are merged to less files and mostly prefixed with "dietpi-", to allow easier differentiation between Debian/pre-image and DietPi files. - DietPi-Software | Pi-hole: Logging to /var/log/pihole.log is now disabled by default, since it is not required in usual cases. Query logs, shown in web UI, are stored in database. This might also resolve possible pihole-FTL crashes in combination with DietPi-RAMlog and DietPi-Logclear. Many thanks to @kuerious for reporting and @Mcat12 for providing helpful information on this topic: https://github.com/pi-hole/FTL/issues/614 - DietPi-Software | Pi-hole: Lighttpd config has been added to block access to .dot dirs (.git*) and enable local fonts for web UI, based on: https://github.com/pi-hole/pi-hole/blob/master/advanced/lighttpd.conf.debian diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 70c12fc419..164b0b9092 100644 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1321,7 +1321,7 @@ NB: You now need to run "apt update" or "G_AGUP" once after each reboot, before local bluetooth_state_text='On' local bluetooth_state=1 - if [[ -f '/etc/modprobe.d/disable_bt.conf' ]]; then + if [[ -f '/etc/modprobe.d/dietpi-disable_bluetooth.conf' ]]; then bluetooth_state=0 bluetooth_state_text='Off' @@ -1620,7 +1620,7 @@ Please reboot this system once, the HW bit which allows USB boot support will th # Define CPU scaling frequency or percent local type_cpu_freq_info='MHz' # - Intel - [[ -f /sys/devices/system/cpu/intel_pstate/max_perf_pct ]] && type_cpu_freq_info='%' + [[ -f '/sys/devices/system/cpu/intel_pstate/max_perf_pct' ]] && type_cpu_freq_info='%' # - User Scaling Max Freq limit. local user_frequency_max_current=$(grep -m1 '^[[:blank:]]*CONFIG_CPU_MAX_FREQ=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') @@ -1655,8 +1655,7 @@ Please reboot this system once, the HW bit which allows USB boot support will th 'Intel Turbo/Boost'*) - (( intel_boost_disabled++ )) - (( $intel_boost_disabled > 1 )) && intel_boost_disabled=0 + (( $intel_boost_disabled )) && intel_boost_disabled=0 || intel_boost_disabled=1 G_CONFIG_INJECT 'CONFIG_CPU_DISABLE_TURBO=' "CONFIG_CPU_DISABLE_TURBO=$intel_boost_disabled" /DietPi/dietpi.txt /DietPi/dietpi/func/dietpi-set_cpu @@ -2115,8 +2114,8 @@ Current setting: $user_frequency_min_text" && G_CONFIG_INJECT 'CONFIG_CPU_MIN_FR NET_RX_BYTE=0 NET_TX_BYTE=0 - NET_RX_MB='Unknown' - NET_TX_MB='Unknown' + NET_RX_MB='N/A' + NET_TX_MB='N/A' # $1 = device+index Net_Update_UsageStats(){ @@ -2128,23 +2127,13 @@ Current setting: $user_frequency_min_text" && G_CONFIG_INJECT 'CONFIG_CPU_MIN_FR NET_RX_MB='N/A' NET_TX_MB='N/A' - if [[ -f /sys/class/net/$input/statistics/rx_bytes && -f /sys/class/net/$input/statistics/tx_bytes ]]; then + if [[ -f '/sys/class/net/$input/statistics/rx_bytes' && -f '/sys/class/net/$input/statistics/tx_bytes' ]]; then NET_RX_BYTE=$( /dev/null && WIFI_SSID_CURRENT=$(iwgetid -r) - [[ ! $WIFI_SSID_CURRENT ]] && WIFI_SSID_CURRENT='Disconnected / No SSID' + [[ $WIFI_SSID_CURRENT ]] || WIFI_SSID_CURRENT='Disconnected / No SSID' WIFI_CRED_INDEX=0 # Which index of SSID/KEY etc we are editing # Get extra WiFi stats @@ -2630,7 +2610,7 @@ _EOF_ WIFI_SIGNALSTRENGTH=0 # - Hotspot enabled? WIFI_HOTSPOT=0 - [[ -f /usr/sbin/hostapd ]] && WIFI_HOTSPOT=1 + [[ -f '/usr/sbin/hostapd' ]] && WIFI_HOTSPOT=1 WIFI_COUNTRYCODE='GB' # - Prevent "nl80211 not found" message, when running this command with cfg80211 module disabled. @@ -2639,7 +2619,7 @@ _EOF_ # Convert CIDR integer to net mask, e.g. "192.168.0.100/24" (take "24") to "255.255.255.0" cidr2mask() { - local i mask='' + local i mask local full_octets=$(( $1 / 8 )) local partial_octet=$(( $1%8 )) @@ -2788,12 +2768,12 @@ _EOF_ G_WHIP_MENU_ARRAY+=('Ethernet' ": $eth_hardware_text | [$eth_disabled_text] | $eth_connected_text") G_WHIP_MENU_ARRAY+=('WiFi' ": $wlan_hardware_text | [$wlan_disabled_text] | $wlan_connected_text") - # - Onboard WiFi - # RPi 3/Zero W + # Onboard WiFi + # - RPi 3/4/Zero W if (( $HW_ONBOARD_WIFI )); then local onboard_wifi_enabled=1 - if [[ -f '/etc/modprobe.d/disable_wifi_rpi3_onboard.conf' ]]; then + if grep -q '^[[:blank:]]*dtoverlay=disable-wifi' /DietPi/config.txt; then onboard_wifi_enabled=0 G_WHIP_MENU_ARRAY+=('Onboard WiFi' ': [Off]') @@ -2809,11 +2789,10 @@ _EOF_ G_WHIP_MENU_ARRAY+=('' '●─ Additional Options ') # IPv6 - local ipv6_status_text='[WARNING] Not supported or disabled on kernel level!' if [[ -d '/proc/sys/net/ipv6' ]]; then local ipv6_enabled=0 - ipv6_status_text='Off' + local ipv6_status_text='Off' if [[ $(ip -6 a) ]]; then ipv6_enabled=1 @@ -2826,7 +2805,7 @@ _EOF_ local ipv4_preferred=0 local ipv4_status_text='Off' - if [[ -f /etc/apt/apt.conf.d/99-dietpi-force-ipv4 ]]; then + if [[ -f '/etc/apt/apt.conf.d/99-dietpi-force-ipv4' ]]; then ipv4_preferred=1 ipv4_status_text='On' @@ -2854,11 +2833,10 @@ _EOF_ else /DietPi/dietpi/func/dietpi-set_hardware wifimodules onboard_enable + G_WHIP_MSG '[ INFO ] Onboard WiFi enabled\n\nNB: A reboot is required for the change to take effect.' fi - G_WHIP_MSG 'Onboard WiFi modules setting applied\n\nNB: A reboot is required for the changes to take effect.' - ;; 'IPv6') @@ -3050,8 +3028,7 @@ Would you like to disable WiFi? \n - (NOTICE) Connections may drop!'; then 'Disable') - G_WHIP_YESNO 'Would you like to disable the Ethernet adapter?\n - (NOTICE) All Ethernet connections will be dropped.' - if (( $? == 0 )); then + if G_WHIP_YESNO 'Would you like to disable the Ethernet adapter?\n - (NOTICE) All Ethernet connections will be dropped.'; then ETH_DISABLED=1 Network_ApplyChanges @@ -3107,17 +3084,9 @@ Would you like to disable WiFi? \n - (NOTICE) Connections may drop!'; then HOTSPOT_CHANNEL='' HOTSPOT_KEY='' - WiFi_Monitor_Disable(){ - - systemctl disable --now dietpi-wifi-monitor - - } - - WiFi_Monitor_Enable(){ + WiFi_Monitor_Disable(){ systemctl disable --now dietpi-wifi-monitor; } - G_RUN_CMD systemctl enable --now dietpi-wifi-monitor - - } + WiFi_Monitor_Enable(){ G_RUN_CMD systemctl enable --now dietpi-wifi-monitor; } # TARGETMENUID=10 Menu_NetworkAdapters_Wifi(){ @@ -3302,14 +3271,7 @@ Would you like to disable WiFi? \n - (NOTICE) Connections may drop!'; then '802.11 N') - ((hotspot_n_enabled++)) - - if (( $hotspot_n_enabled >= 2 )); then - - hotspot_n_enabled=0 - - fi - + (( $hotspot_n_enabled )) && hotspot_n_enabled=0 || hotspot_n_enabled=1 G_CONFIG_INJECT 'ieee80211n=' "ieee80211n=$hotspot_n_enabled" /etc/hostapd/hostapd.conf ;; @@ -3322,16 +3284,11 @@ Would you like to disable WiFi? \n - (NOTICE) Connections may drop!'; then 'Disable') - G_WHIP_YESNO 'Would you like to disable the WiFi adapter?\n - (NOTICE) All WiFi connections will be dropped.' - if (( $? == 0 )); then - - WIFI_DISABLED=1 - WiFi_Monitor_Disable - Network_ApplyChanges - - TARGETMENUID=8 - - fi + G_WHIP_YESNO 'Would you like to disable the WiFi adapter?\n - (NOTICE) All WiFi connections will be dropped.' || return + WIFI_DISABLED=1 + WiFi_Monitor_Disable + Network_ApplyChanges + TARGETMENUID=8 ;; diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 5a97e91a99..900f9a7e60 100644 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -293,7 +293,7 @@ _EOF_ #///////////////////////////////////////////////////////////////////////////////////// RemoteIR_Prereqs(){ G_AG_CHECK_INSTALL_PREREQ lirc; } - RemoteIR_Reset_All(){ + RemoteIR_Reset(){ # Disable JustBoom if (( $G_HW_MODEL < 10 )); then @@ -305,8 +305,7 @@ _EOF_ fi - sed -i '/^[[:blank:]]*dtoverlay=lirc-rpi/d' $FP_RPI_CONFIG - sed -i '/^[[:blank:]]*dtparam=gpio_in_pin=25/d' $FP_RPI_CONFIG + sed -i '/^[[:blank:]]*dtoverlay=gpio-ir/d' $FP_RPI_CONFIG # Disable Odroids elif (( $G_HW_MODEL < 20 )) && [[ -f '/etc/systemd/system/odroid-remote.service' ]]; then @@ -322,12 +321,13 @@ _EOF_ (( $G_HW_MODEL > 19 )) && { Unsupported_Input_Name; return 1; } # Exit path for non-Odroid/non-RPi + RemoteIR_Reset + if [[ $INPUT_DEVICE_VALUE == 'odroid_remote' ]]; then (( $G_HW_MODEL < 10 )) && { Unsupported_Input_Mode; return 1; } # Exit path for non-Odroid RemoteIR_Prereqs - RemoteIR_Reset_All # XU4 Cloudshell if (( $G_HW_MODEL == 11 )); then @@ -393,10 +393,8 @@ _EOF_ (( $G_HW_MODEL > 9 )) && { Unsupported_Input_Mode; return 1; } # Exit path for non-RPi RemoteIR_Prereqs - RemoteIR_Reset_All - G_CONFIG_INJECT 'dtoverlay=lirc-rpi' 'dtoverlay=lirc-rpi' $FP_RPI_CONFIG - G_CONFIG_INJECT 'dtparam=gpio_in_pin=' 'dtparam=gpio_in_pin=25' $FP_RPI_CONFIG + G_CONFIG_INJECT 'dtoverlay=gpio-ir' 'dtoverlay=gpio-ir,gpio_pin=25' $FP_RPI_CONFIG cat << _EOF_ > /etc/lirc/hardware.conf LIRCD_ARGS="--uinput" @@ -514,11 +512,7 @@ _EOF_ systemctl daemon-reload systemctl enable --now justboom-ir-mpd - elif [[ $INPUT_DEVICE_VALUE == 'none' ]]; then - - RemoteIR_Reset_All - - else + elif [[ $INPUT_DEVICE_VALUE != 'none' ]]; then Unknown_Input_Mode @@ -1048,22 +1042,32 @@ _EOF_ ) - [[ -f '/etc/modprobe.d/disable_bt.conf' ]] && rm /etc/modprobe.d/disable_bt.conf + [[ -f '/etc/modprobe.d/dietpi-disable_bluetooth.conf' ]] && rm /etc/modprobe.d/dietpi-disable_bluetooth.conf - # - Disable if [[ $INPUT_DEVICE_VALUE == 'disable' ]]; then - # + all Broadcom-based models that need brcm_patchram_plus - if (( $G_HW_MODEL == 61 || $G_HW_MODEL == 62 )); then + # RPi: Disable service for all (failsafe) + if (( $G_HW_MODEL < 10 )); then - systemctl disable --now brcm_patchram_plus 2> /dev/null + systemctl disable --now hciuart 2> /dev/null + # - Enable dtoverlay only for onboard WiFi/BT models + if (( $HW_ONBOARD_WIFI )); then - # + RPi 3 (apply to all, as pi-bluetooth package is default installed on all RPi's now) - # + ASUS TB - elif (( $G_HW_MODEL < 10 || $G_HW_MODEL == 52 )); then + G_CONFIG_INJECT 'dtoverlay=disable-bt' 'dtoverlay=disable-bt' $FP_RPI_CONFIG + dtoverlay disable-bt + + fi + + # ASUS TB + elif (( $G_HW_MODEL == 52 )); then systemctl disable --now hciuart 2> /dev/null + # Broadcom-based models that need brcm_patchram_plus + elif (( $G_HW_MODEL == 61 || $G_HW_MODEL == 62 )); then + + systemctl disable --now brcm_patchram_plus 2> /dev/null + fi # Bluetooth last @@ -1073,7 +1077,7 @@ _EOF_ do modprobe -rf "${aBLUETOOTH_MODULES[$i]}" 2> /dev/null - echo "blacklist ${aBLUETOOTH_MODULES[$i]}" >> /etc/modprobe.d/disable_bt.conf + echo "blacklist ${aBLUETOOTH_MODULES[$i]}" >> /etc/modprobe.d/dietpi-disable_bluetooth.conf done @@ -1085,7 +1089,6 @@ _EOF_ fi - # - Enable elif [[ $INPUT_DEVICE_VALUE == 'enable' ]]; then # Pre-Reqs @@ -1107,6 +1110,9 @@ Do you want to continue and disable the serial login console?'; then fi + # - Remove dtoverlay + sed -i '/^[[:blank:]]*dtoverlay=disable-bt/d' $FP_RPI_CONFIG + G_AG_CHECK_INSTALL_PREREQ pi-bluetooth else @@ -1124,7 +1130,7 @@ Do you want to continue and disable the serial login console?'; then done - # + all Broadcom-based models that need brcm_patchram_plus + # Broadcom-based models that need brcm_patchram_plus if (( $G_HW_MODEL == 61 || $G_HW_MODEL == 62 )); then G_RUN_CMD systemctl enable --now brcm_patchram_plus @@ -1133,12 +1139,8 @@ Do you want to continue and disable the serial login console?'; then G_RUN_CMD systemctl enable --now bluetooth - # + RPi - if (( $G_HW_MODEL < 10 )); then - - G_RUN_CMD systemctl enable --now hciuart - - fi + # RPi + (( $G_HW_MODEL < 10 )) && G_RUN_CMD systemctl enable --now hciuart else @@ -1248,6 +1250,7 @@ Do you want to continue and disable the serial login console?'; then Wifi_Modules_Main(){ + # Estimate module list # - All local aWIFI_MODULES=('cfg80211') @@ -1297,36 +1300,53 @@ Do you want to continue and disable the serial login console?'; then fi - # - Disable + # APT packages + local packages='crda iw rfkill wireless-tools wpasupplicant' + if [[ $INPUT_DEVICE_VALUE == 'disable' ]]; then - [[ -f '/etc/modprobe.d/disable_wifi.conf' ]] && rm /etc/modprobe.d/disable_wifi.conf + # Disable onboard WiFi as well + (( $HW_ONBOARD_WIFI )) && INPUT_DEVICE_VALUE='onboard_disable' Wifi_Modules_Main + + # Reset blacklists and remove powersaving settings + > /etc/modprobe.d/dietpi-disable_wifi.conf + [[ -f '/etc/modprobe.d/dietpi-disable_wifi_powersaving.conf' ]] && rm /etc/modprobe.d/dietpi-disable_wifi_powersaving.conf # cfg80211 last for ((i=$(( ${#aWIFI_MODULES[@]} - 1 )); i>=0; i--)) do + echo "blacklist ${aWIFI_MODULES[$i]}" >> /etc/modprobe.d/dietpi-disable_wifi.conf modprobe -rf "${aWIFI_MODULES[$i]}" 2> /dev/null - echo "blacklist ${aWIFI_MODULES[$i]}" >> /etc/modprobe.d/disable_wifi.conf done - # - Enable - elif [[ $INPUT_DEVICE_VALUE == 'enable' ]]; then + if G_WHIP_YESNO 'Would you like to purge all WiFi related APT packages? + - (NOTICE) This will free up space, but an internet-capable Ethernet connection is required to re-enable WiFi functionality.'; then - # - Install prereqs - local pre_req_packages='crda iw rfkill wireless-tools wpasupplicant' + G_AGP $packages + G_AGA - G_AG_CHECK_INSTALL_PREREQ $pre_req_packages || exit 1 + fi - [[ -f '/etc/modprobe.d/disable_wifi.conf' ]] && rm /etc/modprobe.d/disable_wifi.conf + elif [[ $INPUT_DEVICE_VALUE == 'enable' ]]; then - # - Disable known powersaving options for specific chipsets - echo 'options 8192cu rtw_power_mgnt=0' > /etc/modprobe.d/8192cu.conf - echo 'options 8188eu rtw_power_mgnt=0' > /etc/modprobe.d/8188eu.conf - echo 'options 8189es rtw_power_mgnt=0' > /etc/modprobe.d/8189es.conf # OPi Plus - echo 'options 8723bs rtw_power_mgnt=0' > /etc/modprobe.d/8723bs.conf # Pine A64 - echo 'options wlan_8192eu rtw_power_mgnt=0' > /etc/modprobe.d/wlan_8192eu.conf # Sparky/Allo WiFi + # Disable known powersaving options for specific chipsets + cat << _EOF_ > /etc/modprobe.d/dietpi-disable_wifi_powersaving.conf +options 8192cu rtw_power_mgnt=0 +options 8188eu rtw_power_mgnt=0 +# OPi Plus +options 8189es rtw_power_mgnt=0 +# Pine A64 +options 8723bs rtw_power_mgnt=0 +# Sparky/Allo WiFi +options wlan_8192eu rtw_power_mgnt=0 +_EOF_ + + # Remove blacklists + [[ -f '/etc/modprobe.d/dietpi-disable_wifi.conf' ]] && rm /etc/modprobe.d/dietpi-disable_wifi.conf + + G_DIETPI-NOTIFY 2 'Please wait, enabling WiFi modules...' # cfg80211 first for i in "${aWIFI_MODULES[@]}" @@ -1336,36 +1356,29 @@ Do you want to continue and disable the serial login console?'; then done - # - Delay. Without this, kernel reports WiFi device not found with RPi 3 and Pine A64 addon board, when ran straight after this script. - G_DIETPI-NOTIFY 2 'Please wait, enabling WiFi Modules...' - # - Had to up the delay from 3 seconds to 8 seconds on WPA2-Enterprise, otherwise still get device not found error. + # - Delay to allow modules + WPA2-Enterprise being fully loaded and avoid device not found error sleep 8 + # Install required APT packages + G_AG_CHECK_INSTALL_PREREQ $packages || EXIT_CODE=1 + # + RPi 3+, unlock scan+wifi https://github.com/MichaIng/DietPi/issues/1627 rfkill unblock wifi &> /dev/null - # Update our networking file (refresh active wlan index) - /DietPi/dietpi/func/obtain_network_details - elif [[ $INPUT_DEVICE_VALUE == 'onboard_enable' ]]; then (( $HW_ONBOARD_WIFI )) || { Unsupported_Input_Mode; return 1; } - # NB: Requires reboot - # NB: Do not change filenames, -f check used by DietPi-Config to obtain state - - [[ -f '/etc/modprobe.d/disable_wifi_rpi3_onboard.conf' ]] && rm /etc/modprobe.d/disable_wifi_rpi3_onboard.conf + # Remove dtoverlay + sed -i '/^[[:blank:]]*dtoverlay=disable-wifi/d' $FP_RPI_CONFIG elif [[ $INPUT_DEVICE_VALUE == 'onboard_disable' ]]; then (( $HW_ONBOARD_WIFI )) || { Unsupported_Input_Mode; return 1; } - # NB: Requires reboot - # NB: Do not change filenames, -f check used by DietPi-Config to obtain state - - # - RPi 3/Zero W - echo 'blacklist brcmfmac' > /etc/modprobe.d/disable_wifi_rpi3_onboard.conf - echo 'blacklist brcmutil' >> /etc/modprobe.d/disable_wifi_rpi3_onboard.conf + # Disable via dtoverlay + G_CONFIG_INJECT 'dtoverlay=disable-wifi' 'dtoverlay=disable-wifi' $FP_RPI_CONFIG + dtoverlay disable-wifi else @@ -1373,6 +1386,9 @@ Do you want to continue and disable the serial login console?'; then fi + # Update our networking file (refresh active wlan index) + /DietPi/dietpi/func/obtain_network_details + } Wifi_Countrycode_Main(){ diff --git a/dietpi/patch_file b/dietpi/patch_file index ccaed42e63..8d24eb8646 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2095,18 +2095,46 @@ A backup will be created to "/etc/mympd/mympd.conf.bak_DDMMYYY_N" from where you # Remove obsolete audio related services/scripts/settings: https://github.com/MichaIng/DietPi/pull/2988 # RPi: Remove invalid I2C baudrate entries from config.txt. Do no apply any value to preserve current system state (default): https://github.com/MichaIng/DietPi/issues/2966 # RPi: Remove obsolete camera module entry, which is loaded by default since kernel 4.19, instead add a blacklist entry if camera is disabled. + # RPi: Further config.txt fixes: https://github.com/MichaIng/DietPi/pull/3000 [[ -f '/var/lib/dietpi/postboot.d/sparky_unmute.sh' ]] && rm /var/lib/dietpi/postboot.d/sparky_unmute.sh [[ -f '/etc/systemd/system/rpi-bcm2835_forced_3.5mm.service' ]] && rm /etc/systemd/system/rpi-bcm2835_forced_3.5mm.service if (( $G_HW_MODEL < 10 )); then sed -i '/dtoverlay=i2s-mmap/d' /DietPi/config.txt sed -i '/dtoverlay=i2s=/d' /DietPi/config.txt + sed -i '/dtoverlay=lirc-rpi/d' /DietPi/config.txt + sed -i '/^[[:blank:]]*dtparam=gpio_in_pin=25/d' /DietPi/config.txt sed -i '/^[[:blank:]]*i2c_arm_baudrate=/d' /DietPi/config.txt sed -i '/^[[:blank:]]*bcm2835-v4l2/d' /etc/modules grep -q '^[[:blank:]]*start_x=1' /DietPi/config.txt || /DietPi/dietpi/func/dietpi-set_hardware rpi-camera disable + if [[ -f '/etc/modprobe.d/disable_bt.conf' ]]; then + + G_CONFIG_INJECT 'dtoverlay=disable-bt' 'dtoverlay=disable-bt' /DietPi/config.txt + dtoverlay disable-bt + + fi + if [[ -f '/etc/modprobe.d/disable_wifi_rpi3_onboard.conf' ]]; then + + G_CONFIG_INJECT 'dtoverlay=disable-wifi' 'dtoverlay=disable-wifi' /DietPi/config.txt + dtoverlay disable-wifi + + fi fi #------------------------------------------------------------------------------- + # Config file renaming: https://github.com/MichaIng/DietPi/pull/3000 + [[ -f '/etc/modprobe.d/disable_bt.conf' ]] && mv /etc/modprobe.d/disable_bt.conf /etc/modprobe.d/dietpi-disable_bluetooth.conf + [[ -f '/etc/modprobe.d/disable_wifi.conf' ]] && mv /etc/modprobe.d/disable_wifi.conf /etc/modprobe.d/dietpi-disable_wifi.conf + [[ -f '/etc/modprobe.d/disable_wifi_rpi3_onboard.conf' ]] && rm /etc/modprobe.d/disable_wifi_rpi3_onboard.conf + for i in '8192cu' '8188eu' '8189es' '8723bs' 'wlan_8192eu' + do + + [[ -f /etc/modprobe/${i}.conf ]] || continue + cat /etc/modprobe/${i}.conf >> /etc/modprobe.d/dietpi-disable_wifi_powersaving.conf + rm /etc/modprobe/${i}.conf + + done + #------------------------------------------------------------------------------- fi From 798194d07f7801c3b358858a9ca34ca6ab8f5560 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Wed, 24 Jul 2019 01:15:49 +0200 Subject: [PATCH 046/184] v6.26 + DietPi-Software | EmonHub: Fix renamed dtoverlay to disable Bluetooth on install. Disable via DietPi-Set_hardware on all onboard WiFi/BT devices, although research/test on RPi4 required to verify Bluetooth blocks ttyAMA0 there as well. + DietPi-Software | EmonHub: Disable serial console only on ttyAMA0, else primary UART device will be disabled as well, which is ttyAMA0 on non-WiFi RPi models. Instead assure on non-WiFi RPi models that this UART device is enabled. --- dietpi/dietpi-software | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index edc30f4719..cacb3c42b5 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9940,40 +9940,31 @@ _EOF_ Banner_Configuration - # - Copy configs + # Copy config cp /etc/emonhub/conf/default/emonhub /etc/default/emonhub - # - Setup service + # Setup service cp /etc/emonhub/service/emonhub /etc/init.d/emonhub chmod +x /etc/init.d/emonhub update-rc.d emonhub defaults chmod +x -R /etc/emonhub - # RPI 3 - Must disable BCM BT to recover UART 0 - #RPI4: test required. - if (( $G_HW_MODEL == 3 )); then + # Disable onboard Bluetooth, if present, to recover ttyAMA0 + # RPi4: Test required + if (( $(sed -n 10p /DietPi/dietpi/.hw_model) )); then - # - Add DToverlay to disable bluetooth - if ! grep -qi '=pi3-disable-bt' /DietPi/config.txt; then + /DietPi/dietpi/func/dietpi-set_hardware bluetooth disable - echo -e '\ndtoverlay=pi3-disable-bt' >> /DietPi/config.txt - - # - Enable - else - - sed -i '/pi3-disable-bt/c\dtoverlay=pi3-disable-bt' /DietPi/config.txt - - fi + # Else, assure that primary UART is enabled, which is ttyAMA0 on non-onboard WiFi/BT models + else - # - Disable bluetooth service - systemctl stop hciuart - systemctl disable hciuart + G_CONFIG_INJECT 'enable_uart=' 'enable_uart=1' $FP_RPI_CONFIG fi - #RPi - Disable serial tty that emonPi uses. - /DietPi/dietpi/func/dietpi-set_hardware serialconsole disable + # Disable console on ttyAMA0 + /DietPi/dietpi/func/dietpi-set_hardware serialconsole disable ttyAMA0 # - Apply user API KEY USER_EMONHUB_APIKEY_CURRENT=$(grep -m1 '^[[:blank:]]*SOFTWARE_EMONHUB_APIKEY=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') From 7637b82e29f7b05bb550dd8adb58e00cc255daa1 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Wed, 24 Jul 2019 01:23:43 +0200 Subject: [PATCH 047/184] v6.26 + RPi | config.txt: Minor wording --- config.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config.txt b/config.txt index 43f7dce412..4f35cbb08e 100644 --- a/config.txt +++ b/config.txt @@ -63,13 +63,13 @@ gpu_mem_1024=16 #-------Max USB current--------- max_usb_current=1 -#-------Disable Pi splash screen on boot----------- +#-------Boot splash screen------ disable_splash=1 -#-------SoundCard------- +#-------Onboard sound---------- dtparam=audio=off -#-------I²C------------- +#-------I2C------------- dtparam=i2c_arm=off dtparam=i2c1=off #dtparam=i2c_arm_baudrate=100000 @@ -78,7 +78,7 @@ dtparam=i2c1=off dtparam=spi=off #-------Serial/UART----- -# NB: Enabled for 1st run only, if you want to keep this setting, please set CONFIG_SERIAL_CONSOLE_ENABLE=1 in /DietPi/dietpi.txt. +# NB: Enabled for 1st run only. If you want to keep this setting, please set CONFIG_SERIAL_CONSOLE_ENABLE=1 in dietpi.txt before 1st boot. # NB: "enable_uart=1" will forcefully set "core_freq=250" on WiFi/BT-capable RPi models, unless "force_turbo=1" is set as well. enable_uart=1 From 12e55c960627413489fc6e702e700e670ae8cded Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Wed, 24 Jul 2019 14:25:09 +0200 Subject: [PATCH 048/184] v6.26 + DietPi-PREP | Remove additional users, groups and dirs, found on current NanoPi NEO2 image with OMV remains: https://github.com/MichaIng/DietPi/issues/2994#issuecomment-514452109 --- PREP_SYSTEM_FOR_DIETPI.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index 617baea862..c4bd23d0b8 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -968,7 +968,7 @@ _EOF_ G_DIETPI-NOTIFY 2 '-----------------------------------------------------------------------------------' #------------------------------------------------------------------------------------------------ - G_DIETPI-NOTIFY 2 'Deleting list of known users, not required by DietPi' + G_DIETPI-NOTIFY 2 'Deleting list of known users and groups, not required by DietPi' getent passwd pi &> /dev/null && userdel -f pi getent passwd test &> /dev/null && userdel -f test # @fourdee @@ -977,6 +977,14 @@ _EOF_ getent passwd linaro &> /dev/null && userdel -f linaro # ASUS TB getent passwd dietpi &> /dev/null && userdel -f dietpi # recreated below getent passwd debian &> /dev/null && userdel -f debian # BBB + getent passwd openmediavault-webgui &> /dev/null && userdel -f openmediavault-webgui # OMV (NanoPi NEO2) + getent passwd admin &> /dev/null && userdel -f admin # OMV (NanoPi NEO2) + getent passwd fa &> /dev/null && userdel -f fa # OMV (NanoPi NEO2) + getent passwd colord &> /dev/null && userdel -f colord # OMV (NanoPi NEO2) + getent passwd saned &> /dev/null && userdel -f saned # OMV (NanoPi NEO2) + getent group openmediavault-config &> /dev/null && groupdel openmediavault-config # OMV (NanoPi NEO2) + getent group openmediavault-engined &> /dev/null && groupdel openmediavault-engined # OMV (NanoPi NEO2) + getent group openmediavault-webgui &> /dev/null && groupdel openmediavault-webgui # OMV (NanoPi NEO2) G_DIETPI-NOTIFY 2 'Removing misc files/folders/services, not required by DietPi' @@ -1055,6 +1063,7 @@ _EOF_ [[ -d '/var/log.hdd' ]] && rm -R /var/log.hdd # - OMV: https://github.com/MichaIng/DietPi/issues/2994 + [[ -d '/etc/openmediavault' ]] && rm -R /etc/openmediavault rm -f /etc/cron.*/openmediavault* rm -f /usr/sbin/omv-* @@ -1088,14 +1097,14 @@ _EOF_ ln -sf /etc/profile.d/bash_completion.sh /etc/bashrc.d/dietpi-bash_completion.sh #----------------------------------------------------------------------------------- - #Create_DietPi_User + # DietPi user l_message='Creating DietPi User Account' G_RUN_CMD /DietPi/dietpi/func/dietpi-set_software useradd dietpi #----------------------------------------------------------------------------------- - #UID bit for sudo: https://github.com/MichaIng/DietPi/issues/794 + # UID bit for sudo: https://github.com/MichaIng/DietPi/issues/794 - G_DIETPI-NOTIFY 2 'Configuring Sudo UID bit' + G_DIETPI-NOTIFY 2 'Configuring sudo UID bit' chmod 4755 $(which sudo) From f9a2cdfec6b8aecfbd8387770dd762e5fba33666 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Thu, 25 Jul 2019 18:08:31 +0200 Subject: [PATCH 049/184] v6.26 + DietPi-Globals | G_DIETPI-NOTIFY -2: When calculating output lines, include $G_PROGRAM_NAME prefix if set + DietPi-Globals | G_DISTRO_NAME: Add initial Debian Bullseye recognition. Needs to be defined in DietPi-Obtain_HW_model as well! + DietPi-Globals | G_ERROR_HANDLER: Do not pre-declare any $G_ERROR_HANDLER_* variables to reduce variable count in shell sessions. Check those via [[ ]] against non-default value being set. + DietPi-Globals | Minor coding and wording --- dietpi/func/dietpi-globals | 226 +++++++++++++++---------------------- 1 file changed, 90 insertions(+), 136 deletions(-) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 1641f2c01c..a6c9dd8fa9 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -23,15 +23,17 @@ unset G_PROGRAM_NAME # Debug mode - # - Do no pre-generate to reduce bash session variables: Needs to be checked via: [[ $G_DEBUG == 1 ]] + # - Do no pre-generate to reduce bash session variables => Needs to be checked via: [[ $G_DEBUG == 1 ]] #G_DEBUG=${G_DEBUG:-0} - # Flag, if we are in interactive shell, by checking STDIN availability - # OK | systemd = non-STDIN - # OK | Cron = non-STDIN - # NB | ~/.bashrc = STDIN + # Interactive mode # - Affects whether G_ERROR_ and G_WHIP_ prompts are displayed or not - # NB: You can export G_USER_INPUTS=0 to force non-interactive/automated scipt calls. Run 'unset G_USER_INPUTS' afterwards to return to auto detection. + # - Run "export G_USER_INPUTS=0" prior to script call to force non-interactive/automated mode. + # - Run "unset G_USER_INPUTS" afterwards to return to auto detection. + # - If not set, check for STDIN availability: + # OK | systemd = no STDIN + # OK | Cron = no STDIN + # NB | /etc/profile, ~/.profile, /etc/profile.d/, /etc/bash.bashrc, ~/.bashrc and /etc/bashrc.d/ can all be interactive since those are sourced from originating shell/bash session. if [[ $G_USER_INPUTS != [01] ]]; then [[ -t 0 ]] && G_USER_INPUTS=1 || G_USER_INPUTS=0 @@ -41,7 +43,7 @@ # DietPi First-Run Stage | -2 = PREP_SYSTEM/Unknown | -1 = 1st boot | 0 = 1st run dietpi-update | 1 = 1st run dietpi-software | 2 = completed | 10 = Pre-installed image, converts to 2 during 1st boot [[ -f '/DietPi/dietpi/.install_stage' ]] && G_DIETPI_INSTALL_STAGE=$( Needs to be checked via: [[ $G_DIETPI_SERVICES_DISABLE == 1 ]] #G_DIETPI_SERVICES_DISABLE=${G_DIETPI_SERVICES_DISABLE:-0} # Device details @@ -100,15 +102,19 @@ _EOF_ G_DISTRO_NAME='buster' + elif (( $G_DISTRO == 6 )); then + + G_DISTRO_NAME='bullseye' + fi fi - # INIT functions for originating script - # - Stuff we can't init in main globals/funcs due to /etc/bashrc.d/ load into current session. + # Init functions for originating script + # - Stuff we can't init in main globals/funcs due to /etc/bashrc.d/ load into login session. # - Optional input variables: - # G_INIT_ALLOW_CONCURRENT=1 => Allow concurrent DietPi script execution (default: 0) - # G_INIT_WAIT_CONCURRENT= => Max time to wait for concurrent execution to exit before user prompt (default: 5) + # G_INIT_ALLOW_CONCURRENT=1 = Allow concurrent DietPi script execution (default: 0) + # G_INIT_WAIT_CONCURRENT= = Max time to wait for concurrent execution to exit before user prompt (default: 5) G_INIT(){ # Set G_PROGRAM_NAME to originating command if it was not set by originating script @@ -155,13 +161,13 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then fi - # HIERARCHY system for G_DIETPI-NOTIFY 3 + # HIERARCHY system for G_DIETPI-NOTIFY 3 to reduce highlight or sub script output disable_error=1 G_CHECK_VALIDINT "$HIERARCHY" 0 && export HIERARCHY=$((HIERARCHY+1)) || export HIERARCHY=0 # Set locale for scripts to prevent incorrect scraping due to translated command outputs export LC_ALL='en_GB.UTF-8' - # Declare and trap G_EXIT() as exit function, that runs on EXIT signal, which includes INT (error) and TERM (kill) + # Declare exit trap, that runs on EXIT signal, which includes INT (interruption) and TERM (kill) G_EXIT(){ # - Navigate to /tmp, if we are inside working dir, which is about to be removed @@ -171,7 +177,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then else - [[ $G_DEBUG == 1 ]] && G_DIETPI-NOTIFY 2 "Failed to navigate to /tmp" + [[ $G_DEBUG == 1 ]] && G_DIETPI-NOTIFY 2 'Failed to navigate to /tmp' fi @@ -343,7 +349,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then } # Calculate the amount of output lines and in case move cursor up for correct animation and to allow cleaning the whole output. - local input_string=$(mawk '{gsub("\\\e[[0-9][;0-9]*m","");print}' <<< "$*") # Remove colour codes + local input_string=$(mawk '{gsub("\\\e[[0-9][;0-9]*m","");print}' <<< "${G_PROGRAM_NAME+$G_PROGRAM_NAME | }$*") # Remove colour codes local screen_width=${G_WHIP_SIZE_X_OVERRIDE:-$(tput cols)} # Use override value in case STDOUT + STDERR are redirected local output_lines=$(( ( ${#input_string} + 5 ) / $screen_width )) # +5 = [ .... ] - $1 (( $output_lines )) && echo -ne "\e[${output_lines}A" @@ -398,7 +404,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then elif (( $1 == 3 )); then Clean_Process_Animation - if disable_error=1 G_CHECK_VALIDINT $HIERARCHY && (( $HIERARCHY > 0 )); then + if disable_error=1 G_CHECK_VALIDINT "$HIERARCHY" 1; then local status_subfunction="$HIERARCHY " # > 9 should never occur, however, if it is, lets make it line up regardless @@ -451,7 +457,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then else export G_CHECK_ROOT_USER_VERIFIED=1 - G_DIETPI-NOTIFY 0 'Root access verified.' + G_DIETPI-NOTIFY 0 'Root access verified' fi @@ -472,7 +478,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then else export G_CHECK_ROOTFS_RW_VERIFIED=1 - G_DIETPI-NOTIFY 0 'RootFS R/W access verified.' + G_DIETPI-NOTIFY 0 'RootFS R/W access verified' fi @@ -484,13 +490,13 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then # Alias defines #----------------------------------------------------------------------------------- # DietPi scripts, moved from /etc/bash.bashrc - # - sudo command that ensures DietPi-Globals with G_* commands are loaded + # - sudo wrapper that ensures DietPi-Globals with G_* commands are loaded G_SUDO(){ local input=$@; sudo bash -c ". /DietPi/dietpi/func/dietpi-globals && $input"; } - # - sudo alias that allows running other aliases with "sudo" - alias sudo='sudo ' # https://github.com/MichaIng/DietPi/issues/424 + # - sudo alias that allows running other aliases with "sudo": https://github.com/MichaIng/DietPi/issues/424 + alias sudo='sudo ' # - DietPi programs - alias dietpi-process_tool='/DietPi/dietpi/dietpi-services' #Leave this in for few versions for end users, due to switchover to dietpi-services + alias dietpi-process_tool='/DietPi/dietpi/dietpi-services' # Leave this in for few versions for end users, due to switchover to dietpi-services alias dietpi-letsencrypt='/DietPi/dietpi/dietpi-letsencrypt' alias dietpi-autostart='/DietPi/dietpi/dietpi-autostart' alias dietpi-cron='/DietPi/dietpi/dietpi-cron' @@ -516,9 +522,6 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then # - 1337 moments ;) alias 1337='echo Indeed, you are =\)' - # - Helpers - #alias dd='dd status=progress ' # needs to be at end... - # - Optional DietPi software aliases/functions [[ -d '/var/lib/dietpi/dietpi-software/installed/dietpi-nordvpn' ]] && alias dietpi-nordvpn='/DietPi/dietpi/misc/dietpi-nordvpn' [[ -f '/opt/retropie/supplementary/emulationstation/emulationstation' ]] && alias emulationstation='/opt/retropie/supplementary/emulationstation/emulationstation' @@ -1004,47 +1007,35 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then # DietPi Error Handler # https://github.com/MichaIng/DietPi/issues/1311#issuecomment-353716344 #----------------------------------------------------------------------------------- - G_ERROR_HANDLER_EXITCODE=0 # input value to use with G_ERROR_HANDLER - G_ERROR_HANDLER_EXITCODE_RETURN=0 # Same as above, but not destroyed during G_ERROR_HANDLER_RESET, allowing us to return it in funcs - G_ERROR_HANDLER_COMMAND='' # eg: G_AGI: moooooooo - # For export: On error, following entries will be used - G_ERROR_HANDLER_NO_FAIL=0 # Always report a success, regardless of the exit code | G_USER_INPUTS=0 is not required for this - G_ERROR_HANDLER_INFO_ONLY=0 # Only print info and retry options, no exit or bug report, sets G_ERROR_HANDLER_ONERROR_EXIT=0 automatically - G_ERROR_HANDLER_ONERROR_EXIT=1 # Do we exit the program when the error occurs? 0=no 1=yes - G_ERROR_HANDLER_ONERROR_FPLOGFILE='' # FP to logfile, if available - G_ERROR_HANDLER_RETRY=0 # Used in func with while loop to re-run func as needed + # Required input: + # - G_ERROR_HANDLER_COMMAND= | Command name for print out + # - G_ERROR_HANDLER_EXITCODE= | Commands exit code + # Optional input: + # - G_ERROR_HANDLER_NO_FAIL=1 | Always report a success, regardless of the exit code | G_USER_INPUTS=0 is not required for this + # - G_ERROR_HANDLER_INFO_ONLY=1 | Only print info and retry options, no exit or bug report, sets G_ERROR_HANDLER_ONERROR_EXIT=0 automatically + # - G_ERROR_HANDLER_ONERROR_EXIT=0 | Do not exit the script on error + # - G_ERROR_HANDLER_RETRY=1 | Allow to retry the command. Requires loop in originating script! + # - G_ERROR_HANDLER_ONERROR_FPLOGFILE= | File path to commands logfile, if available + # - l_message | Alternative text to print on success, less cryptic for end user + # Output: + # - G_ERROR_HANDLER_EXITCODE_RETURN= | Contains $G_ERROR_HANDLER_EXITCODE, but is not destroyed during G_ERROR_HANDLER_RESET(), allowing us to call afterwards # Runs automatically after G_ERROR_HANDLER to reset vars to default G_ERROR_HANDLER_RESET(){ G_ERROR_HANDLER_EXITCODE_RETURN=$G_ERROR_HANDLER_EXITCODE - # Delete if used: + # Delete logfile if used [[ $G_ERROR_HANDLER_ONERROR_FPLOGFILE && -f $G_ERROR_HANDLER_ONERROR_FPLOGFILE ]] && rm $G_ERROR_HANDLER_ONERROR_FPLOGFILE - # unset originating program - unset G_ERROR_HANDLER_EXITCODE - unset G_ERROR_HANDLER_COMMAND - - unset G_ERROR_HANDLER_NO_FAIL - unset G_ERROR_HANDLER_INFO_ONLY - unset G_ERROR_HANDLER_ONERROR_EXIT - unset G_ERROR_HANDLER_ONERROR_FPLOGFILE - unset G_ERROR_HANDLER_RETRY - - G_ERROR_HANDLER_EXITCODE=0 - G_ERROR_HANDLER_COMMAND='' - - G_ERROR_HANDLER_NO_FAIL=0 - G_ERROR_HANDLER_INFO_ONLY=0 - G_ERROR_HANDLER_ONERROR_EXIT=1 - G_ERROR_HANDLER_ONERROR_FPLOGFILE='' - G_ERROR_HANDLER_RETRY=0 + # Clear variables + unset G_ERROR_HANDLER_COMMAND G_ERROR_HANDLER_EXITCODE + unset G_ERROR_HANDLER_NO_FAIL G_ERROR_HANDLER_INFO_ONLY G_ERROR_HANDLER_ONERROR_EXIT + unset G_ERROR_HANDLER_RETRY G_ERROR_HANDLER_ONERROR_FPLOGFILE l_message } - # Handles exit code errors, as defined by G_ERROR_HANDLER_xxxx settings - # Usage: G_RUN_CMD dothis + # Handles exit code errors, as defined by G_ERROR_HANDLER_* settings G_ERROR_HANDLER(){ [[ $l_message ]] || local l_message=$G_ERROR_HANDLER_COMMAND @@ -1059,20 +1050,14 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then # Error else + (( $G_ERROR_HANDLER_INFO_ONLY )) && G_ERROR_HANDLER_ONERROR_EXIT=0 + local send_bugreport=0 local bugreport_id='N/A' - - if (( $G_ERROR_HANDLER_INFO_ONLY )); then - - G_ERROR_HANDLER_ONERROR_EXIT=0 - - fi - local version_info="v$G_DIETPI_VERSION_CORE.$G_DIETPI_VERSION_SUB.$G_DIETPI_VERSION_RC ($G_GITOWNER/$G_GITBRANCH)" - local print_hw_info="DietPi version: $version_info | HW_MODEL:$G_HW_MODEL | HW_ARCH:$G_HW_ARCH | DISTRO:$G_DISTRO" - local image_creator='n/a' - local preimage_name='n/a' + local image_creator='N/A' + local preimage_name='N/A' if [[ -r '/DietPi/dietpi/.prep_info' ]]; then image_creator=$(mawk 'NR==1 {print}' /DietPi/dietpi/.prep_info) @@ -1081,83 +1066,54 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then fi - local print_logfile_info="Log file contents:\n$(tail -50 $G_ERROR_HANDLER_ONERROR_FPLOGFILE)" - local print_report_to_dietpi_info='If problems persist, please report this to DietPi for investigation' + local logfile_content='N/A' + [[ $G_ERROR_HANDLER_ONERROR_FPLOGFILE ]] && logfile_content=$(tail -50 $G_ERROR_HANDLER_ONERROR_FPLOGFILE) + local print_report_to_dietpi_info='If problems persist, please report at https://github.com/MichaIng/DietPi/issues for investigation.' local print_unable_to_continue="Unable to continue, $G_PROGRAM_NAME will now terminate." G_DIETPI-NOTIFY 1 "$G_ERROR_HANDLER_COMMAND" - # Display "please report to dietpi", if its one of our programs - if [[ $G_PROGRAM_NAME && ! $G_ERROR_HANDLER_INFO_ONLY ]]; then - - G_DIETPI-NOTIFY 2 "$print_report_to_dietpi_info" - - fi + # Display "please report to dietpi", if it's one of our programs + [[ $G_PROGRAM_NAME && $G_ERROR_HANDLER_INFO_ONLY != 1 ]] && G_DIETPI-NOTIFY 2 "$print_report_to_dietpi_info" - # - On Error: Display whip version? + # If interactive, prompt whip message if (( $G_USER_INPUTS )); then - local whip_msg=() - if [[ $G_PROGRAM_NAME ]]; then + local whip_msg="${G_PROGRAM_NAME+$G_PROGRAM_NAME: }$G_ERROR_HANDLER_COMMAND + - Exit code: $G_ERROR_HANDLER_EXITCODE + - $print_hw_info + - Image creator: $image_creator + - Pre-image: $preimage_name" - whip_msg+="$G_PROGRAM_NAME: $G_ERROR_HANDLER_COMMAND" + # Display logfile if available + [[ $G_ERROR_HANDLER_ONERROR_FPLOGFILE ]] && whip_msg+="\n\nLog file content:\n$logfile_content" - else - - whip_msg+=$G_ERROR_HANDLER_COMMAND - - fi - - whip_msg+="\n - Exit code: $G_ERROR_HANDLER_EXITCODE" - whip_msg+="\n - $print_hw_info" - whip_msg+="\n - Image creator: $image_creator" - whip_msg+="\n - Pre-image: $preimage_name" - whip_msg+='\n\n' - - # Display optional logfile? - if [[ $G_ERROR_HANDLER_ONERROR_FPLOGFILE ]]; then - - whip_msg+=$print_logfile_info - whip_msg+='\n\n' - - fi + # Display "please report to dietpi", if its one of our programs + [[ $G_PROGRAM_NAME && $G_ERROR_HANDLER_INFO_ONLY != 1 ]] && whip_msg+="\n\n$print_report_to_dietpi_info" - # Display "please report to dietpi", if its one of our programs - if [[ $G_PROGRAM_NAME && ! $G_ERROR_HANDLER_INFO_ONLY ]]; then - - whip_msg+=$print_report_to_dietpi_info - - fi - - if (( $G_ERROR_HANDLER_ONERROR_EXIT )); then - - whip_msg+='\n\n' - whip_msg+=$print_unable_to_continue - - fi + [[ $G_ERROR_HANDLER_ONERROR_EXIT != 0 ]] && whip_msg+="\n\n$print_unable_to_continue" if (( $G_ERROR_HANDLER_RETRY )); then G_ERROR_HANDLER_RETRY=0 - local aretry_menu_options=() - local retry_menu_options_count=0 - aretry_menu_options+=('Retry' ': Re-run the last command that failed'); ((retry_menu_options_count++)) + local aretry_menu_options=('Retry' ': Re-run the last command that failed') + local retry_menu_options_count=1 - if ! ps aux | grep -qi '[d]ietpi-config' && (( ! $G_ERROR_HANDLER_INFO_ONLY )); then + if ! pgrep -cf 'dietpi-config' &> /dev/null && [[ $G_ERROR_HANDLER_INFO_ONLY != 1 ]]; then aretry_menu_options+=('DietPi-Config' ': Edit network, APT/NTP mirror settings etc'); ((retry_menu_options_count++)) fi - if [[ $G_PROGRAM_NAME && ! $G_ERROR_HANDLER_INFO_ONLY ]]; then + if [[ $G_PROGRAM_NAME && $G_ERROR_HANDLER_INFO_ONLY != 1 ]]; then aretry_menu_options+=('Send report' ': Uploads bugreport containing system info to DietPi'); ((retry_menu_options_count++)) fi - local no_button_text='Ignore' - (( $G_ERROR_HANDLER_ONERROR_EXIT )) && no_button_text='Exit' + local no_button_text='Exit' + [[ $G_ERROR_HANDLER_ONERROR_EXIT == 0 ]] && no_button_text='Ignore' local choice=$(whiptail --title 'DietPi Error Handler:' --menu "$whip_msg" --cancel-button "$no_button_text" --scrolltext 24 90 $retry_menu_options_count "${aretry_menu_options[@]}" 3>&1 1>&2 2>&3) if (( $? == 0 )); then @@ -1180,15 +1136,13 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then fi - unset aretry_menu_options - else whiptail --title 'DietPi Error Handler:' --msgbox "$whip_msg" --scrolltext 22 85 fi - # - No user inputs, disable retry + # If non-interactive, never retry else G_ERROR_HANDLER_RETRY=0 @@ -1196,25 +1150,25 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then fi # GitHub printout - if (( ! $G_ERROR_HANDLER_INFO_ONLY )); then + if [[ $G_ERROR_HANDLER_INFO_ONLY != 1 ]]; then echo -e " \e[41m --------------------------------------------------------------------- -- DietPi has encounted an error, and, is unable to continue - +--------------------------------------------------------------------- +- DietPi has encounted an error, and, is unable to continue - - Please create a ticket: https://github.com/MichaIng/DietPi/issues - -- Copy and paste the BLUE lines below, into the ticket - --------------------------------------------------------------------- +- Copy and paste the BLUE lines below, into the ticket - +--------------------------------------------------------------------- \e[0m \e[44m #### Details: - Date | $(date) - Bug report | $bugreport_id - DietPi version | $version_info -- Img creator | $image_creator +- Image creator | $image_creator - Pre-image | $preimage_name - SBC device | $G_HW_MODEL_DESCRIPTION (index=$G_HW_MODEL) -- Kernel version | $(uname -v) +- Kernel version | $(uname -a) - Distro | $G_DISTRO_NAME (index=$G_DISTRO) - Command | $G_ERROR_HANDLER_COMMAND - Exit code | $G_ERROR_HANDLER_EXITCODE @@ -1226,7 +1180,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then 2. ... #### Expected behaviour: - + - ... #### Actual behaviour: @@ -1239,25 +1193,25 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then #### Additional logs: \`\`\` -$print_logfile_info +$logfile_content \`\`\` \e[0m -\e[41m--------------------------------------------------------------------\e[0m +\e[41m---------------------------------------------------------------------\e[0m " > /tmp/.G_ERROR_HANDLER_GITREPORT fi if (( $send_bugreport )); then - # - Send automated bug report - killall -w dietpi-bugreport &> /dev/null + # Send automated bug report + killall -qw dietpi-bugreport &> /dev/null /DietPi/dietpi/dietpi-bugreport 1 fi - # - End - if (( ! $G_ERROR_HANDLER_RETRY )); then + # End + if [[ $G_ERROR_HANDLER_RETRY != 1 ]]; then if [[ -f '/tmp/.G_ERROR_HANDLER_GITREPORT' ]]; then @@ -1266,11 +1220,11 @@ $print_logfile_info fi - if (( $G_ERROR_HANDLER_ONERROR_EXIT )); then + if [[ $G_ERROR_HANDLER_ONERROR_EXIT != 0 ]]; then G_DIETPI-NOTIFY 1 "$print_unable_to_continue" G_ERROR_HANDLER_RESET - # - Kill current script, excluding shell + # Kill current script, excluding shell kill -INT $$ else From 54cbd941eee5016b193d8ac7e8800462bf58b98e Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Fri, 26 Jul 2019 19:23:39 +0200 Subject: [PATCH 050/184] v6.26 + DietPi-Software | Docker: Remove RPi workarounds for now. Raspbian Buster stable packages are live, although containerd seems to be not yet ARMv6 compatible. We'll re-add a pin to working version if this is not resolved until v6.26 release. + DietPi-Software | Docker: Error handle installer --- dietpi/dietpi-software | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index cacb3c42b5..c07868f4d4 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -5726,25 +5726,19 @@ If you want to update ${aSOFTWARE_WHIP_NAME[$software_id]}, please use it's inte INSTALL_URL_ADDRESS='https://get.docker.com' G_CHECK_URL "$INSTALL_URL_ADDRESS" - # Current workaround for faulty docker-ce repo version on RPi: https://github.com/MichaIng/DietPi/issues/2282 - (( $G_HW_MODEL < 10 )) && echo 'Package: docker-ce docker-ce-cli -Pin: version 5:18.09.0~3-0~raspbian-stretch -Pin-Priority: -1' > /etc/apt/preferences.d/dietpi-docker_fix - # Offical Docker installer wget "$INSTALL_URL_ADDRESS" -O DockerInstall.sh chmod +x DockerInstall.sh - ./DockerInstall.sh - rm DockerInstall.sh - # - Raspbian Buster branch is missing, so revert to Stretch: https://download.docker.com/linux/raspbian/dists/ - if (( $G_DISTRO > 4 && $G_HW_MODEL < 10 )) && ! G_ERROR_HANDLER_INFO_ONLY=1 G_USER_INPUTS=0 G_CHECK_URL 'https://download.docker.com/linux/raspbian/dists/buster/'; then + G_ERROR_HANDLER_COMMAND='./DockerInstall.sh' + G_ERROR_HANDLER_RETRY=1 + while (( $G_ERROR_HANDLER_RETRY )) + do - G_DIETPI-NOTIFY 2 'Docker repo misses a Raspbian Buster branch, reverting to Stretch...' - sed -i 's/[[:blank:]]buster[[:blank:]]/ stretch /' /etc/apt/sources.list.d/docker.list - G_AGUP - G_AGI docker-ce docker-ce-cli + ./DockerInstall.sh + G_ERROR_HANDLER - fi + done + rm DockerInstall.sh fi @@ -11697,7 +11691,7 @@ _EOF_ # Move docker containers to dietpi_userdata mkdir -p $G_FP_DIETPI_USERDATA/docker-data - if [[ -f /etc/docker/daemon.json ]]; then + if [[ -f '/etc/docker/daemon.json' ]]; then GCI_PRESERVE=1 G_CONFIG_INJECT '"data-root":' " \"data-root\": \"$G_FP_DIETPI_USERDATA/docker-data\"," /etc/docker/daemon.json '^\{([[:space:]]\|$)' @@ -13926,9 +13920,6 @@ _EOF_ # Remove default unused folder [[ -d '/var/lib/docker' ]] && rm -R /var/lib/docker - # Faulty "docker-ce" package version fix; This can be removed after repo got an update: https://github.com/MichaIng/DietPi/issues/2282 - [[ -f '/etc/apt/preferences.d/dietpi-docker_fix' ]] && rm /etc/apt/preferences.d/dietpi-docker_fix - fi software_id=164 From b9f2ad74b928cc2a7639033dbdf6c4df8eed598d Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Fri, 26 Jul 2019 19:26:06 +0200 Subject: [PATCH 051/184] v6.26 + DietPi-Patch | Docker: Remove obsolete RPi workaround, since a new version has been released --- dietpi/patch_file | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dietpi/patch_file b/dietpi/patch_file index 8d24eb8646..cf542bd062 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2122,6 +2122,9 @@ A backup will be created to "/etc/mympd/mympd.conf.bak_DDMMYYY_N" from where you fi #------------------------------------------------------------------------------- + # Docker: Remove obsolete RPi workaround, since a new version has been released + [[ -f '/etc/apt/preferences.d/dietpi-docker_fix' ]] && rm /etc/apt/preferences.d/dietpi-docker_fix + #------------------------------------------------------------------------------- # Config file renaming: https://github.com/MichaIng/DietPi/pull/3000 [[ -f '/etc/modprobe.d/disable_bt.conf' ]] && mv /etc/modprobe.d/disable_bt.conf /etc/modprobe.d/dietpi-disable_bluetooth.conf [[ -f '/etc/modprobe.d/disable_wifi.conf' ]] && mv /etc/modprobe.d/disable_wifi.conf /etc/modprobe.d/dietpi-disable_wifi.conf From 05b644d59a1d655a7db15dec99e6f3db895148f1 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Fri, 26 Jul 2019 20:17:12 +0200 Subject: [PATCH 052/184] v6.26 + DietPi-Globals | G_AGF: Allow to change held packages here as well, to be failsafe + DietPi-Globals | G_AG_CHECK_INSTALL_PREREQ: If packages need to be installed, as well update APT lists, to avoid outdated packages failing to fetch or if APT lists were moved to RAM and list update is outstanding after reboot. + DietPi-Globals | G_AG_CHECK_INSTALL_PREREQ: Minor coding and wording --- dietpi/func/dietpi-globals | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index a6c9dd8fa9..f8bd31c67d 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -1548,6 +1548,8 @@ $logfile_content G_CHECK_ROOT_USER 1 + local options='--allow-change-held-packages' + G_ERROR_HANDLER_RETRY=1 while (( $G_ERROR_HANDLER_RETRY )) do @@ -1558,7 +1560,7 @@ $logfile_content G_DIETPI-NOTIFY 2 '\e[0mAPT fix, please wait...' echo -ne '\e[90m' - DEBIAN_FRONTEND=noninteractive apt-get -qq -f install 2>&1 | tee $G_FP_LOG_APT + DEBIAN_FRONTEND=noninteractive apt-get -qq $options -f install 2>&1 | tee $G_FP_LOG_APT G_ERROR_HANDLER_EXITCODE=${PIPESTATUS[0]} G_ERROR_HANDLER @@ -1660,35 +1662,30 @@ $logfile_content G_CHECK_ROOT_USER 1 - local fp_temp='/tmp/.G_AG_CHECK_INSTALL_PREREQ' local exit_code=0 local string=$@ - local packages_to_install='' - - G_DIETPI-NOTIFY 2 "Checking for pre-req APT packages: \e[33m$string" + local i packages - dpkg --get-selections > $fp_temp - local i=0 - for i in $string; do + G_DIETPI-NOTIFY 2 "Checking for required APT packages: \e[33m$string" - if ! grep -qi "^$i[[:space:]]" $fp_temp; then - - G_DIETPI-NOTIFY 2 "Flagged for installation: \e[33m$i" - packages_to_install+=" $i" + for i in $string + do - fi + dpkg-query -s "$i" &> /dev/null && continue + G_DIETPI-NOTIFY 2 "Flagged for install: \e[33m$i" + packages+=" $i" done - rm $fp_temp - if [[ $packages_to_install ]]; then + if [[ $packages ]]; then - G_AGI $packages_to_install + G_AGUP + G_AGI $packages exit_code=$? else - G_DIETPI-NOTIFY 2 'Pre-req APT packages were already installed' + G_DIETPI-NOTIFY 0 'All required APT packages are already installed.' fi From 94f8519a48622c28499002a1f881e7ddd5da8bd1 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Fri, 26 Jul 2019 20:22:38 +0200 Subject: [PATCH 053/184] v6.26 + CHANGELOG | Resolved an issue where install of required APT packages for certain scripts could fail if APT lists are outdated --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 9169c805a5..cd133f56d4 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -11,6 +11,7 @@ Changes / Improvements / Optimisations: Bug Fixes: - General | Removed an obsolete OpenMediaVault cron job and binary that was leftover on at least one of our images (NanoPi NEO2) and is not part of the current OMV packages, thus save to remove in every case. Many thanks to @kt1024 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2994 +- General | Resolved an issue where install of required APT packages for certain scripts could fail in the rare case that APT lists are outdated and old packages are not available in the repo anymore. Many thanks to @Paulisper for reporting this issue: https://github.com/MichaIng/DietPi/issues/2996 - DietPi-Config | Resolved an issue on RPi where I2C baudrate was not applied correctly, thus selection was ineffective. Many thanks to @flashspys for reporting this issue: https://github.com/MichaIng/DietPi/issues/2966 - DietPi-Software | Gitea: Resolved an issue where install fails on ARMv7 systems. Many thanks to @maschiw for reporting this issue: https://github.com/MichaIng/DietPi/issues/2959 - DietPi-Software | Node-RED: Resolved an issue where install fails due to missing data dir creation. Many thanks to @Orfait for reporting this isssue: https://github.com/MichaIng/DietPi/issues/2975 From 460db780d4dde16668b1e6d23ca7c3309c3d8978 Mon Sep 17 00:00:00 2001 From: meeki007 Date: Sat, 27 Jul 2019 12:51:43 -0400 Subject: [PATCH 054/184] v6.26 (#3013) + RPi | Add commented "enable_tvout=1" to default config.txt for user info, since by default SDTV is disabled on RPi4: https://www.raspberrypi.org/documentation/configuration/config-txt/video.md --- config.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config.txt b/config.txt index 4f35cbb08e..4b686d706d 100644 --- a/config.txt +++ b/config.txt @@ -23,6 +23,8 @@ #framebuffer_width=1280 #framebuffer_height=720 +# SDTV - On the Raspberry Pi 4, composite output is disabled by default, # Uncomment to enable SDTV +#enable_tvout=1 # SDTV_MODES #sdtv_mode=0 From 6d8d6bbce6aab800c2ea9fafc8fdaf5f6add199b Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sat, 27 Jul 2019 19:04:02 +0200 Subject: [PATCH 055/184] v6.26 + DietPi-Config | APT cache: Add "(default)" suffix to the default value of each setting for user info. Fixes #3011 --- dietpi/dietpi-config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 164b0b9092..4c62514c90 100644 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1160,7 +1160,7 @@ More info here: https://www.raspberrypi.org/forums/viewtopic.php?p=105008#p10500 local item=$G_WHIP_RETURNED_VALUE G_WHIP_MENU_ARRAY=( - 'To disk' ": Move $item to disk" + 'To disk' ": Move $item to disk (default)" 'To RAM' ": Move $item to RAM" ) @@ -1175,7 +1175,7 @@ More info here: https://www.raspberrypi.org/forums/viewtopic.php?p=105008#p10500 [[ $option == 'RAM' ]] && G_WHIP_MSG '[ INFO ] APT lists have been moved to RAM.\n NB: You now need to run "apt update" or "G_AGUP" once after each reboot, before APT installs/upgrades can be done. - DietPi-Update and DietPi-Software will however do this automatically.' + DietPi scripts however will do this automatically on demand.' G_AGUP fi From 5a3b2c1094e3dadb3720a697abaaafffa49bfaf5 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 28 Jul 2019 17:40:14 +0200 Subject: [PATCH 056/184] v6.26 (#3015) + DietPi-Obtain_HW_model | Add Debian Bullseye detection as new G_DISTRO=6 + DietPi-Software | Add initial Debian Bullseye support + DietPi-Software | Dropbear: On Bullseye, "dropbear-run" has become a transitional dummy package for "dropbear" which does not include "dropbear-initramfs" anymore + DietPi-PREP | Add support for Debian Bullseye + DietPi-Set_software | APT mirror: On Debian Bullseye, the security repo directory structure has changed: https://deb.debian.org/debian-security/dists/ --- CHANGELOG.txt | 3 +- PREP_SYSTEM_FOR_DIETPI.sh | 57 +++++++++++++++++++----------- dietpi/dietpi-software | 34 +++++++++++------- dietpi/func/dietpi-obtain_hw_model | 9 +++-- dietpi/func/dietpi-set_software | 28 ++++++--------- 5 files changed, 78 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index cd133f56d4..db40928679 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,7 +2,8 @@ v6.26 (XX/08/19) Changes / Improvements / Optimisations: -- General | Support for Debian Jessie has now been fully dropped from DietPi code. Jessie systems are moved to the "jessie-support" Git branch and will stay on v6.25. Critical bugs, if reported, may still be fixed, but DietPi-Software related issues and new features will not be handled anymore by the DietPi code team. However, everyone is free to open related pull requests against the jessie-support branch: https://github.com/MichaIng/DietPi/tree/jessie-support +- General | Support for Debian Jessie has now been fully dropped from DietPi code. Jessie systems are moved to the "jessie-support" Git branch and will stay on v6.25. Critical bugs, if reported, may still be fixed, but DietPi-Software related issues and new features will not be handled anymore by the DietPi code team. However, everyone is free to open pull requests against the jessie-support branch: https://github.com/MichaIng/DietPi/tree/jessie-support +- General | Initial support and definitions for Debian Bullseye, the new Debian testing version, have been added to DietPi code. You can now create Bullseye systems via DietPi-PREP: https://github.com/MichaIng/DietPi/issues/3009 - DietPi-Config | Audio Options: Menu has been reworked. Audio capabilities (ALSA) can be enabled and disabled as a separate option. If enabled, generic soundcard auto-detection has been added to the bottom of the list for all devices. This allows the selection of generic sound devices on all SBCs, e.g. if unknown to DietPi or if our hardcoded card/device IDs are wrong due to additional attached audio hardware. - DietPi-Config | RPi: Update certain config.txt settings to match new firmware version. WiFi and Bluetooth is now disabled via related dtoverlays, which should further reduce hardware and firmware loads. - DietPi-Config | Some /etc/modprobe.d/ configs are merged to less files and mostly prefixed with "dietpi-", to allow easier differentiation between Debian/pre-image and DietPi files. diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index c4bd23d0b8..935a8e7e2c 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -508,6 +508,7 @@ '4' ': Stretch (oldstable, if SBC firmware is not yet Buster-compatible)' '5' ': Buster (current stable release, recommended)' + '6' ': Bullseye (testing, if you want to live on bleeding edge)' ) @@ -578,6 +579,10 @@ Currently installed: $G_DISTRO $G_DISTRO_NAME"; then DISTRO_TARGET_NAME='buster' + elif (( $DISTRO_TARGET == 6 )); then + + DISTRO_TARGET_NAME='bullseye' + else G_DIETPI-NOTIFY 1 'Invalid choice detected. Aborting...\n' @@ -607,7 +612,7 @@ Currently installed: $G_DISTRO $G_DISTRO_NAME"; then G_DIETPI-NOTIFY 2 'Moving kernel and boot configuration to /boot' - # - HW specific config.txt, boot.ini uEnv.txt + # HW specific config.txt, boot.ini uEnv.txt if (( $G_HW_MODEL < 10 )); then G_RUN_CMD mv "DietPi-$G_GITBRANCH/config.txt" /boot/ @@ -626,12 +631,12 @@ Currently installed: $G_DISTRO $G_DISTRO_NAME"; then G_RUN_CMD mv "DietPi-$G_GITBRANCH/README.md" /boot/dietpi-README.md G_RUN_CMD mv "DietPi-$G_GITBRANCH/CHANGELOG.txt" /boot/dietpi-CHANGELOG.txt - # - Reading version string for later use + # Reading version string for later use G_DIETPI_VERSION_CORE=$(sed -n 1p "DietPi-$G_GITBRANCH/dietpi/server_version-6") G_DIETPI_VERSION_SUB=$(sed -n 2p "DietPi-$G_GITBRANCH/dietpi/server_version-6") G_DIETPI_VERSION_RC=$(sed -n 3p "DietPi-$G_GITBRANCH/dietpi/server_version-6") - # - Remove server_version* / (pre-)patch_file (downloads fresh from dietpi-update) + # Remove server_version* / (pre-)patch_file (downloads fresh from dietpi-update) rm "DietPi-$G_GITBRANCH/dietpi/server_version"* rm "DietPi-$G_GITBRANCH/dietpi/pre-patch_file" rm "DietPi-$G_GITBRANCH/dietpi/patch_file" @@ -644,7 +649,7 @@ Currently installed: $G_DISTRO $G_DISTRO_NAME"; then G_RUN_CMD systemctl daemon-reload G_RUN_CMD systemctl enable dietpi-ramdisk - # - Mount tmpfs + # Mount tmpfs G_RUN_CMD mkdir -p /DietPi G_RUN_CMD mount -t tmpfs -o size=10m tmpfs /DietPi l_message='Starting DietPi-RAMdisk' G_RUN_CMD systemctl start dietpi-ramdisk @@ -659,26 +664,26 @@ Currently installed: $G_DISTRO $G_DISTRO_NAME"; then G_DIETPI-NOTIFY 2 "Setting APT sources.list: $DISTRO_TARGET_NAME $DISTRO_TARGET" - # - We need to forward $DISTRO_TARGET* to dietpi-set_software, as well as $G_HW_MODEL for Debian vs Raspbian decision. + # We need to forward $DISTRO_TARGET* to dietpi-set_software, as well as $G_HW_MODEL for Debian vs Raspbian decision. G_DISTRO=$DISTRO_TARGET G_DISTRO_NAME=$DISTRO_TARGET_NAME G_HW_MODEL=$G_HW_MODEL G_RUN_CMD /DietPi/dietpi/func/dietpi-set_software apt-mirror 'default' - # - Meveric, update repo to use our EU mirror: https://github.com/MichaIng/DietPi/issues/1519#issuecomment-368234302 + # Meveric, update repo to use our EU mirror: https://github.com/MichaIng/DietPi/issues/1519#issuecomment-368234302 sed -Ei 's@https?://oph\.mdrjr\.net@http://fuzon.co.uk@' /etc/apt/sources.list.d/meveric* &> /dev/null - # - (Re)create DietPi logs dir, used by G_AGx + # (Re)create DietPi logs dir, used by G_AGx G_RUN_CMD mkdir -p /var/tmp/dietpi/logs G_AGUP - # - @MichaIng https://github.com/MichaIng/DietPi/pull/1266/files + # @MichaIng https://github.com/MichaIng/DietPi/pull/1266/files G_DIETPI-NOTIFY 2 'Marking all packages as auto-installed first, to allow effective autoremove afterwards' G_RUN_CMD apt-mark auto $(apt-mark showmanual) - # - @MichaIng https://github.com/MichaIng/DietPi/pull/1266/files + # @MichaIng https://github.com/MichaIng/DietPi/pull/1266/files G_DIETPI-NOTIFY 2 'Disable automatic recommends/suggests install and allow them to be autoremoved:' - # Remove any existing APT recommends settings + # - Remove any existing APT recommends settings rm -f /etc/apt/apt.conf.d/*recommends* G_ERROR_HANDLER_COMMAND='/etc/apt/apt.conf.d/99-dietpi-norecommends' @@ -691,7 +696,7 @@ _EOF_ G_ERROR_HANDLER_EXITCODE=$? G_ERROR_HANDLER - G_DIETPI-NOTIFY 2 'Disable package state translation downloads:' + G_DIETPI-NOTIFY 2 'Disable package state translation downloads' echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/98-dietpi-no_translations G_DIETPI-NOTIFY 2 'Preserve modified config files on APT update:' @@ -705,7 +710,7 @@ _EOF_ G_ERROR_HANDLER_EXITCODE=$? G_ERROR_HANDLER - # - DietPi list of minimal required packages, which must be installed: + # DietPi list of minimal required packages, which must be installed: aPACKAGES_REQUIRED_INSTALL=( 'apt-transport-https' # Allows HTTPS sources for ATP @@ -719,7 +724,6 @@ _EOF_ 'curl' # Web address testing, downloading, uploading etc. 'debconf' # APT package pre-configuration, e.g. "debconf-set-selections" for non-interactive install 'dirmngr' # GNU key management required for some APT installs via additional repos - 'dropbear-run' # DietPi default SSH-Client, excluding initramfs integration 'ethtool' # Ethernet link checking 'fake-hwclock' # Hardware clock emulation, to allow correct timestamps during boot before network time sync 'gnupg' # apt-key add @@ -746,7 +750,20 @@ _EOF_ ) - # - G_HW_MODEL specific required repo key packages: https://github.com/MichaIng/DietPi/issues/1285#issuecomment-358301273 + # G_DISTRO specific + # - Dropbear: DietPi default SSH-Client + # On Buster-, "dropbear" fulls in "dropbear-initramfs", which we don't need + if (( $G_DISTRO > 5 )); then + + aPACKAGES_REQUIRED_INSTALL+=('dropbear') + + else + + aPACKAGES_REQUIRED_INSTALL+=('dropbear-run') + + fi + + # G_HW_MODEL specific required repo key packages: https://github.com/MichaIng/DietPi/issues/1285#issuecomment-358301273 if (( $G_HW_MODEL > 9 )); then G_AGI debian-archive-keyring @@ -758,7 +775,7 @@ _EOF_ fi - # - WiFi related packages + # WiFi related if (( $WIFI_REQUIRED )); then aPACKAGES_REQUIRED_INSTALL+=('crda') # WiFi related @@ -769,7 +786,7 @@ _EOF_ fi - # - G_HW_MODEL specific required packages: + # G_HW_MODEL specific if (( $G_HW_MODEL != 20 )); then aPACKAGES_REQUIRED_INSTALL+=('dosfstools') # DietPi-Drive_Manager + fat (boot) drive file system check and creation tools @@ -777,11 +794,9 @@ _EOF_ fi - # - Kernel required packages - # - G_HW_ARCH specific required Kernel packages - # As these are kernel, or bootloader packages, we need to install them directly to allow autoremove of in case older kernel packages: - # https://github.com/MichaIng/DietPi/issues/1285#issuecomment-354602594 - + # Kernel/bootloader/firmware + # - We need to install those directly to allow G_AGA() autoremove possible older packages later: https://github.com/MichaIng/DietPi/issues/1285#issuecomment-354602594 + # - G_HW_ARCH specific # x86_64 if (( $G_HW_ARCH == 10 )); then diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index c07868f4d4..271b6a5d87 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -248,7 +248,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it # Available for (need to match highest value in dietpi-obtain_hw_model) MAX_G_HW_MODEL=72 MAX_G_HW_ARCH=10 - MAX_G_DISTRO=5 + MAX_G_DISTRO=6 # - 2D array (well, bash style) declare -A aSOFTWARE_AVAIL_G_HW_MODEL declare -A aSOFTWARE_AVAIL_G_HW_ARCH @@ -523,6 +523,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it # - Buster: https://github.com/MichaIng/DietPi/issues/2787 aSOFTWARE_AVAIL_G_DISTRO[$software_id,5]=0 + aSOFTWARE_AVAIL_G_DISTRO[$software_id,6]=0 #------------------ software_id=34 @@ -538,6 +539,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it # - Buster: https://github.com/MichaIng/DietPi/issues/2787 aSOFTWARE_AVAIL_G_DISTRO[$software_id,5]=0 + aSOFTWARE_AVAIL_G_DISTRO[$software_id,6]=0 #------------------ software_id=35 @@ -980,6 +982,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_ONLINEDOC_URL[$software_id]='p=47#p47' # ownCloud up to 10.2 does not support PHP7.3 (Buster): https://doc.owncloud.org/server/administration_manual/installation/system_requirements.html aSOFTWARE_AVAIL_G_DISTRO[$software_id,5]=0 + aSOFTWARE_AVAIL_G_DISTRO[$software_id,6]=0 # ARMv6 devices have no chance to get some required PHP7.2 packages (APCu, Redis) aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0 # Disable if PHP7.3 is already installed @@ -1234,6 +1237,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it # phpBB up to 3.2 does not support PHP7.3 (Buster) aSOFTWARE_AVAIL_G_DISTRO[$software_id,5]=0 + aSOFTWARE_AVAIL_G_DISTRO[$software_id,6]=0 # ARMv6 devices have no chance to get some required PHP7.2 packages (APCu, Redis) aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0 # Disable if PHP7.3 is already installed @@ -1819,7 +1823,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_ONLINEDOC_URL[$software_id]='p=54#p54' # - non-RPi Buster: https://packages.debian.org/phpmyadmin - (( $G_HW_MODEL > 9 )) && aSOFTWARE_AVAIL_G_DISTRO[$software_id,5]=0 + (( $G_HW_MODEL > 9 )) && aSOFTWARE_AVAIL_G_DISTRO[$software_id,5]=0 && aSOFTWARE_AVAIL_G_DISTRO[$software_id,6]=0 # Since the APT package depends on PHP meta packages, PHP7.2 cannot be installed # Since ownCloud + phpBB require PHP7.2 currently, phpMyAdmin is not compatible with those @@ -1853,7 +1857,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_JAVA_JRE_JDK[$software_id]=1 # - non-RPi Buster: https://packages.debian.org/tomcat8 - (( $G_HW_MODEL > 9 )) && aSOFTWARE_AVAIL_G_DISTRO[$software_id,5]=0 + (( $G_HW_MODEL > 9 )) && aSOFTWARE_AVAIL_G_DISTRO[$software_id,5]=0 && aSOFTWARE_AVAIL_G_DISTRO[$software_id,6]=0 # Pi-hole #-------------------------------------------------------------------------------- @@ -6354,8 +6358,17 @@ Mycroft AI requires at least 2 GiB memory on first start. We will now increase y # Stop OpenSSH service to unbind port 22 systemctl -q is-active ssh && systemctl stop ssh - # On Stretch+ Dropbear packages have been split, install "dropbear-run" only, to have active service, but skip "dropbear-initramfs" - G_AGI dropbear-run + # On Stretch + Buster Dropbear packages have been split, install "dropbear-run" only, to have active service, but skip "dropbear-initramfs" + # On Bullseye+ "dropbear-run" has become a transitional dummy package for "dropbear" which does not include "dropbear-initramfs" anymore. + if (( $G_DISTRO > 5 )); then + + G_AGI dropbear + + else + + G_AGI dropbear-run + + fi # Enable Dropbear daemon G_CONFIG_INJECT 'NO_START=' 'NO_START=0' /etc/default/dropbear @@ -14241,10 +14254,7 @@ _EOF_ if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then Banner_Uninstalling - G_AGP dropbear* # Stretch: dropbear-initramfs dropbear-run - - # Required on Jessie only, since ECDSA key is not created on install automatically, thus not removed on uninstall - [[ -d '/etc/dropbear' ]] && rm -R /etc/dropbear + G_AGP dropbear* fi @@ -14323,7 +14333,7 @@ _EOF_ npm r -g n yarn npm G_AGP nodejs - # - old install via repo + # Old install via repo [[ -f '/etc/apt/sources.list.d/nodesource_nodejs.list' ]] && rm /etc/apt/sources.list.d/nodesource_nodejs.list [[ -f '/usr/local/bin/node' ]] && rm /usr/local/bin/node @@ -14375,14 +14385,14 @@ _EOF_ # Check if we need to clear DietPi choices local fp_temp='.dietpi-uninstall_dpkg' dpkg --get-selections | mawk '{print $1}' > $fp_temp - if ! grep -q '^openssh-server' $fp_temp && ! grep -q '^dropbear' $fp_temp; then + if ! grep -qE '^(openssh-server|dropbear)' $fp_temp; then INDEX_SSHSERVER_CURRENT=0 INDEX_SSHSERVER_TARGET=0 fi - if ! grep -q '^samba$' $fp_temp && ! grep -q '^proftpd-basic' $fp_temp; then + if ! grep -qE '^(samba$|proftpd-basic)' $fp_temp; then INDEX_FILESERVER_CURRENT=0 INDEX_FILESERVER_TARGET=0 diff --git a/dietpi/func/dietpi-obtain_hw_model b/dietpi/func/dietpi-obtain_hw_model index d89d21f593..2b657295b4 100644 --- a/dietpi/func/dietpi-obtain_hw_model +++ b/dietpi/func/dietpi-obtain_hw_model @@ -14,7 +14,7 @@ # In DietPi-Software: Need to match highest values in dietpi-obtain_hw_model # - MAX_G_HW_MODEL=72 # - MAX_G_HW_ARCH=10 - # - MAX_G_DISTRO=5 + # - MAX_G_DISTRO=6 # # ---- Line 1 ---- # G_HW_MODEL 72 ROCK Pi 4 @@ -70,8 +70,9 @@ # G_DISTRO 1 Debian Wheezy (No longer supported: https://dietpi.com/phpbb/viewtopic.php?p=1898) # G_DISTRO 2 Ubuntu 14.04 (No longer supported) # G_DISTRO 3 Jessie (No longer supported: https://github.com/MichaIng/DietPi/issues/2332) - # G_DISTRO 4 Stretch, pulled a muscle! + # G_DISTRO 4 Stretch # G_DISTRO 5 Buster + # G_DISTRO 6 Bullseye # ---- Line 4 ---- # RootFS device path (eg: /dev/mmcblk0p1) # ---- Line 5 ---- @@ -788,6 +789,10 @@ G_DISTRO=5 + elif grep -qi 'bullseye' /etc/os-release; then + + G_DISTRO=6 + fi # Generate UUID if it does not exist diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 7f5db66189..7790d31849 100644 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -103,33 +103,24 @@ $FP_SCRIPT setpermissions Applies required filesystem permissions to DietPi spe if [[ $INPUT_MODE_VALUE ]]; then - # Set defaults? - if [[ $INPUT_MODE_VALUE == 'default' ]]; then - - if (( $G_HW_MODEL < 10 )); then - - INPUT_MODE_VALUE='http://raspbian.raspberrypi.org/raspbian/' - - else - - INPUT_MODE_VALUE='https://deb.debian.org/debian/' - - fi - - fi - - # Set Raspbian + # Raspbian if (( $G_HW_MODEL < 10 )); then + # - Default? + [[ $INPUT_MODE_VALUE == 'default' ]] && INPUT_MODE_VALUE='http://raspbian.raspberrypi.org/raspbian/' + echo "deb $INPUT_MODE_VALUE $G_DISTRO_NAME main contrib non-free rpi" > /etc/apt/sources.list echo "deb https://archive.raspberrypi.org/debian/ $G_DISTRO_NAME main ui" > /etc/apt/sources.list.d/raspi.list # - Update dietpi.txt entry G_CONFIG_INJECT 'CONFIG_APT_RASPBIAN_MIRROR=' "CONFIG_APT_RASPBIAN_MIRROR=$INPUT_MODE_VALUE" /DietPi/dietpi.txt - # Set Debian + # Debian else + # - Default? + [[ $INPUT_MODE_VALUE == 'default' ]] && INPUT_MODE_VALUE='https://deb.debian.org/debian/' + cat << _EOF_ > /etc/apt/sources.list deb $INPUT_MODE_VALUE $G_DISTRO_NAME main contrib non-free deb $INPUT_MODE_VALUE $G_DISTRO_NAME-updates main contrib non-free @@ -137,6 +128,9 @@ deb https://deb.debian.org/debian-security/ $G_DISTRO_NAME/updates main contrib deb $INPUT_MODE_VALUE $G_DISTRO_NAME-backports main contrib non-free _EOF_ + # - On Bullseye, dir structure has changed: https://deb.debian.org/debian-security/dists/ + (( $G_DISTRO > 5 )) && sed -i '3s|/updates|-security|' /etc/apt/sources.list + # - Update dietpi.txt entry G_CONFIG_INJECT 'CONFIG_APT_DEBIAN_MIRROR=' "CONFIG_APT_DEBIAN_MIRROR=$INPUT_MODE_VALUE" /DietPi/dietpi.txt From 891b5c520907eb6742f2a8ae9ef77cd691d72cc3 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 28 Jul 2019 17:42:59 +0200 Subject: [PATCH 057/184] v6.26 + DietPi-PREP | Further Bullseye system recognition --- PREP_SYSTEM_FOR_DIETPI.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index 935a8e7e2c..22e10878d1 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -22,7 +22,7 @@ # - PREIMAGE_INFO='Some GNU/Linux' # - HW_MODEL=0 (must match one of the supported IDs below) # - WIFI_REQUIRED=0 [01] - # - DISTRO_TARGET=4 [45] (Stretch: 4, Buster: 5) + # - DISTRO_TARGET=5 [456] (Stretch: 4, Buster: 5, Bullseye: 6) #------------------------------------------------------------------------------------------------ # Core globals @@ -210,6 +210,11 @@ G_DISTRO=5 G_DISTRO_NAME='buster' + elif grep -q 'bullseye' /etc/os-release; then + + G_DISTRO=6 + G_DISTRO_NAME='bullseye' + else G_DIETPI-NOTIFY 1 'Unknown or unsupported distribution version. Aborting...\n' From 4dd4bf5e3bfadd16437a07a1332574f52c675648 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Mon, 29 Jul 2019 16:08:46 +0200 Subject: [PATCH 058/184] v6.26 + DietPi-Set_hardware | Bluetooth: Do not touch /etc/modprobe.d/dietpi-disable_bluetooth.conf in case if invalid $INPUT_DEVICE_VALUE --- dietpi/func/dietpi-set_hardware | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 900f9a7e60..a474b05316 100644 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -1042,11 +1042,9 @@ _EOF_ ) - [[ -f '/etc/modprobe.d/dietpi-disable_bluetooth.conf' ]] && rm /etc/modprobe.d/dietpi-disable_bluetooth.conf - if [[ $INPUT_DEVICE_VALUE == 'disable' ]]; then - # RPi: Disable service for all (failsafe) + # RPi if (( $G_HW_MODEL < 10 )); then systemctl disable --now hciuart 2> /dev/null @@ -1070,9 +1068,10 @@ _EOF_ fi - # Bluetooth last systemctl disable --now bluetooth 2> /dev/null + # Unload and blacklist modules, bluetooth last + > /etc/modprobe.d/dietpi-disable_bluetooth.conf for ((i=$(( ${#aBLUETOOTH_MODULES[@]} - 1 )); i>=0; i--)) do @@ -1091,6 +1090,9 @@ _EOF_ elif [[ $INPUT_DEVICE_VALUE == 'enable' ]]; then + # Remove module blacklist + [[ -f '/etc/modprobe.d/dietpi-disable_bluetooth.conf' ]] && rm /etc/modprobe.d/dietpi-disable_bluetooth.conf + # Pre-Reqs if (( $G_HW_MODEL < 10 )); then @@ -1122,7 +1124,7 @@ Do you want to continue and disable the serial login console?'; then fi - # Bluetooth first + # Load modules, bluetooth first for i in "${aBLUETOOTH_MODULES[@]}" do From e404d4735d9f075e0219f22e704e0bd5bffef26b Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Mon, 29 Jul 2019 22:58:38 +0200 Subject: [PATCH 059/184] v6.26 + DietPi-Set_hardware | Bluetooth: On RPi remove runtime loaded "disable-bt" dtoverlay as well, in case disabled and enabled within the same session. --- dietpi/func/dietpi-set_hardware | 1 + 1 file changed, 1 insertion(+) diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index a474b05316..41cd006db5 100644 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -1114,6 +1114,7 @@ Do you want to continue and disable the serial login console?'; then # - Remove dtoverlay sed -i '/^[[:blank:]]*dtoverlay=disable-bt/d' $FP_RPI_CONFIG + dtoverlay -r disable-bt # In case loaded on same session G_AG_CHECK_INSTALL_PREREQ pi-bluetooth From 19c54e39bd0fdafdb71d07696a715f7edeb539c0 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Tue, 30 Jul 2019 04:26:55 +0200 Subject: [PATCH 060/184] v6.26 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit + DietPi-FirstBoot | Set default temp limit for RPi4 to 75°C as well, since in our benchmarks it even runs hotter than RPi3... --- rootfs/var/lib/dietpi/services/dietpi-firstboot.bash | 1 + 1 file changed, 1 insertion(+) diff --git a/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash b/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash index 5fce3fdc48..dfbf036b5e 100755 --- a/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash +++ b/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash @@ -76,6 +76,7 @@ sed -i '/arm_freq=/c\#arm_freq=1500' /DietPi/config.txt sed -i '/core_freq=/c\#core_freq=500' /DietPi/config.txt sed -i '/sdram_freq=/c\#sdram_freq=3200' /DietPi/config.txt + G_CONFIG_INJECT 'temp_limit=' 'temp_limit=75' /DietPi/config.txt # https://github.com/MichaIng/DietPi/issues/3019 fi From d1f03f2dad00f57d6af0f8920e4d77db4937dbf8 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Tue, 30 Jul 2019 05:50:45 +0200 Subject: [PATCH 061/184] v6.26 (#3006) + DietPi-Software | Gogs: Install latest pre-compiled binaries from GitHub for ARMv7 + x86_64. For ARMv6 (RPi1/Zero) no binaries are available yet + DietPi-Software | Gogs: On reinstall, remove old install dir, but preserve existing configs + DietPi-Software | Gogs: InnoDB large table prefix with Barracuda file format is required on current version + DietPi-Software | MariaDB: Assure/Enable 4-byte support (default since Stretch) and modern Barracuda file format + large table prefix (default since Buster) on all MariaDB installs. This has no effect on existing tables, setting this with ownCloud and Nextcloud installs never caused issues for other MariaDB databases and software using them, and, every Stretch to backports/Buster upgrade would break it the same way if so. However a special eye on this during Beta phase makes sense. --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 135 ++++++++++++++++++++++------------------- dietpi/patch_file | 12 ++++ 3 files changed, 85 insertions(+), 63 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index db40928679..a2eeee6b36 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -9,6 +9,7 @@ Changes / Improvements / Optimisations: - DietPi-Config | Some /etc/modprobe.d/ configs are merged to less files and mostly prefixed with "dietpi-", to allow easier differentiation between Debian/pre-image and DietPi files. - DietPi-Software | Pi-hole: Logging to /var/log/pihole.log is now disabled by default, since it is not required in usual cases. Query logs, shown in web UI, are stored in database. This might also resolve possible pihole-FTL crashes in combination with DietPi-RAMlog and DietPi-Logclear. Many thanks to @kuerious for reporting and @Mcat12 for providing helpful information on this topic: https://github.com/pi-hole/FTL/issues/614 - DietPi-Software | Pi-hole: Lighttpd config has been added to block access to .dot dirs (.git*) and enable local fonts for web UI, based on: https://github.com/pi-hole/pi-hole/blob/master/advanced/lighttpd.conf.debian +- DietPi-Software | Gogs: On ARMv7 and x86_64 now the latest version from GitHub is installed. Reinstalls will upgrade the version while preserving existing settings. Many thanks to @LazyLama for doing this suggestion: https://github.com/MichaIng/DietPi/issues/2999 Bug Fixes: - General | Removed an obsolete OpenMediaVault cron job and binary that was leftover on at least one of our images (NanoPi NEO2) and is not part of the current OMV packages, thus save to remove in every case. Many thanks to @kt1024 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2994 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 271b6a5d87..167ecd463d 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3349,13 +3349,12 @@ Package: *php7.3*\nPin: release *\nPin-Priority: -1' > /etc/apt/preferences.d/di (( ${aSOFTWARE_INSTALL_STATE[89]} == 2 )) && package_list+=" $PHP_NAME-mysql" G_AGI "$package_list" - # - Remove mysql.service as we use mariadb.service, both cannot exist: https://github.com/MichaIng/DietPi/issues/1913#issuecomment-441343798 + # Remove obsolete sysvinit service as we use the systemd mariadb.service if [[ -f '/etc/init.d/mysql' ]]; then G_DIETPI-NOTIFY 2 'Switching from /etc/init.d/mysql to mariadb.service' - systemctl stop mysql + systemctl disable --now mysql rm /etc/init.d/mysql - systemctl daemon-reload fi @@ -5104,26 +5103,44 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior Banner_Installing - INSTALL_URL_ADDRESS='https://dietpi.com/downloads/binaries/all/gogs_' - - #armv6 + # ARMv6: No pre-compiled binaries available, thus we use our own: https://github.com/gogs/gogs/releases if (( $G_HW_ARCH == 1 )); then - INSTALL_URL_ADDRESS+='armv6.zip' + INSTALL_URL_ADDRESS='https://dietpi.com/downloads/binaries/all/gogs_armv6.zip' - #armv7+ - elif (( $G_HW_ARCH == 2 )); then + # Else install latest binaries from GitHub + else - INSTALL_URL_ADDRESS+='armv7.zip' + # ARMv7 + local file='raspi2_armv6.zip' + local fallback_url='https://github.com/gogs/gogs/releases/download/v0.11.86/raspi2_armv6.zip' - #x86_64 - elif (( $G_HW_ARCH == 10 )); then + # x86_64 + if (( $G_HW_ARCH == 10 )); then + + file='linux_amd64.tar.gz' + fallback_url='https://github.com/gogs/gogs/releases/download/v0.11.86/linux_amd64.tar.gz' + + fi + + G_CHECK_URL 'https://api.github.com/repos/gogs/gogs/releases/latest' + INSTALL_URL_ADDRESS=$(curl -s 'https://api.github.com/repos/gogs/gogs/releases/latest' | grep -m1 "browser_download_url.*$file" | cut -d \" -f 4) + local no_check_url=1 # G_CHECK_URL faces 403 - INSTALL_URL_ADDRESS+='amd64.zip' fi - Download_Install "$INSTALL_URL_ADDRESS" /etc - mv /etc/gogs* /etc/gogs + Download_Install "$INSTALL_URL_ADDRESS" + + # Remove old install dir, but preserve existing configs + if [[ -d '/etc/gogs' ]]; then + + [[ -d '/etc/gogs/custom' ]] && mv /etc/gogs/custom gogs + mv /etc/gogs/.??* gogs # dot files = SSH and Git user configs + rm -R /etc/gogs + + fi + + mv gogs /etc/gogs fi @@ -7109,7 +7126,25 @@ _EOF_ Banner_Configuration - ### Also for MariaDB? + G_DIETPI-NOTIFY 2 'Assuring 4-byte support and InnoDB Barracuda file format with large prefix' + cat << _EOF_ > /etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf +[mysqld] +innodb_large_prefix=1 +innodb_file_format=barracuda +innodb_file_per_table=1 +character-set-server=utf8mb4 +collation-server=utf8mb4_general_ci +_EOF_ + # Since Buster (MariaDB 10.3) the following settings are removed and default to our needs: + # - innodb_large_prefix: https://mariadb.com/kb/en/library/innodb-system-variables/#innodb_large_prefix + # - innodb_file_format: https://mariadb.com/kb/en/library/innodb-system-variables/#innodb_file_format + if (( $G_DISTRO > 4 )); then + + sed -i '/innodb_large_prefix/d' /etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf + sed -i '/innodb_file_format/d' /etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf + + fi + # Optimise for reduced memory use: https://github.com/MichaIng/DietPi/issues/605#issue-188930987 #cat << _EOF_ > /etc/mysql/mariadb.conf.d/99-dietpi.cnf #[mysqld] @@ -7383,27 +7418,8 @@ location = /.well-known/caldav { fi - G_DIETPI-NOTIFY 2 'Enable 4-byte support for MariaDB.' # https://doc.owncloud.org/server/administration_manual/configuration/database/linux_database_configuration.html#configure-mysql-for-4-byte-unicode-support - cat << _EOF_ > /etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf -[mysqld] -innodb_large_prefix=1 -innodb_file_format=barracuda -innodb_file_per_table=1 -character-set-server=utf8mb4 -collation-server=utf8mb4_general_ci -_EOF_ - # On Buster (MariaDB 10.3) the following settings are removed and default to our needs: - # - innodb_large_prefix: https://mariadb.com/kb/en/library/innodb-system-variables/#innodb_large_prefix - # - innodb_file_format: https://mariadb.com/kb/en/library/innodb-system-variables/#innodb_file_format - if (( $G_DISTRO > 4 )); then - - sed -i '/innodb_large_prefix/d' /etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf - sed -i '/innodb_file_format/d' /etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf - - fi + # Start MariaDB and Redis for database creation and occ command G_RUN_CMD systemctl restart mariadb - - # Start redis-server, which is required for ncc command: G_RUN_CMD systemctl start redis-server # Initially add occ command shortcut, will be done by Dietpi-Globals automatically, if occ file exist: @@ -7632,27 +7648,8 @@ location = /.well-known/caldav { fi - G_DIETPI-NOTIFY 2 'Enable 4-byte support for MariaDB' # https://docs.nextcloud.com/server/stable/admin_manual/configuration_database/mysql_4byte_support.html - cat << _EOF_ > /etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf -[mysqld] -innodb_large_prefix=1 -innodb_file_format=barracuda -innodb_file_per_table=1 -character-set-server=utf8mb4 -collation-server=utf8mb4_general_ci -_EOF_ - # On Buster (MariaDB 10.3) the following settings are removed and default to our needs: - # - innodb_large_prefix: https://mariadb.com/kb/en/library/innodb-system-variables/#innodb_large_prefix - # - innodb_file_format: https://mariadb.com/kb/en/library/innodb-system-variables/#innodb_file_format - if (( $G_DISTRO > 4 )); then - - sed -i '/innodb_large_prefix/d' /etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf - sed -i '/innodb_file_format/d' /etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf - - fi + # Start MariaDB and Redis for database creation and ncc command G_RUN_CMD systemctl restart mariadb - - # Start redis-server, which is required for ncc command: G_RUN_CMD systemctl start redis-server # Initially add occ command shortcut, will be done by Dietpi-Globals automatically, if occ file exist: @@ -10267,7 +10264,13 @@ _EOF_ chown -R gogs:gogs $G_FP_DIETPI_USERDATA/gogs-repo /var/log/gogs # Database - /DietPi/dietpi/func/create_mysql_db gogs gogs "$GLOBAL_PW" + if [[ ! -d '/var/lib/mysql/gogs' ]]; then + + G_RUN_CMD systemctl restart mariadb + mysql < /etc/gogs/scripts/mysql.sql + mysql -e "grant all privileges on gogs.* to gogs@localhost identified by '$GLOBAL_PW'" + + fi # Service cat << _EOF_ > /etc/systemd/system/gogs.service @@ -10968,7 +10971,7 @@ _EOF_ G_RUN_CMD systemctl start mariadb # - Create database user only, database will be created automatically - mysql -e "grant all privileges on ompd.* to ompd@localhost identified by '$GLOBAL_PW';" + mysql -e "grant all privileges on ompd.* to ompd@localhost identified by '$GLOBAL_PW'" systemctl stop mariadb cat << _EOF_ > /var/www/ompd/include/config.local.inc.php @@ -13639,15 +13642,21 @@ _EOF_ Banner_Uninstalling - userdel -rf gogs + if [[ -f '/etc/systemd/system/gogs.service' ]]; then + + systemctl disable --now gogs + rm -R /etc/systemd/system/gogs.service* + + fi + + getent passwd gogs &> /dev/null && userdel -rf gogs - rm -R /etc/gogs - rm /etc/systemd/system/gogs.service - rm -R /var/log/gogs + [[ -d '/etc/gogs' ]] && rm -R /etc/gogs + [[ -d '/var/log/gogs' ]] && rm -R /var/log/gogs systemctl start mariadb mysqladmin drop gogs -f - mysql -e "drop user 'gogs'@'localhost'" + mysql -e 'drop user gogs@localhost' fi diff --git a/dietpi/patch_file b/dietpi/patch_file index cf542bd062..3dfcd2e5e1 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2138,6 +2138,18 @@ A backup will be created to "/etc/mympd/mympd.conf.bak_DDMMYYY_N" from where you done #------------------------------------------------------------------------------- + # Reinstalls and software install changes + if (( $G_DIETPI_INSTALL_STAGE == 2 )); then + + # Gogs: Remove /etc/__MACOSX that comes from our archive on ARMv6 + if grep -q '^aSOFTWARE_INSTALL_STATE\[49\]=2' /DietPi/dietpi/.installed; then + + [[ $G_HW_ARCH == 1 && -d '/etc/__MACOSX' ]] && rm -R /etc/__MACOSX + + fi + + fi + #------------------------------------------------------------------------------- fi From 165c551e36c32e6b532dbc9b31fe32b039ac2893 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Tue, 30 Jul 2019 23:46:53 +0200 Subject: [PATCH 062/184] v6.26 (#3016) + DietPi-Software | OpenVPN: Remove rsyslog dependency + DietPi-Software | OpenVPN: Preserve existing configs, instead inform user that config creation, key and cert generation is skipped + DietPi-Software | OpenVPN: Use most current easy-rsa form GitHub, which allows us to use the same method on all systems. The APT package will use outdated methods earlier or later and the binaries are standalone scripts anyway. + DietPi-Software | OpenVPN: LibSSL1.0.0 is not required on Buster and was never required on Stretch, so it is not installed with OpenVPN anymore. + DietPi-Software | OpenVPN: Create Diffie-Hellman param via easy-rsa as well + DietPi-Software | Download_Install(): Add support for tgz and tbz2 file endings and use slightly simplified tar extraction option which allows to skip target dir pre-creation but was not available on Jessie + DietPi-Software | OpenVPN: Use new "remote-cert-tls" option as replacement for deprecated "ns-cert-type", which as well solves client connection issue with error: "VERIFY nsCertType ERROR: CN=DietPi_OpenVPN_Server, require nsCertType=SERVER" --- CHANGELOG.txt | 2 + dietpi/dietpi-software | 145 +++++++++++++++++++++-------------------- 2 files changed, 76 insertions(+), 71 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a2eeee6b36..4350547bb6 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -9,6 +9,7 @@ Changes / Improvements / Optimisations: - DietPi-Config | Some /etc/modprobe.d/ configs are merged to less files and mostly prefixed with "dietpi-", to allow easier differentiation between Debian/pre-image and DietPi files. - DietPi-Software | Pi-hole: Logging to /var/log/pihole.log is now disabled by default, since it is not required in usual cases. Query logs, shown in web UI, are stored in database. This might also resolve possible pihole-FTL crashes in combination with DietPi-RAMlog and DietPi-Logclear. Many thanks to @kuerious for reporting and @Mcat12 for providing helpful information on this topic: https://github.com/pi-hole/FTL/issues/614 - DietPi-Software | Pi-hole: Lighttpd config has been added to block access to .dot dirs (.git*) and enable local fonts for web UI, based on: https://github.com/pi-hole/pi-hole/blob/master/advanced/lighttpd.conf.debian +- DietPi-Software | OpenVPN: Rsyslog is not installed anymore together with OpenVPN server. Logs are available via "journalctl -u openvpn", all system logs via "journalctl". If you require persistent logs, uninstall DietPi-RAMlog via dietpi-software and make the journal boot persistent via: mkdir /var/log/journal - DietPi-Software | Gogs: On ARMv7 and x86_64 now the latest version from GitHub is installed. Reinstalls will upgrade the version while preserving existing settings. Many thanks to @LazyLama for doing this suggestion: https://github.com/MichaIng/DietPi/issues/2999 Bug Fixes: @@ -18,6 +19,7 @@ Bug Fixes: - DietPi-Software | Gitea: Resolved an issue where install fails on ARMv7 systems. Many thanks to @maschiw for reporting this issue: https://github.com/MichaIng/DietPi/issues/2959 - DietPi-Software | Node-RED: Resolved an issue where install fails due to missing data dir creation. Many thanks to @Orfait for reporting this isssue: https://github.com/MichaIng/DietPi/issues/2975 - DietPi-Software | Node-RED: Resolved an issue where user creation fails if "gpio" group is not present. Many thanks to @marcobrianza for reporting this issue: https://github.com/MichaIng/DietPi/issues/2975#issuecomment-513917360 +- DietPi-Software | OpenVPN: Resolved an issue where install failed on Debian Buster due to a new easy-rsa version with changed commands and options. Now the most recent easy-rsa is manually downloaded on all systems to generate server and client key + cert with modern methods and the client config is slighly updated to match modern settings. As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/XXXX diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 167ecd463d..38230e5409 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -1921,7 +1921,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_WHIP_DESC[$software_id]='vpn server' aSOFTWARE_CATEGORY_INDEX[$software_id]=16 aSOFTWARE_TYPE[$software_id]=0 - aSOFTWARE_REQUIRES_RSYSLOG[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=613#p613' #------------------ @@ -2481,12 +2480,11 @@ DietPi-Software will decrypt and use it for software installs. You can change it fi - # Software that requires LibSSL1.0.0, Stretch+ only + # Software that requires LibSSL1.0.0 # - Jackett (147) software_id=126 if (( ${aSOFTWARE_INSTALL_STATE[37]} == 1 || ${aSOFTWARE_INSTALL_STATE[60]} == 1 || - ${aSOFTWARE_INSTALL_STATE[97]} == 1 || ${aSOFTWARE_INSTALL_STATE[134]} == 1 || ${aSOFTWARE_INSTALL_STATE[147]} == 1 )); then @@ -3035,8 +3033,8 @@ Package: *php7.3*\nPin: release *\nPin-Priority: -1' > /etc/apt/preferences.d/di local url=$1 [[ ! $url && $fallback_url ]] && url=$fallback_url local target=$2 # Extract target - local type=${url##*.} # Grab ext from URL | compatbile with >> deb|zip|tar(.gz|.bz2)|7z - [[ $type == 'gz' || $type == 'bz2' ]] && type='tar' + local type=${url##*.} # Grab ext from URL | compatbile with >> deb|zip|tar(.gz|.bz2)|tgz|tbz2|7z + [[ $type =~ ^t?(gz|bz2)$ ]] && type='tar' local file="$software_id.$type" # DietPi-Software conf/service mode @@ -3089,8 +3087,7 @@ Package: *php7.3*\nPin: release *\nPin-Priority: -1' > /etc/apt/preferences.d/di elif [[ $type == 'tar' ]]; then - #[[ $target ]] && target="--one-top-level=$target" # Option exist not on Jessie - [[ $target ]] && G_RUN_CMD mkdir -p "$target" && target="-C $target" + [[ $target ]] && target="--one-top-level=$target" G_RUN_CMD tar xf $file "$target" elif [[ $type == '7z' ]]; then @@ -4639,7 +4636,9 @@ _EOF_ if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then Banner_Installing - G_AGI openvpn easy-rsa iptables + G_AGI openvpn iptables + # Remove obsolete sysvinit service + [[ -f '/etc/init.d/openvpn' ]] && rm /etc/init.d/openvpn fi @@ -9386,48 +9385,58 @@ _EOF_ Banner_Configuration - local key_size=2048 - - # Start Cert/Key generation. - cp -a /usr/share/easy-rsa/ /etc/openvpn - mkdir -p /etc/openvpn/easy-rsa/keys - cat << _EOF_ >> /etc/openvpn/easy-rsa/vars -export KEY_SIZE=$key_size -export KEY_COUNTRY='UK' -export KEY_PROVINCE='DietPi' -export KEY_CITY='DietPi' -export KEY_ORG='DietPi' -export KEY_EMAIL='noreply@DietPi.com' -export KEY_OU='DietPi' -export KEY_NAME='DietPi_OpenVPN_Server' -_EOF_ - - # Create Server Cert Auth - G_DIETPI-NOTIFY 2 'Generating unique OpenVPN certificates and keys. Please wait...\n' - openssl dhparam -out /etc/openvpn/dh${key_size}.pem $key_size - - # Build Server certs/keys - chmod -R +x /etc/openvpn/easy-rsa - cd /etc/openvpn/easy-rsa - # - https://github.com/MichaIng/DietPi/issues/1450#issuecomment-362608574 - cp -a openssl-1.0.0.cnf openssl.cnf + # Create initial server and client configs, if not yet present + # - Wildcard config file detection via for loop + local i + for i in /etc/openvpn/*.conf + do - . ./vars - ./clean-all - ./build-ca --batch DietPi_OpenVPN_Server - ./build-key-server --batch DietPi_OpenVPN_Server + # Inform user, if config exist, that config generation is skipped + if [[ -f $i ]]; then - # Copy Server cert/keys - cp -a /etc/openvpn/easy-rsa/keys/{DietPi_OpenVPN_Server.crt,DietPi_OpenVPN_Server.key,ca.crt} /etc/openvpn/ + G_DIETPI-NOTIFY 2 "Existing OpenVPN configuration found: $i + - Config generation will be skipped. + - If you need a fresh key/cert/config set, please remove $i + and run: dietpi-software reinstall 97" + break - # Build client cert/keys - ./build-key --batch DietPi_OpenVPN_Client + fi - cd /tmp/$G_PROGRAM_NAME - # End Cert/Key generation. + # Pre-v6.26 cleanup + [[ -f '/etc/openvpn/dh2048.pem' ]] && rm /etc/openvpn/dh2048.pem + dpkg-query -s easy-rsa &> /dev/null && G_AGP easy-rsa - # Server config - cat << _EOF_ > /etc/openvpn/server.conf + # Download latest easy-rsa from GitHub + G_DIETPI-NOTIFY 2 'Downloading latest easy-rsa for certificate and key generation...' + INSTALL_URL_ADDRESS='https://api.github.com/repos/OpenVPN/easy-rsa/releases/latest' + G_CHECK_URL "$INSTALL_URL_ADDRESS" + fallback_url='https://github.com/OpenVPN/easy-rsa/releases/download/v3.0.6/EasyRSA-unix-v3.0.6.tgz' + no_check_url=1 Download_Install "$(curl -s "$INSTALL_URL_ADDRESS" | grep -m1 '"browser_download_url.*EasyRSA-.*\.tgz' | cut -d \" -f 4)" + [[ -d '/etc/openvpn/easy-rsa' ]] && rm -R /etc/openvpn/easy-rsa + mv EasyRSA-* /etc/openvpn/easy-rsa + + # Cert and key generation via easy-rsa + G_DIETPI-NOTIFY 2 'Generating unique OpenVPN certificates and keys. Please wait...\n' + cd /etc/openvpn/easy-rsa + cat << _EOF_ > vars +set_var EASYRSA_REQ_COUNTRY "UK" +set_var EASYRSA_REQ_PROVINCE "DietPi" +set_var EASYRSA_REQ_CITY "DietPi" +set_var EASYRSA_REQ_ORG "DietPi" +set_var EASYRSA_REQ_EMAIL "noreply@dietpi.com" +set_var EASYRSA_REQ_OU "DietPi" +set_var EASYRSA_BATCH "1" +_EOF_ + ./easyrsa init-pki + ./easyrsa build-ca nopass + ./easyrsa gen-dh + ./easyrsa build-server-full DietPi_OpenVPN_Server nopass + ./easyrsa build-client-full DietPi_OpenVPN_Client nopass + + # Server config + cp -a pki/{ca.crt,dh.pem,issued/DietPi_OpenVPN_Server.crt,private/DietPi_OpenVPN_Server.key} /etc/openvpn/ + cd /etc/openvpn + cat << _EOF_ > server.conf port 1194 proto udp dev tun @@ -9435,7 +9444,7 @@ dev tun ca ca.crt cert DietPi_OpenVPN_Server.crt key DietPi_OpenVPN_Server.key -dh dh$key_size.pem +dh dh.pem server 10.8.0.0 255.255.255.0 @@ -9454,16 +9463,15 @@ verb 3 # Web Forwarding (uncomment to enable) #push "redirect-gateway" #push "dhcp-option DNS 10.8.0.1" - _EOF_ - # Client config - cat << _EOF_ > /etc/openvpn/easy-rsa/keys/DietPi_OpenVPN_Client.ovpn + # Client config + cat << _EOF_ > DietPi_OpenVPN_Client.ovpn client proto udp dev tun -# Ip/Domain name of DietPi system, running OpenVPN server. +# IP/domain name of DietPi system, running OpenVPN server remote mywebsite.com 1194 resolv-retry infinite @@ -9475,30 +9483,25 @@ group nogroup persist-key persist-tun -ns-cert-type server +remote-cert-tls server comp-lzo verb 3 - _EOF_ + # - Add CA cert, client cert and key + echo -e " +\n$( +\n$( +\n$(" >> DietPi_OpenVPN_Client.ovpn + + # - Copy to userdata + cp DietPi_OpenVPN_Client.ovpn $G_FP_DIETPI_USERDATA/ + # - and /boot partition + cp DietPi_OpenVPN_Client.ovpn /boot/ - # Unified client file. Add DietPi generated certs/keys. - # - Add Server Cert auth - echo '' >> /etc/openvpn/easy-rsa/keys/DietPi_OpenVPN_Client.ovpn - cat /etc/openvpn/ca.crt >> /etc/openvpn/easy-rsa/keys/DietPi_OpenVPN_Client.ovpn - echo '' >> /etc/openvpn/easy-rsa/keys/DietPi_OpenVPN_Client.ovpn - # - Add Client Cert - echo '' >> /etc/openvpn/easy-rsa/keys/DietPi_OpenVPN_Client.ovpn - cat /etc/openvpn/easy-rsa/keys/DietPi_OpenVPN_Client.crt >> /etc/openvpn/easy-rsa/keys/DietPi_OpenVPN_Client.ovpn - echo '' >> /etc/openvpn/easy-rsa/keys/DietPi_OpenVPN_Client.ovpn - # - Add Client Key - echo '' >> /etc/openvpn/easy-rsa/keys/DietPi_OpenVPN_Client.ovpn - cat /etc/openvpn/easy-rsa/keys/DietPi_OpenVPN_Client.key >> /etc/openvpn/easy-rsa/keys/DietPi_OpenVPN_Client.ovpn - echo '' >> /etc/openvpn/easy-rsa/keys/DietPi_OpenVPN_Client.ovpn - - # Copy client file to userdata location - cp /etc/openvpn/easy-rsa/keys/DietPi_OpenVPN_Client.ovpn $G_FP_DIETPI_USERDATA/ - # - and /boot partition - cp /etc/openvpn/easy-rsa/keys/DietPi_OpenVPN_Client.ovpn /boot/ + cd /tmp/$G_PROGRAM_NAME + break # Always break loop which is only for single wildcard file detection + + done # Enable IP forwarding echo -e 'net.ipv4.ip_forward=1\nnet.ipv6.conf.all.forwarding=1\nnet.ipv6.conf.default.forwarding=1' > /etc/sysctl.d/dietpi-openvpn.conf @@ -13334,7 +13337,7 @@ _EOF_ fi - software_id=97 # OpenVPN server + software_id=97 # OpenVPN Server if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then Banner_Uninstalling From 8d8d2062be527f2d91e1de3687b58b9e248978e0 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Wed, 31 Jul 2019 02:11:58 +0200 Subject: [PATCH 063/184] v6.26 (#3020) + DietPi-Software | XRDP: On Stretch, install version from backports, which resolves missing /etc/profile (e.g. $PATH) load and failing install+service if IPv6 is disabled: https://github.com/MichaIng/DietPi/issues/3017 + DietPi-Pre-patch | XRDP: On Stretch allow upgrade of XRDP from backports to resolve certain issues + DietPi-Pre-patch | Remove pre-patch 7 which will be applied from pre-patch_file of jessie-support branch + DietPi-Pre-patch | Simplify pre-patch 6: Every Jessie system which reaches this pre-patch_file is obviously not yet on jessie-support branch + DietPi-Pre-patch | Minor coding + CHANGELOG | Complete spell check and correction --- CHANGELOG.txt | 171 +++++++++++++++++++++-------------------- dietpi/dietpi-software | 7 ++ dietpi/pre-patch_file | 65 +++++++--------- 3 files changed, 121 insertions(+), 122 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4350547bb6..f9724675ab 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,7 +4,7 @@ v6.26 Changes / Improvements / Optimisations: - General | Support for Debian Jessie has now been fully dropped from DietPi code. Jessie systems are moved to the "jessie-support" Git branch and will stay on v6.25. Critical bugs, if reported, may still be fixed, but DietPi-Software related issues and new features will not be handled anymore by the DietPi code team. However, everyone is free to open pull requests against the jessie-support branch: https://github.com/MichaIng/DietPi/tree/jessie-support - General | Initial support and definitions for Debian Bullseye, the new Debian testing version, have been added to DietPi code. You can now create Bullseye systems via DietPi-PREP: https://github.com/MichaIng/DietPi/issues/3009 -- DietPi-Config | Audio Options: Menu has been reworked. Audio capabilities (ALSA) can be enabled and disabled as a separate option. If enabled, generic soundcard auto-detection has been added to the bottom of the list for all devices. This allows the selection of generic sound devices on all SBCs, e.g. if unknown to DietPi or if our hardcoded card/device IDs are wrong due to additional attached audio hardware. +- DietPi-Config | Audio Options: Menu has been reworked. Audio capabilities (ALSA) can be enabled and disabled as a separate option. If enabled, generic sound card auto-detection has been added to the bottom of the list for all devices. This allows the selection of generic sound devices on all SBCs, e.g. if unknown to DietPi or if our hard-coded card/device IDs are wrong due to additional attached audio hardware. - DietPi-Config | RPi: Update certain config.txt settings to match new firmware version. WiFi and Bluetooth is now disabled via related dtoverlays, which should further reduce hardware and firmware loads. - DietPi-Config | Some /etc/modprobe.d/ configs are merged to less files and mostly prefixed with "dietpi-", to allow easier differentiation between Debian/pre-image and DietPi files. - DietPi-Software | Pi-hole: Logging to /var/log/pihole.log is now disabled by default, since it is not required in usual cases. Query logs, shown in web UI, are stored in database. This might also resolve possible pihole-FTL crashes in combination with DietPi-RAMlog and DietPi-Logclear. Many thanks to @kuerious for reporting and @Mcat12 for providing helpful information on this topic: https://github.com/pi-hole/FTL/issues/614 @@ -17,9 +17,10 @@ Bug Fixes: - General | Resolved an issue where install of required APT packages for certain scripts could fail in the rare case that APT lists are outdated and old packages are not available in the repo anymore. Many thanks to @Paulisper for reporting this issue: https://github.com/MichaIng/DietPi/issues/2996 - DietPi-Config | Resolved an issue on RPi where I2C baudrate was not applied correctly, thus selection was ineffective. Many thanks to @flashspys for reporting this issue: https://github.com/MichaIng/DietPi/issues/2966 - DietPi-Software | Gitea: Resolved an issue where install fails on ARMv7 systems. Many thanks to @maschiw for reporting this issue: https://github.com/MichaIng/DietPi/issues/2959 -- DietPi-Software | Node-RED: Resolved an issue where install fails due to missing data dir creation. Many thanks to @Orfait for reporting this isssue: https://github.com/MichaIng/DietPi/issues/2975 +- DietPi-Software | Node-RED: Resolved an issue where install fails due to missing data dir creation. Many thanks to @Orfait for reporting this issue: https://github.com/MichaIng/DietPi/issues/2975 - DietPi-Software | Node-RED: Resolved an issue where user creation fails if "gpio" group is not present. Many thanks to @marcobrianza for reporting this issue: https://github.com/MichaIng/DietPi/issues/2975#issuecomment-513917360 -- DietPi-Software | OpenVPN: Resolved an issue where install failed on Debian Buster due to a new easy-rsa version with changed commands and options. Now the most recent easy-rsa is manually downloaded on all systems to generate server and client key + cert with modern methods and the client config is slighly updated to match modern settings. +- DietPi-Software | OpenVPN: Resolved an issue where install failed on Debian Buster due to a new easy-rsa version with changed commands and options. Now the most recent easy-rsa is manually downloaded on all systems to generate server and client key + cert with modern methods and the client config is slightly updated to match modern settings. +- DietPi-Software | XRDP: On Stretch, new the version from backports is installed. This resolves a critical issue where /etc/profile was not loaded to the session and, due to incomplete $PATH variable, important system binaries were not available on terminal emulators which broke many install and upgrade tasks. Furthermore this resolves an issue where install and connection of XRDP failed if IPv6 was disabled. Many thanks to @aspinks for the debug session which allowed us to track the issue down to its root: https://github.com/MichaIng/DietPi/issues/3017 As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/XXXX @@ -45,7 +46,7 @@ Changes / Improvements / Optimisations: - DietPi-FirstBoot | First boot setup steps have been moved into a separate script and systemd unit. This allows further cleanup of the regular boot process and more targeted debugging and development. Many thanks for @FredericGuilbault for implementing this enhancement: https://github.com/MichaIng/DietPi/issues/2791 - DietPi-Autostart | When choosing an autostart option that does not require a manual UNIX user login, the autologin user can now be chosen (which was always "root" previously). This can be applied automatically on firstrun setup with the new "AUTO_SETUP_AUTOSTART_LOGIN_USER" setting within dietpi.txt. If the user does not exist, is a system user (UID < 1000) or does not have a valid login shell, it will be reverted to root. Many thanks to @FredericGuilbault for suggesting this feature: https://github.com/MichaIng/DietPi/pull/2926 - DietPi-Globals | G_OBTAIN_CPU_TEMP(): Added support for Core2Duo CPU temperature to be printed on e.g. DietPi-Banner and "cpu" command output. Many thanks to @OstrovCity for posting the required information: https://github.com/MichaIng/DietPi/pull/2563#issuecomment-494388278 -- DietPi-Service 2.0 | Combines dietpi-process_tool into dietpi-services. Adds IO policies, single/global service control and much more: https://github.com/MichaIng/DietPi/pull/2786 +- DietPi-Service 2.0 | Combines dietpi-process_tool into dietpi-services. Adds I/O policies, single/global service control and much more: https://github.com/MichaIng/DietPi/pull/2786 - DietPi-Process_tool | Has been replaced with DietPi-Services. Existing saved options will no longer be available, please use 'dietpi-services' to apply required process_tool options with the upgraded system. - DietPi-Explorer | Disabled opening of files in nano under select a file/folder mode. - DietPi-Drive_Manager | Added the option to change the I/O scheduler per drive. Many thanks to @Generator for pointing us onto this topic: https://github.com/MichaIng/DietPi/issues/2233 @@ -59,7 +60,7 @@ Changes / Improvements / Optimisations: - DietPi-Software | FFmpeg: On RPi, the new APT repo package will be installed, which now supports RPi hardware acceleration and is some subversion newer then the package hosted on dietpi.com: https://github.com/MichaIng/DietPi/issues/869#issuecomment-490047405 - DietPi-Software | Gitea: Current stable v1.8.X will be installed now and existing instances will be upgraded during DietPi-Update. Many thanks to @msongz for implementing this: https://github.com/MichaIng/DietPi/pull/2881 - DietPi-Software | myMPD: Current upstream version will be installed now and existing instances will be upgraded during DietPi-Update, which requires a config file reset. A backup to recover custom settings from will be created: https://github.com/MichaIng/DietPi/issues/2156#issuecomment-497513129 -- DietPi-Software | O!MPD: Current upstream version will be installed now and existing instances will be upgraded during DietPi-Update. Existing config and database will be preserved. YouTube and Tidal support is added now by default. Many thanks to @ArturSierzant for giving valueable feedback and suggestions: https://github.com/MichaIng/DietPi/pull/2884 +- DietPi-Software | O!MPD: Current upstream version will be installed now and existing instances will be upgraded during DietPi-Update. Existing config and database will be preserved. YouTube and Tidal support is added now by default. Many thanks to @ArturSierzant for giving valuable feedback and suggestions: https://github.com/MichaIng/DietPi/pull/2884 - DietPi-Software | Ampache: Reinstalls will now preserve existing configs and database. - DietPi-Software | Medusa: mediainfo is now installed to enable Medusa gathering meta data and resolving related warnings in log. Additionally, on Stretch and above, Python3 is now installed and used, as recommended by Medusa for a while. Many thanks to @bluesmoke for suggesting this enhancement: https://dietpi.com/phpbb/viewtopic.php?f=11&t=5945 - DietPi-Software | Node-RED: "sudo" permissions are now enabled by default: https://github.com/MichaIng/DietPi/issues/2910 @@ -73,9 +74,9 @@ Bug Fixes: - DietPi-PREP | Resolved an issue where ifupdown (networking service) was autoremoved, which broke running network connections. - DietPi-Drive_Manager | Resolved an issue where idle spin down selection would always default to 241, instead of currently active value: https://github.com/MichaIng/DietPi/issues/2852 - DietPi-Drive_Manager | Resolved an issue where eCryptfs fstab entries were not detected and preserved correctly. Many thanks to @johnvick for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?p=18428#p18283 -- DietPi-Drive_Manager | Resolved an issue where transferring the RootFS to a BTRFS formated drive fails. Since BTRFS support is not natively built into the RPi and Odroid kernel, a warning prompts and the transfer is aborted. Many thanks to @dieitpi for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?p=18164#p18164 +- DietPi-Drive_Manager | Resolved an issue where transferring the RootFS to a BTRFS formatted drive fails. Since BTRFS support is not natively built into the RPi and Odroid kernel, a warning prompts and the transfer is aborted. Many thanks to @dieitpi for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?p=18164#p18164 - DietPi-Drive_Manager | Resolved an issue where on x86_64 systems a specific Seagate drive, attached via USB, does not spin down on idle. Many thanks to @tomillr for reporting this issue: https://github.com/MichaIng/DietPi/issues/2905 -- DietPi-Config | (RPi) Resolved an issue where selecting sound cards with vc4 enabled would result with incorrect alsa card index: https://github.com/MichaIng/DietPi/issues/2173 +- DietPi-Config | (RPi) Resolved an issue where selecting sound cards with vc4 enabled would result with incorrect ALSA card index: https://github.com/MichaIng/DietPi/issues/2173 - DietPi-Config | Resolved an issue where selecting any locale (language) failed, which does not contain "UTF-8" in its name. DietPi only supports UTF-8 locales, but those available with UTF-8 only, do not have the ".UTF-8" suffix in their name. - DietPi-Software | Resolved an issue on Buster systems that were dist-upgraded manually from Stretch, where DietPi-Software failed to obtain the global software password. Many thanks to @MattL0 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2937 - DietPi-Software | Resolved an issue where audio software failed to use hardware acceleration on Buster. Users need to be part of the new "render" group on Buster to have permissions. Many thanks to @tomillr for reporting this issue: https://github.com/MichaIng/DietPi/issues/2916 @@ -94,7 +95,7 @@ v6.24.1 Bug Fixes: - DietPi-WiFi-Monitor | Resolved an issue where the service leads to a constant high CPU load. Many thanks for @GulyFMG for reporting this issue: https://github.com/MichaIng/DietPi/issues/2802 -- DietPi-Software | PHP: On ARMv6, fine tuned the required Buster branch priority pins to avoid certain ATP dependency errors. Many thanks to @maartenlangeveld for reporting this issue: https://github.com/MichaIng/DietPi/issues/2808, https://github.com/MichaIng/DietPi/issues/2811 +- DietPi-Software | PHP: On ARMv6, fine tuned the required Buster branch priority pins to avoid certain APT dependency errors. Many thanks to @maartenlangeveld for reporting this issue: https://github.com/MichaIng/DietPi/issues/2808, https://github.com/MichaIng/DietPi/issues/2811 - DietPi-Software | Lighttpd: Resolved an issue where Lighttpd fails to start on ARMv6. Many thanks to @maartenlangeveld for reporting this issue: https://github.com/MichaIng/DietPi/issues/2808 As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/2819 @@ -133,11 +134,11 @@ Buster support: Changes / Improvements / Optimisations: - DietPi-Banner | Added support for DietPi message of the day (MOTD). This is enabled by default, however, can be disabled. Checks for latest MOTD once a day. - DietPi-Banner | Always prints the local IP during boot mode display: https://github.com/MichaIng/DietPi/issues/2681 -- DietPi-Benchmark | Increased default survey RootFS and RAM benchmark sizes. 100MB (from 10MB) for RootFS. RAM is 1/4 of available. This is ensure a more accurate calculation of throughput when we divide bytes against time, to obtain the MB/s result. Benchmarks now also run at Nice -19 and realtime IO with priority 0 (highest). +- DietPi-Benchmark | Increased default survey RootFS and RAM benchmark sizes. 100MB (from 10MB) for RootFS. RAM is 1/4 of available. This is ensure a more accurate calculation of throughput when we divide bytes against time, to obtain the MB/s result. Benchmarks now also run at Nice -19 and realtime I/O with priority 0 (highest). - DietPi-Cleaner | Added a confirmation prompt, before removal of offline docs and man pages, as this may cause APT issues in some circumstances. Many thanks to @maartenlangeveld for reporting this issue: https://github.com/MichaIng/DietPi/issues/2751 - DietPi-LetsEncrypt | When applying to Lighttpd, "webroot" authentication is now used instead of "standalone". This allows the auto-renewal service to succeed while Lighttpd is running. Many thanks to @minnux for testing this method: https://github.com/MichaIng/DietPi/issues/2680#issuecomment-480095449 - DietPi-Arr_to_RAM | With v6.18 we silently added a new script (for Stretch and above) that allows linking Sonarr/Radarr/Lidarr database files to RAM, increasing access performance, reducing disk I/O and avoiding constant external HDD spinning due to the very regular access to these files. This script has gone through some rework and polishing and can now be enabled to automatically link those databases to RAM on boot and store them back to disk on shutdown. For more details read: https://dietpi.com/phpbb/viewtopic.php?f=8&t=5828. Many thanks to @Dr0bac for providing valuable input and testing the development progress constantly: https://github.com/MichaIng/DietPi/issues/2689 -- DietPi-Drive_Manager | encryptfs and vboxsf (VirtualBox shared folder) fstab entries are now preserved. Many thanks to @johnvick and @Phil1988 for suggesting: https://github.com/MichaIng/DietPi/issues/2078, https://github.com/MichaIng/DietPi/issues/2202 +- DietPi-Drive_Manager | eCryptfs and vboxsf (VirtualBox shared folder) fstab entries are now preserved. Many thanks to @johnvick and @Phil1988 for suggesting: https://github.com/MichaIng/DietPi/issues/2078, https://github.com/MichaIng/DietPi/issues/2202 - DietPi-PREP | The script execution can now be fully automated via environment variables. Many thanks to @FredericGuilbault for adding this feature: https://github.com/MichaIng/DietPi/pull/2756 - DietPi-Config | Added support to toggle Intel CPU turbo/boost mode. Requires Intel CPU that supports the feature. - DietPi-Config | G_CHECK_URL: Added ability to change the connection attempts and timeout, before DietPi URL checking assumes a dead link and failure: https://github.com/MichaIng/DietPi/issues/2717 @@ -152,7 +153,7 @@ Changes / Improvements / Optimisations: - DietPi-Software | Plex Media Server: All systems are migrated to the new official APT repository. This allows easy and consistent upgrades via APT. On ARM systems the until now used 3rd party dev2day repo receives no further updates and will be shut down soon, which makes the migration mandatory. Many thanks to @WolfganP for keeping us informed with news about Plex v1.15 and the new APT repo: https://github.com/MichaIng/DietPi/issues/2655 - DietPi-Software | Logitech Media Server: Now installs the latest nightly version, since no public "releases" are done. As well the systemd service has gone through some update and now runs as limited user to align with other media servers, enhance security and follow the defaults of the DPKG package. The update/change is applied to existing installs via DietPi-Update as well. Your settings/date are preserved. - DietPi-Software | Nextcloud Talk: We do not apply (D)TLS settings to coTURN any more. Since WebRTC is encrypted by itself there is no security benefit. More importantly Nextcloud Talk does not make use of the required TURNS protocol, so there is absolutely no point to apply these settings. The (D)TLS feature is meant to allow passing firewalls that only allow encrypted traffic. WebRTC, although encrypted, might not pass such firewalls since the encryption is not on transport layer. For those how are interested in further details and discussion: https://github.com/coturn/coturn/issues/33, https://github.com/nextcloud/spreed/issues/257 -- DietPi-Software | SABnzbd: Install latest version via GitHub master and skip adjusting existing config file. Systemd unit and dependencies have been adjusted to match minimum requirements and official documentation. The update will be applied via DietPi v6.23 patch as well. Many thanks to @19eighties for reporting the outdated version: https://github.com/MichaIng/DietPi/issues/2762 +- DietPi-Software | SABnzbd: Install latest version via GitHub master and skip adjusting existing config file. systemd unit and dependencies have been adjusted to match minimum requirements and official documentation. The update will be applied via DietPi v6.23 patch as well. Many thanks to @19eighties for reporting the outdated version: https://github.com/MichaIng/DietPi/issues/2762 - DietPi-Software | Jackett: On non-ARMv6 devices the new (v0.11+) standalone (non-mono) binary is installed now. This is applied on DietPi-Update as well, preserving your settings: https://github.com/MichaIng/DietPi/pull/2773 - DietPi-Software | Blynk: Enabled support for Debian Buster by using the new Java 11 binary. - DietPi-Software | UrBackup: New version 2.3.8 is installed now. Many thanks to @DeathIsUnknown for informing us about the update: https://github.com/MichaIng/DietPi/issues/2783 @@ -165,7 +166,7 @@ Bug Fixes: - DietPi-Login | Resolved an issue where login as non-root user could result in a "sudo" password prompt or endless failure loop due to missing sudo permissions. Many thanks to @xsak for reporting this issue: https://github.com/MichaIng/DietPi/issues/2667 - DietPi-Software | Emby Server: Resolved an issue where download failed if the latest release does not contain a Debian package. Many thanks to @niblettr for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?f=11&t=5755 - DietPi-Software | Transmission: Resolved an issue where double quotes in global software password caused a service startup failure. Many thanks to @Drew80 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2484#issuecomment-480675168 -- DietPi-Software | WireGuard: Resolved an issue where IPv6 connections did not work with enabled IPv6 forwarding. Many thats to @schnuckz for reporting this issue: https://github.com/MichaIng/DietPi/issues/2691 +- DietPi-Software | WireGuard: Resolved an issue where IPv6 connections did not work with enabled IPv6 forwarding. Many thanks to @schnuckz for reporting this issue: https://github.com/MichaIng/DietPi/issues/2691 - DietPi-Software | Subsonic: Resolved an issue where FFmpeg transcoder might not have been applied correctly. Many thanks to @spectrumcomputing for reporting this issue: https://github.com/MichaIng/DietPi/issues/2697 - DietPi-Software | AmiBerry: Resolved an issue where no login prompt was present when exiting AmiBerry from fastboot mode. Many thanks to @Trigger58 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2703#issuecomment-482471440 - DietPi-Software | Logitech Media Server: Resolved an issue where certain plugins failed due to missing "libio-socket-ssl-perl". Many thanks to @noobian and @Edward for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?f=9&t=5824 @@ -219,7 +220,7 @@ Bug Fixes: - DietPi-Config | RPi: Resolved an issue where I-Sabre-K2M sound card selection failed. Thanks to @klasLiesen for reporting this issue: https://github.com/MichaIng/DietPi/issues/2547 - DietPi-Config | RPi: Resolved an issue where serial console must be disabled, for Bluetooth to function correctly. This is now done automatically during BT enable: https://github.com/MichaIng/DietPi/issues/2607 - DietPi-Config/Banner | Resolved an issue where wrong adapter state is shown if it is not connected but has an IP assigned. Thanks to @msongz for reporting this issue: https://github.com/MichaIng/DietPi/issues/2573 -- DietPi-Drive_Manager | Resolved an issue where RootFS RO would not remain during reboots. Many thanks to @JBatSEEDLING for reporting this issue: https://github.com/MichaIng/DietPi/issues/2604 +- DietPi-Drive_Manager | Resolved an issue where RootFS R/O would not remain during reboots. Many thanks to @JBatSEEDLING for reporting this issue: https://github.com/MichaIng/DietPi/issues/2604 - DietPi-Software | XU4 + X11: Resolved various issues related to incorrect xorg.conf settings on this device. xorg.conf now used is installed automatically from Meveric's repo, which auto detects 3.x and 4.x kernel configuration and required settings automatically: https://github.com/MichaIng/DietPi/issues/2584 + https://github.com/MichaIng/DietPi/issues/2351 - DietPi-Software | MineOS/Koel: Resolved an issue where installs on ARMv8 devices failed. Many thanks to @DeathIsUnknown for reporting this issue and providing the solution: https://github.com/MichaIng/DietPi/issues/1880#issuecomment-464097174 - DietPi-Software | GMediaRender: Resolved an issue where the daemon can attach to a wrong IP if multiple network devices are present. As well resolved a failing service start on fresh install if/as the log file does not yet exist. Many thanks to @WilburWalsh for reporting these issues and providing the fix: https://github.com/MichaIng/DietPi/issues/2576 @@ -267,7 +268,7 @@ Image line-up: Changes / Improvements / Optimisations: - DietPi-PREP | Removed the option to install a Jessie system. Removed the option to install DietPi on top of a Wheezy image, since an upgrade over two distro version would be required, which is not reliable. It is still possible to install DietPi on top of a Jessie image, where a distro upgrade to Stretch would be applied: https://github.com/MichaIng/DietPi/issues/2332 -- General | RPi-Update: In our effort to improve system stability, and, offer software installations which build custom modules (eg: WireGuard), we can not longer support systems with non-stock APT kernel installed. If "rpi-update" is installed during update, DietPi will prompt and return you back to stock APT kernel. +- General | RPi-Update: In our effort to improve system stability, and, offer software installations which build custom modules (e.g. WireGuard), we can not longer support systems with non-stock APT kernel installed. If "rpi-update" is installed during update, DietPi will prompt and return you back to stock APT kernel. - General | Moved the remaining conf/* files located on DietPi-RAMdisk to /var/lib/dietpi or into DietPi-PREP, and removed /DietPi/dietpi/conf completely. These files were only used once or never, thus have no business inside the RAMdisk. - DietPi-Config | RPi: Improved available options for HDMI boost setting: https://github.com/MichaIng/DietPi/issues/2350 - DietPi-Config | RPi: Headless display mode is now applied via undocumented config.txt setting. Removed/Replaced some other obsolete config.txt entries: https://github.com/MichaIng/DietPi/pull/2402 @@ -283,7 +284,7 @@ Changes / Improvements / Optimisations: - DietPi-Software | Nextcloud Talk: Disabled the very verbose coturn logging by default to reduce disk I/O. This can be overridden via /etc/turnserver.conf: https://github.com/MichaIng/DietPi/issues/2321 - DietPi-Software | Deluge: UMask 002 applied to all downloads: https://github.com/MichaIng/DietPi/issues/2339 - DietPi-Software | Netdata: Updated to v1.11.1 and now runs as user "netdata": https://github.com/MichaIng/DietPi/pull/2337 -- DietPi-Software | ownCloud/Nextcloud: Updated webserver configs to match current recommendations and security hardenings. Only applied on new installs. To apply manually, run "dietpi-software reinstall 47" (owncloud) or "dietpi-software reinstall 114" (Nextcloud). You will be informed about the new configs, which then need to be manually moved to overwrite the old ones, since we don't want to mess with manual changes: https://github.com/MichaIng/DietPi/pull/2361 +- DietPi-Software | ownCloud/Nextcloud: Updated webserver configs to match current recommendations and security hardenings. Only applied on new installs. To apply manually, run "dietpi-software reinstall 47" (ownCloud) or "dietpi-software reinstall 114" (Nextcloud). You will be informed about the new configs, which then need to be manually moved to overwrite the old ones, since we don't want to mess with manual changes: https://github.com/MichaIng/DietPi/pull/2361 - DietPi-Software | OpenSSH: Host keys won't be recreated anymore on reinstall, only on first boot of a fresh image, using now "dpkg-reconfigure openssh-server" to generate default key types based on distro. - DietPi-Software | Dropbear: Now installs only the "dropbear-run" package on Stretch (and above), which matches the default DietPi setup on our images and PREP script. - DietPi-Software | NAA Daemon: Updated to 3.5.5-39. Thanks to @volpone for the heads up: https://github.com/MichaIng/DietPi/issues/2387#issue-395321320 @@ -306,7 +307,7 @@ Bug Fixes: - DietPi-Software | Nextcloud: Resolved an issue, where the Nextcloud Apache config was not downloaded correctly. Thanks to @Stefan3v for reporting this issue: https://github.com/MichaIng/DietPi/issues/2383 - DietPi-Software | ownCloud/Nextcloud (Talk): Resolved an issue, where occ/ncc commands could fail, if Redis server is not running: https://github.com/MichaIng/DietPi/issues/2321 - DietPi-Software | ownCloud/Nextcloud: Resolved an issue, where during fresh installs on v6.19, Apache configs were not enabled correctly. -- DietPi-Software | MPD: Resolved an issue on Stretch, where the mpd binary could not find the configuration file without giving it explicitely as argument. Thanks to @mfeif for reporting this issue: https://github.com/MichaIng/DietPi/issues/2378 +- DietPi-Software | MPD: Resolved an issue on Stretch, where the mpd binary could not find the configuration file without giving it explicitly as argument. Thanks to @mfeif for reporting this issue: https://github.com/MichaIng/DietPi/issues/2378 - DietPi-Software | Mopidy: Resolved an issue, where playlist files could not be created due to missing permissions. Further improved handling of existing configs, data and cache directories on (re)install. Thanks to @cyberlussi for reporting this issue: https://github.com/MichaIng/DietPi/issues/2384 - DietPi-Software | Deluge: Resolved a visual-only error in systemd unit, since same-line comments are not allowed anymore. Thanks to @Gabba for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=5378 - DietPi-Software | No-IP: Fixed an issue, where on "Generic device" (ID 22), the wrong binary could have been installed. As well added failsafe "/usr/local/[bin|etc]" directory pre-creation, in case not present on the system or manually removed by user. Thanks to @walker93 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2426 @@ -377,14 +378,14 @@ Changes / Improvements / Optimisations: - General | Concurrent execution detection: Now has a 5 second buffer to wait for exit (G_INIT_WAIT_CONCURRENT), before failing: https://github.com/MichaIng/DietPi/issues/2159#issuecomment-433619721 - DietPi-Config | Added support for changing the brightness of the RPi touchscreen: https://github.com/MichaIng/DietPi/issues/2169 - DietPi-Config | Added support for setting Xorg DPI scale. - - DietPi-Services | MariaDB: DietPi now uses the pre-installed "mariadb" systemd service instead of obsoleve "mysql" init.d service: https://github.com/MichaIng/DietPi/pull/2196 + - DietPi-Services | MariaDB: DietPi now uses the pre-installed "mariadb" systemd service instead of obsolete "mysql" init.d service: https://github.com/MichaIng/DietPi/pull/2196 - DietPi-Software | Nextcloud Talk video calls with configured TURN server is now available for install: https://github.com/MichaIng/DietPi/pull/2197 - DietPi-Software | NAA Daemon: Added installation support for ARMv8 and x86_64. Thanks Jussi! - DietPi-Software | Pi-hole: During (re)install you can now decide whether to show a blocking page to clients or not: https://github.com/MichaIng/DietPi/issues/2007 - DietPi-Software | MotionEye: Now available to install for all devices. Removed support from Jessie: https://github.com/MichaIng/DietPi/issues/2229 - DietPi-Software | G_BACKUP_FP: New feature rolled out to MPD and web server base DietPi-Software installations, in which config files are backed up before DietPi overwrites them: https://github.com/MichaIng/DietPi/issues/2187#issuecomment-433626639 - DietPi-Software | SickRage: Is no longer available for installation. We will asses a replacement in v6.19. Sonarr is an excellent alternative with faster performance and stability.: https://github.com/MichaIng/DietPi/issues/2239 - - DietPi-Software | Docker: Now runs under 'simple' service type (previously 'notify'), to prevent service start delay which can occur on ARM based devices (eg: RPi), from delaying other applications starting on the system: https://github.com/MichaIng/DietPi/issues/2238#issuecomment-439474766 + - DietPi-Software | Docker: Now runs under 'simple' service type (previously 'notify'), to prevent service start delay which can occur on ARM based devices (e.g. RPi), from delaying other applications starting on the system: https://github.com/MichaIng/DietPi/issues/2238#issuecomment-439474766 - DietPi-Software | Mosquito: Service updated to systemd: https://github.com/MichaIng/DietPi/issues/2243 - DietPi-Software | Radarr/Sonarr/Lidarr: logs (both .txt and .db*) have been moved to DietPi-RAMlog: https://github.com/MichaIng/DietPi/issues/2223 - DietPi-Software | Pydio: WebUI warnings (security, performance) are now resolved for Nginx and Lighttpd webservers as well. Separate config files are created instead of touching the defaults, to enable required settings for Pydio only. Required PHP modules are installed and enabled, to be failsafe. Preserve existing install dirs on (re)install and inform user to update via WebUI updater: https://github.com/MichaIng/DietPi/issues/1913 @@ -393,31 +394,31 @@ Changes / Improvements / Optimisations: - DietPi-Software | Tautulli: Install enabled for ARMv8 devices. Bug Fixes: - - PREP: Resovled an issue where master.zip would always be downloaded, regardless of selected branch. + - PREP: Resolved an issue where master.zip would always be downloaded, regardless of selected branch. - PREP: Resolved failed rootFS resize: https://github.com/MichaIng/DietPi/issues/2181#issuecomment-433715556 - General | Resolved various gwtcwd errors during boot and software installations on VM: https://github.com/MichaIng/DietPi/issues/2237 - General | NanoPi Fire3: Resolved an issue with blank HDMI output. Device is now switched to tty2 during boot, as a workaround/fix due to tty1 failing: https://github.com/MichaIng/DietPi/issues/2225 - General | Resolved an issue, where entering passwords via our internal whiptail password box leads to "invalid match", when special characters are used, forcing a retry: https://github.com/MichaIng/DietPi/issues/2215#issuecomment-437683709 - DietPi-Cleaner | Resolved an issue where test runs on -dev package removal, would remove the packages. - DietPi-Cleaner | Resolved a syntax error with function 'Run_Cleaners', disabling the ability to run cleaners. Many thanks to @optio50 for reporting this issue! https://github.com/MichaIng/DietPi/issues/2241 - - DietPi-Config | Resovled an visual error when selecting network options due to 'G_CHECK_VALIDINT'. + - DietPi-Config | Resolved an visual error when selecting network options due to 'G_CHECK_VALIDINT'. - DietPi-Config | Locale: Resolved an issue where DietPi would always display en_GB as the current locale: https://github.com/MichaIng/DietPi/issues/2216#issuecomment-435599419 - DietPi-Config | Resolved an issue where on Odroid C1/2 with current kernel 3.5" LCD shield does not work anymore. Thanks to @Kreeblah for reporting this issue and solution: https://github.com/MichaIng/DietPi/issues/2256 - DietPi-Automation | CONFIG_NTP_MODE is now applied after APT cache, and, initial time sync is updated. Due to packages required for some modes: https://github.com/MichaIng/DietPi/issues/2181#issuecomment-433444882 - DietPi-Software | Resolved an issue where rsyslog APT installation would report a failure, if service was already running previously but not installed via APT (mostly in backup/restore situations): https://github.com/MichaIng/DietPi/pull/2277/#issuecomment-441461982 - - DietPi-Software | Kodi: Resolved an issue where restart/shutdown options were not visable, due to lack of systemd-logind: https://github.com/MichaIng/DietPi/issues/2155 - - DietPi-Software | Mono applications (Radarr/Sonarr/Lidarr/Jackett): Rolled out "-O=-aot" (ahead of time optimzation) to all applications, which resolves a known external bug with recent Mono update. Many thanks to @Generator for testing and confirming this issue: https://github.com/MichaIng/DietPi/issues/2219#issuecomment-437594645 + - DietPi-Software | Kodi: Resolved an issue where restart/shutdown options were not visible, due to lack of systemd-logind: https://github.com/MichaIng/DietPi/issues/2155 + - DietPi-Software | Mono applications (Radarr/Sonarr/Lidarr/Jackett): Rolled out "-O=-aot" (ahead of time optimisation) to all applications, which resolves a known external bug with recent Mono update. Many thanks to @Generator for testing and confirming this issue: https://github.com/MichaIng/DietPi/issues/2219#issuecomment-437594645 - DietPi-Software | Roon Bridge: Resolved an issue where the remote update would fail due to underpriv permissions: https://community.roonlabs.com/t/dietpi-allo-units-not-getting-the-roonbridge-b167-update-from-b164/52503/6 - DietPi-Software | Nextcloud: Resolved an issue with failed installation: https://github.com/MichaIng/DietPi/issues/2184 - - DietPi-Software | Nextcloud/Owncloud: Resolved an issue where userdata located on external drive would fail the installation: https://github.com/MichaIng/DietPi/issues/2221 - - DietPi-Software | OMPD/MyMPD: Resolved inability to update database. Currently we have rolled back the versions of these programs to a working state. We will investigate with the devs to find out the cause for future release: https://github.com/MichaIng/DietPi/issues/2156 + - DietPi-Software | Nextcloud/ownCloud: Resolved an issue where userdata located on external drive would fail the installation: https://github.com/MichaIng/DietPi/issues/2221 + - DietPi-Software | OMPD/myMPD: Resolved inability to update database. Currently we have rolled back the versions of these programs to a working state. We will investigate with the devs to find out the cause for future release: https://github.com/MichaIng/DietPi/issues/2156 - DietPi-Software | Jackett: Resolved an issue where reinstall created an additional nested install dir. Thanks @msdos for reporting this issue: https://github.com/MichaIng/DietPi/issues/2212 - DietPi-Software | RoonServer: Resolved an issue where reinstall created an additional nested install dir. Since RoonServer has an automated internal updater, download and install will be skipped, if install already exists. - DietPi-Software | PHP/databases: Resolved an issue where PHP database modules were not installed, when installing a new database and PHP was already installed before. - DietPi-Software | PHP: On Buster, moved to PHP7.3, since php-apcu and php-redis are not available for PHP7.2 any more. This resolves both PHP versions being installed concurrently. - DietPi-Software | OpenBazaar: Resolved an issue where remote OB clients could not connect to server with default configuration: https://github.com/MichaIng/DietPi/pull/2224 - DietPi-Software | Resolved an issue where a global password with special characters lead to failing installs, due to missing escaping within our internal function G_CONFIG_INJECT. Thanks to @MistahDarcy for reporting this issue: https://github.com/MichaIng/DietPi/issues/2215 - - DietPi-Software | Docker: Resolved an issue where the Docker daemon failes to start due to invalid command argument. Thanks to @mspieth376 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2238 + - DietPi-Software | Docker: Resolved an issue where the Docker daemon fails to start due to invalid command argument. Thanks to @mspieth376 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2238 - DietPi-Software | Grafana: Resolved an issue, where WebUI password is not applied correctly, when containing ";" or "#". Thanks to @Warmbadger for reporting this issue and solution: https://dietpi.com/phpbb/viewtopic.php?f=11&t=5248 - DietPi-Software | Tautulli: Resolved an issue where Tautulli service failed to start up. As well improved reinstall, if install dir is already existent. Thanks to @Comfubar for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?f=11&t=5256 - DietPi-Obtain_network_details | Resolved a tiny visual-only error message on non-root logins. Thanks to @AndrewZ for reporting: https://dietpi.com/phpbb/viewtopic.php?f=9&t=5194 @@ -431,10 +432,10 @@ v6.17 (25/10/18) Changes / Improvements / Optimisations: - - General | NanoPC T4: Image updated to include lastest kernel (4.4.154). Many thanks to @carlosedp for providing this kernel! https://github.com/MichaIng/DietPi/issues/1829#issuecomment-429324437 + - General | NanoPC T4: Image updated to include latest kernel (4.4.154). Many thanks to @carlosedp for providing this kernel! https://github.com/MichaIng/DietPi/issues/1829#issuecomment-429324437 - General | DietPi now has 3 branches (master=stable, beta=public testing, dev=dev). By default, all users are on master/stable branch: https://github.com/MichaIng/DietPi/issues/2083#issuecomment-426842537 - General | Improved detection of permissions support during user data transfers: https://github.com/MichaIng/DietPi/issues/2096 - - General | IPv6: Due to the requirements of various software titles available in dietpi-software (eg: nginx, redis-server), and that IPv6 is slowly becoming more common place, IPv6 is now disabled via sysctl on interface level, while it stays enabled on kernel level: https://github.com/MichaIng/DietPi/issues/2027 + - General | IPv6: Due to the requirements of various software titles available in dietpi-software (e.g. Nginx, Redis), and that IPv6 is slowly becoming more common place, IPv6 is now disabled via sysctl on interface level, while it stays enabled on kernel level: https://github.com/MichaIng/DietPi/issues/2027 - DietPi-Autostart | Chromium: You will now be prompted to enter a homepage URL, which will be loaded when the application starts: https://github.com/MichaIng/DietPi/issues/2169#issuecomment-432297343 - DietPi-Config | RPi: Added support for LCD panel "Elecrow ESP01215E 7 inch HDMI IPS with touch input" (basically a cheaper RPi touchscreen): https://www.amazon.co.uk/gp/product/B07H79XMLT/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1 - DietPi-Config | Added ability to benchmark network LAN transfer rates using 2 DietPi systems. @@ -443,17 +444,17 @@ Changes / Improvements / Optimisations: - DietPi-Config | Online Benchmarks Database! Now available. Simply run the benchmark from the tools menu, to upload your scores and compare against others: https://dietpi.com/survey - DietPi-Automation | Added settings to dietpi.txt to toggle IPv6 and IPv4 preference on first boot. - DietPi-Update | You now have the option to view the changelog, prior to updating: https://github.com/MichaIng/DietPi/issues/2081 - - DietPi-Software | Sabnzbd: Updated to 2.3.5 for new installations only. Now runs under its own limited user account, and, umask of 0775 for downloads: https://github.com/MichaIng/DietPi/issues/2172 + - DietPi-Software | SABnzbd: Updated to 2.3.5 for new installations only. Now runs under its own limited user account, and, umask of 0775 for downloads: https://github.com/MichaIng/DietPi/issues/2172 - DietPi-Software | Card/CalDAV request redirection was added to new Baikal, ownCloud and Nextcloud installs. Now only the servers domain/IP need to be entered on Card/CalDAV clients, without any further path to the DAV endpoints: https://github.com/MichaIng/DietPi/issues/2057 - DietPi-Software | Plex Media Server and Transmission services run now as group "dietpi", to allow cross access with download managers and media software: https://github.com/MichaIng/DietPi/issues/2067#issuecomment-427579779 - DietPi-Set_Hardware | Odroid C2: When selecting USB DAC, smp affinity will be applied for USB IRQ's to improve stability: https://github.com/MichaIng/DietPi/issues/2101 - - DietPi-Drive_Manager | Formatting: Now has the option to format the whole drive, or patition only, for drives with existing partitions. - - DietPi-Drive_Manager | Mounting NTFS drives now enabled native linux permissions support (eg: you can use this as your userdata location). Many thanks to @Random90 for making this possible! https://github.com/MichaIng/DietPi/issues/2096#issuecomment-425553333 + - DietPi-Drive_Manager | Formatting: Now has the option to format the whole drive, or partition only, for drives with existing partitions. + - DietPi-Drive_Manager | Mounting NTFS drives now enabled native linux permissions support (e.g. you can use this as your userdata location). Many thanks to @Random90 for making this possible! https://github.com/MichaIng/DietPi/issues/2096#issuecomment-425553333 - DietPi-Drive_Manager | Improved detection and formatting for NVMe based drives: https://github.com/MichaIng/DietPi/issues/2102 - DietPi-Drive_Manager | Removed /proc from fstab. No longer required as this created at kernel/systemd level: https://github.com/MichaIng/DietPi/issues/2154 Bug Fixes: - - General | G_THREAD_START: Resolved issue where this was running in blocking mode. Now uses exit code to indentify finished tasks instead of PID. + - General | G_THREAD_START: Resolved issue where this was running in blocking mode. Now uses exit code to identify finished tasks instead of PID. - DietPi-Cloudshell | Resolved various issues with inability to run service via SSH on another screen, and, G_DIETPI-NOTIFY errors. Many thanks to @potter-91 for reporting this issue! https://github.com/MichaIng/DietPi/issues/2104 - DietPi-Config | WiFi-Monitor: Resolved an issue with syntax, and, incorrectly pinging the default gateway, instead of whats assigned to the wlan interface: https://github.com/MichaIng/DietPi/issues/2103 - DietPi-Config | dietpi-wifi.db code has been optimized, and, also resolves an issue where '/var/lib/dietpi/dietpi-wifi.db' was not generated automatically: https://github.com/MichaIng/DietPi/issues/2087#issuecomment-423836528 @@ -465,8 +466,8 @@ Bug Fixes: - DietPi-Software | Fixed an issue where software uninstalls could have failed due to dependant packages. Thanks to @dynobot for reporting this issue: https://github.com/MichaIng/DietPi/issues/2091 - DietPi-Software | Webservers/PHP: Fixed an issue, where PHP was not installed when a webserver was installed directly via "dietpi-software install 8X". - DietPi-Software | Nextcloud: On Jessie systems, no newer version than latest NC13 will be installed, because PHP5 support was dropped with NC14: https://github.com/MichaIng/DietPi/issues/1778#issuecomment-419918372 - - DietPi-Software | MyMPD: Resolved an issue where the service would fail to run: https://github.com/MichaIng/DietPi/issues/2088 - - DietPi-Software | MyMPD: Resolved an issue where the installation would fail, due to a recent MyMPD update with new pre-reqs: https://github.com/MichaIng/DietPi/issues/2088#issuecomment-423852124 + - DietPi-Software | myMPD: Resolved an issue where the service would fail to run: https://github.com/MichaIng/DietPi/issues/2088 + - DietPi-Software | myMPD: Resolved an issue where the installation would fail, due to a recent myMPD update with new pre-reqs: https://github.com/MichaIng/DietPi/issues/2088#issuecomment-423852124 - DietPi-Software | SiCKRAGE: Resolved failing install due to changed capitalization of SiCKRAGE GitHub repo, and, various additional pre-reqs due to new install method required by SiCKRAGE. Thanks to @mdoary for reporting this issue: https://github.com/MichaIng/DietPi/issues/2126 - DietPi-Software | VNC Server: Resolved an issue where VNC server would fail to start under shared desktop mode, many thanks to @LieDanG for reporting this issue: https://github.com/MichaIng/DietPi/issues/2142#issuecomment-430492281 - DietPi-Process_tool | Resolved an issue where applying process settings on Plex Media Server failed, thanks to @symbios24 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2089 @@ -511,8 +512,8 @@ Changes / Improvements / Optimizations: General | Changed Survey and Bugreport uploads to use ssh.dietpi.com (previously IP): https://github.com/MichaIng/DietPi/issues/2022#issuecomment-415470064 General | 1st run setup and dietpi-update logs are now created in RAM, then copied to disk once completed '/var/tmp/dietpi/logs/dietpi-firstrun-setup.log'. This will speed up 1st run setup installation for slow SBCs and/or rootFS. General | PineA64: Image updated to v6.14, also contains the latest kernel/uboot by Ayufan (0.6.2): https://github.com/MichaIng/DietPi/issues/2026 -General | Resolved an isssue where the initial 1st run connection test would fail, if timesync had not yet completed, and, the SSL cert of the connection test site is not valid for current date on system: https://github.com/MichaIng/DietPi/issues/2039 -General| SparkySBC: Support for native DSD playback on iFi Pro iDSD. Many thanks @sudeep: https://github.com/sparky-sbc/sparky-test/tree/master/dsd-marantz +General | Resolved an issue where the initial 1st run connection test would fail, if timesync had not yet completed, and, the SSL cert of the connection test site is not valid for current date on system: https://github.com/MichaIng/DietPi/issues/2039 +General | Sparky SBC: Support for native DSD playback on iFi Pro iDSD. Many thanks @sudeep: https://github.com/sparky-sbc/sparky-test/tree/master/dsd-marantz DietPi-Backup/Sync | rsync transfer: Now shows progress information during the transfer: https://github.com/MichaIng/DietPi/issues/2044#issuecomment-417779406 DietPi-Backup | Added an option to delete the currently selected backup, if it exists. DietPi-Config | Advanced Options: You can now toggle if a real RTC is installed. This adds/removes 'fake-hwclock' package installation as requested: https://github.com/MichaIng/DietPi/issues/2041 @@ -545,7 +546,7 @@ Changes / Improvements / Optimizations: DietPi-Software | GLOBAL_PW: The global password used by DietPi-Software is now encrypted with AES-256, removed from '/boot/dietpi.txt' and stored securely on rootFS with root:root/700 access only: https://github.com/MichaIng/DietPi/issues/2021 DietPi-Software | FreshRSS, a self-hosted RSS feed aggregator, now available for installation. Thanks @msongz for requesting an RSS reader: https://github.com/MichaIng/DietPi/issues/1996 DietPi-Software | BruteFIR: Due to low install count (7), we have removed this software from the DietPi database, and, is no longer available for installation. -DietPi-Software | NAA Daemon: Installation updated to 3.5.4-38. Thanks Volpone for the heads up!: https://dietpi.com/phpbb/viewtopic.php?f=11&t=4420 +DietPi-Software | NAA Daemon: Installation updated to 3.5.4-38. Thanks @Volpone for the heads up!: https://dietpi.com/phpbb/viewtopic.php?f=11&t=4420 General | '/etc/machine-id' is now unique for each DietPi installation. Regenerated during patch: https://github.com/MichaIng/DietPi/issues/2015 Bug Fixes: @@ -563,14 +564,14 @@ v6.13 Changes / Improvements / Optimizations: General | Sparky SBC: Added driver to support RTL8812AU WiFi based chipsets: https://github.com/sparky-sbc/sparky-test/tree/master/rtl8812au -DietPi-Globals | G_THREAD_WAIT: Now displays errors for each thread, if they occured. +DietPi-Globals | G_THREAD_WAIT: Now displays errors for each thread, if they occurred. DietPi-Config | NTP mirror selection has been reworked. It allows now to add local and external non-pool.ntp.org servers and local gateway auto detection: https://github.com/MichaIng/DietPi/issues/1688 DietPi-Config | Display Options > Backlight Brightness: Now available for Intel compatible backlight devices. DietPi-Explorer | Whiptail based, minimial/lightweight file explorer and manager now available for use! DietPi-Services | You can now include custom services, and, exclude DietPi controlling services known to it. Please see the following file '/DietPi/dietpi/.dietpi-services_include_exclude' for more information: https://github.com/MichaIng/DietPi/issues/1114#issuecomment-411325075 DietPi-Software | A new unified download&install function is implemented, which allows more consistent download and install of software, using /tmp RAMFS as working directory and parallel dependencies installation via G_THREAD. DietPi-Software | Koel: Installation will now skip webserver, as Koel uses PHP-CLI instead. To not mess with webserver served pages, Koel install directory is moved to "/mnt/dietpi_userdata/koel", for existing installs as well. -DietPi-Software | Mono: Now installs 'mono-complete' by default, required for Mono based applications (eg: Radarr/Sonarr/Lidarr/Jackett etc) +DietPi-Software | Mono: Now installs 'mono-complete' by default, required for Mono based applications (e.g. Radarr/Sonarr/Lidarr/Jackett etc) DietPi-Software | Lidarr: Now available for installation, automatically download music: https://github.com/MichaIng/DietPi/issues/1874 DietPi-Software | Samba Server: Now creates and defaults to the login creds for the 'dietpi' user (previously 'root'). For fresh installations of Samba only: https://github.com/MichaIng/DietPi/issues/1991#issuecomment-410505982 DietPi-Software | Folding@Home: Now available for installation on x86_64 machines. Folding@home is a distributed computing project for disease research that simulates protein folding, computational drug design, and other types of molecular dynamics. As of today, the project is using the idle resources of personal computers owned by volunteers from all over the world. Thousands of people contribute to the success of this project. Thanks to @nnovaes for bringing this to our attention! @@ -594,7 +595,7 @@ DietPi-Software | WiringPi: Resolved failed installation with RPi. DietPi-Software | Sonarr: Fixed APT install due to HTTPS error. Reverted to HTTP as of official install instructions. Thanks for report @GulyFMG: https://github.com/MichaIng/DietPi/issues/1953 DietPi-Software | qBitTorrent: Resolved an issue with inability to save webUI settings: https://github.com/MichaIng/DietPi/issues/1957 DietPi-Software | NZBget: Resolved an issue where application would apply incorrect umask to downloaded data, preventing other programs with allowed access, from accessing it: https://github.com/MichaIng/DietPi/issues/1999 -DietPi-Software | Plex: Resolved an issue with ARMv8 installations, where an exisiting install of Mono would cause a failed installation do to package dep issues: https://github.com/MichaIng/DietPi/issues/2006#issuecomment-412653984 +DietPi-Software | Plex: Resolved an issue with ARMv8 installations, where an existing install of Mono would cause a failed installation do to package dep issues: https://github.com/MichaIng/DietPi/issues/2006#issuecomment-412653984 DietPi-Survey | Resolved an issue where a failed connection test would generate an error with UI blocking. As this program is not critical to device operation, the error is now silent without UI blocking: https://github.com/MichaIng/DietPi/issues/1968#issuecomment-408615457 DietPi-Login | Resolved an issue on Jessie systems, that prevented automated "dietpi-software" execution on first login. This was due to Jessie "pgrep" does not support "-i" argument (ignore cases). General | Resolved other minor issues related to pgrep "-i" argument not being supported on Jessie. @@ -609,7 +610,7 @@ v6.12 Changes / Improvements / Optimizations: DietPi-Drive_Manager | Samba/CIFS mounting: Now automatically uses the highest available CIFS version supported on client and server: https://github.com/MichaIng/DietPi/issues/1893#issuecomment-403034799 DietPi-Software | Jackett: Now runs as its own user, and, from the /opt/jackett directory, for new installations only. Many thanks to @userdeveloper98 for contributing this improvement: https://github.com/MichaIng/DietPi/pull/1895 -DietPi-Software | MiniDLNA: Now uses a SystemD service, also updates its library during service start. +DietPi-Software | MiniDLNA: Now uses a systemd service, also updates its library during service start. DietPi-Software | JRiver: Removed and no longer available for installation: https://github.com/MichaIng/DietPi/issues/1080#issuecomment-403489246 DietPi-Software | Various titles: Now run under their own system user account, with limited permissions (previously root): https://github.com/MichaIng/DietPi/issues/1877#issuecomment-403298679 DietPi-Software | SABnzbd: Language packs are now installed by default: https://github.com/MichaIng/DietPi/issues/1917#issue-340631943 @@ -618,13 +619,13 @@ DietPi-RAMlog | Service is now disabled when RAMlog mode is not selected: https: Bug Fixes: General | Resolved an issue where cron jobs, containing DietPi scripts, failed: https://github.com/MichaIng/DietPi/issues/1923 -General | Resolved an issue on ARM64 + Jessie with APT, due to debian-security removing suppport and packages for those devices. If you experience this issue, and are unable to update DietPi, please see : https://github.com/MichaIng/DietPi/issues/1915 +General | Resolved an issue on ARM64 + Jessie with APT, due to debian-security removing support and packages for those devices. If you experience this issue, and are unable to update DietPi, please see : https://github.com/MichaIng/DietPi/issues/1915 General | Resolved an issue where NFSv3 network drives could not be mounted: https://github.com/MichaIng/DietPi/issues/1898 DietPi-Config | ASUS TB: Resolved loss of WiFi device after a reboot: https://github.com/MichaIng/DietPi/issues/1760 DietPi-Drive_Manager | Resolved an issue where the program could remove a non-empty directory in rare situations. DietPi-Software | Resolved a potential Mono instability issue with Radarr, Sonarr and Jackett, due to using '--optimize=all --server'. This has now been removed for new installations. Many thanks to @hellfirehd for debugging/testing and @Taloth for dev insights: https://github.com/MichaIng/DietPi/issues/1896 DietPi-Software | Mono: Temp mono files are now cleared from memory once installed, preventing out of memory errors for additional software installs afterwards: https://github.com/MichaIng/DietPi/issues/1877#issuecomment-403856446 -DietPi-Software | Xserver: Resolved rarely occuring uninstall issus by not purging dependencies, but leaving them for autoremove: https://github.com/MichaIng/DietPi/issues/1921 +DietPi-Software | Xserver: Resolved rarely occurring uninstall issues by not purging dependencies, but leaving them for autoremove: https://github.com/MichaIng/DietPi/issues/1921 DietPi-Software | MineOS: Resolved failed installation due to incompatibilities with nodejs v10. v8 is now installed: https://github.com/MichaIng/DietPi/issues/1880 DietPi-Update | Resolved an issue where incorrect version would be displayed, once update was completed. This is due to '| tee' on a function, making var changes local: https://github.com/MichaIng/DietPi/issues/1877#issuecomment-403866204 @@ -657,14 +658,14 @@ General | 'firmware-iwlwifi': Is now a pre-req to WiFi enable. Adds support for General | "net-tools" commands (ifconfig, netstat, route, ...) were replaced by modern "ip" commands (ip a, ip r, ...) within DietPi scripts and the package therefore removed from DietPi core packages: https://github.com/MichaIng/DietPi/issues/1666 General | Removed unused "/DietPi/config.txt" from non-RPi devices: https://github.com/MichaIng/DietPi/pull/1863 General | CurlFTPFS: Removed from DietPi scripts and is no longer supported. Due to lack of security, and, single digit install count (survey). -General | Timesync: DietPi will now only check for a sucessful sync once per system boot, and, again hourly/daily if set. This is to prevent excess delay of systemd-timesyncd service, once the time has already been synced. +General | Timesync: DietPi will now only check for a successful sync once per system boot, and, again hourly/daily if set. This is to prevent excess delay of systemd-timesyncd service, once the time has already been synced. General | Sparky SBC: Designs patch added for DSD on MPD-5 dac , new Ids added Mytek Manhatten , LH labs 1V5 2V0 ,HD-AVP/AVA IDA-8: https://github.com/sparky-sbc/sparky-test/tree/master/dsd-marantz DietPi-Backup | Rewritten. Userdata option removed, included by default backup. Added options to edit include/exclude filters in the GUI. Existing backups (v6.9 or less) are no longer supported: https://github.com/MichaIng/DietPi/issues/1851 -DietPi-Config | Soundcards (RPi): Allo Katana, now available for selection. https://github.com/MichaIng/DietPi/issues/1849 -DietPi-Config | IntelGPU Driver: Installation code added: https://github.com/MichaIng/DietPi/issues/1855#issue-333150262 +DietPi-Config | Sound cards (RPi): Allo Katana, now available for selection. https://github.com/MichaIng/DietPi/issues/1849 +DietPi-Config | Intel GPU Driver: Installation code added: https://github.com/MichaIng/DietPi/issues/1855#issue-333150262 DietPi-Config | Networking: You can now view the sent and recieved totals for both network devices. NB: 32bit devices will reset the values after 32bit int limit is reached (roughly 4.3GB~), this is a kernel/arch limitation: https://github.com/MichaIng/DietPi/issues/1666#issuecomment-401546728 DietPi-Drive_Manager | Rewrite and improvements: - - Now supports ROM devices (eg: DVD). NB: compatibility for DVD/CD devices relies on kernel support. Not all devices will support DVD/CD devices, and/or their filesystem format: https://github.com/MichaIng/DietPi/issues/1858 + - Now supports ROM devices (e.g. DVD). NB: compatibility for DVD/CD devices relies on kernel support. Not all devices will support DVD/CD devices, and/or their filesystem format: https://github.com/MichaIng/DietPi/issues/1858 - Resize ext4 options added: https://github.com/MichaIng/DietPi/issues/1821 - Support for detecting and formatting non-partitioned drives - You can now benchmark read/write for all available mounted drives: https://github.com/MichaIng/DietPi/issues/1858 @@ -691,7 +692,7 @@ DietPi-Software | GMrender: Resolved an issue where two systems on the same netw DietPi-Software | Apache2: Fixed a syntax error that leads to Apache logging to "/error.log" instead of "/var/log/apache2/error.log" DietPi-Software | Nukkit: Fixed the broken download link on installation. Many thanks to @symbios24 for reporting bug and providing solution: https://github.com/MichaIng/DietPi/issues/1875 DietPi-Software | Linux software: Resolved an issue with NULL entry being displayed: https://github.com/MichaIng/DietPi/pull/1830#issuecomment-401612168 -DietPi-Config | Fixen an issue, where IPv6 could not be disabled on RPi. On current kernel version it is no dedicated kernel module any more and needs to be toggled via "/boot/cmdline.txt". +DietPi-Config | Fixed an issue, where IPv6 could not be disabled on RPi. On current kernel version it is no dedicated kernel module any more and needs to be toggled via "/boot/cmdline.txt". AlloGUI v9: - Changing the root password, no longer breaks web interface: https://github.com/MichaIng/DietPi/issues/1841 @@ -709,38 +710,38 @@ General | During first run of DietPi (and during this patch), you will now be gi General | Increased verbosity and logging of DietPi boot scripts to assist with debugging: https://github.com/MichaIng/DietPi/issues/1772 General | G_ERROR_HANDLER: Retry mechanic added, allows you to re-run and retry the last command when an error occurs. Also included option to send DietPi a bug report when an issue occurs. General | NTP removed from DietPi-Config time sync options and DietPi core packages. All time sync modes are now offered via systemd-timesyncd, which is part of every Debian based core system: https://github.com/MichaIng/DietPi/pull/1628 -Generel | DietPi-Set_Core_Environment was removed. DietPi service and system config files are now updates automatically via new update system, other environment setup steps are moved into DietPi-PREP: https://github.com/MichaIng/DietPi/issues/1749 +General | DietPi-Set_Core_Environment was removed. DietPi service and system config files are now updates automatically via new update system, other environment setup steps are moved into DietPi-PREP: https://github.com/MichaIng/DietPi/issues/1749 DietPi-BugReport | Has been revised and improved to remove end user security concerns. DietPi-Drive_Manager | Swapfile: Added ability to move the swapfile and set size. This replaces the previous option in DietPi-Config. DietPi-Process_Tool | NoMachine + Webmin: Processes can now be controlled. DietPi-Services | Webmin: Added and now controlled. -DietPi-Software | Fail2Ban: Install now uses the systemD backend. No longer requires Rsyslog pre-req. For new installations only. +DietPi-Software | Fail2Ban: Install now uses the systemd backend. No longer requires Rsyslog pre-req. For new installations only. DietPi-Software | Search: Feature now available. Find the software you require for install, faster! https://twitter.com/DietPi_/status/1000858660682305536 DietPi-Software | InfluxDB and Grafana now available for installation. Many thanks to @marcobrianza for the install code and documentation guides: https://github.com/MichaIng/DietPi/issues/1784 DietPi-Software | LXDE: Resolved missing icons with 'pcmanfm' under RPi devices: https://github.com/MichaIng/DietPi/issues/1558#issuecomment-390328173 -DietPi-Software | Webmin: Resolved failed installation due to missing package pre-reqs. Upgraded to use a systemD service: https://github.com/MichaIng/DietPi/issues/1741 +DietPi-Software | Webmin: Resolved failed installation due to missing package pre-reqs. Upgraded to use a systemd service: https://github.com/MichaIng/DietPi/issues/1741 DietPi-Software | Removed npm root access error during installs: https://github.com/MichaIng/DietPi/issues/1340#issuecomment-389899081 DietPi-Software | OpenJDK/JRE now installs Java version 8 across all DietPi system. This is for stability across all programs that require it: https://github.com/MichaIng/DietPi/issues/1340#issuecomment-389889264 DietPi-Software | Updated several non-APT software titles for fresh installs and reinstalls: https://github.com/MichaIng/DietPi/pull/1774 DietPi-Software | Transmission: General clean up of install config file. G_CONFIG_INJECT is now used to replace/add our optimized entries. Also cleaned up the service, now runs as forking: https://github.com/MichaIng/DietPi/issues/1754 -DietPi-Software | sabnzbd: Updated to latest version 2.3.4 (for new installations only): https://github.com/MichaIng/DietPi/issues/1340 +DietPi-Software | SABnzbd: Updated to latest version 2.3.4 (for new installations only): https://github.com/MichaIng/DietPi/issues/1340 DietPi-Software | CAVA: Updated to latest version 0.6.1. Enabled for x86_64: https://github.com/MichaIng/DietPi/issues/1340 -DietPi-Software | OctoPrint: libjpeg-dev now installed by default, this is required for additional plugin installations (eg: Astroprintcloud Plugin): https://github.com/MichaIng/DietPi/issues/1800 +DietPi-Software | OctoPrint: libjpeg-dev now installed by default, this is required for additional plugin installations (e.g. Astroprintcloud Plugin): https://github.com/MichaIng/DietPi/issues/1800 DietPi-Software | Xserver: DPMS and all known screen blanking/saving is now disabled by default. To re-enable this feature, remove the following file '/etc/X11/xorg.conf.d/99-dietpi-dpms_off.conf': https://github.com/MichaIng/DietPi/issues/1823 DietPi-Survey | Has been revised and improved to remove end user security concerns. DietPi-Update | Implemented an automated update system for DietPi files, placed outside of /DietPi, e.g. system configurations and service files. This allows significant reduction of script code and assures consistency across all systems: https://github.com/MichaIng/DietPi/pull/1802 Bug Fixes: General | Login and globals moved to /etc/bashrc.d/*, due to issues with remote shell and desktop terms under /etc/profile.d/99-dietpi-login.sh: https://github.com/MichaIng/DietPi/issues/1777#issuecomment-390248960 -General | Completely removed root permission requirements from login scirpts and banner. Also users without sudo permissions will see the login banner and will be able to use dietpi-* and G_* functions: https://github.com/MichaIng/DietPi/pull/1790 +General | Completely removed root permission requirements from login scripts and banner. Also users without sudo permissions will see the login banner and will be able to use dietpi-* and G_* functions: https://github.com/MichaIng/DietPi/pull/1790 General | Sparky SBC + USB-DAC unmute fix (v2), now sets volume to max: https://github.com/MichaIng/DietPi/pull/1779 General | UID bit reapplied for Sudo. Reported not applied on current XU4 image: https://github.com/MichaIng/DietPi/issues/794#issuecomment-392335392 DietPi-Config | WiFi HotSpot: Resolved inability to toggle state (enable/disable) and change channel: https://github.com/MichaIng/DietPi/issues/1810#issuecomment-394126835 DietPi-Drive_Manager | Format: Resolved an issue where formatting any drive, would reset the swapfile back to auto size and default location: https://dietpi.com/phpbb/viewtopic.php?f=11&t=3851&p=12864#p12864 DietPi-set_dphys-swapfile | Resolved issues with fallocate on vfat partitions which caused a failure. -DietPi-Software | SickRage: SystemD service updated to prevent timeouts, allowing the process to fully init. Experienced by some users installs: https://github.com/MichaIng/DietPi/issues/1762 -DietPi-Software | AirSonic: Resolved issues with incorrect memory limit being set during installation: https://github.com/MichaIng/DietPi/issues/1764 -DietPi-Software | AirSonic/SubSonic: Resolved 503 error when accessing web interface: https://github.com/MichaIng/DietPi/issues/1764 +DietPi-Software | SickRage: systemd service updated to prevent timeouts, allowing the process to fully init. Experienced by some users installs: https://github.com/MichaIng/DietPi/issues/1762 +DietPi-Software | Airsonic: Resolved issues with incorrect memory limit being set during installation: https://github.com/MichaIng/DietPi/issues/1764 +DietPi-Software | Airsonic/Subsonic: Resolved 503 error when accessing web interface: https://github.com/MichaIng/DietPi/issues/1764 DietPi-Software | CloudPrint: Resolved an issue where the CUPS web interface would fail to connect: https://github.com/MichaIng/DietPi/issues/1797 DietPi-Software | VNC + LXDE: Resolved error message 'no session for PID x'.: @@ -753,18 +754,18 @@ Changes / Improvements / Optimizations: General | All future DietPi images (v6.8 and onwards), now has serial console enabled by default for the 1st run setup. It will be disabled automatically after first run setup to save on resources, unless 'CONFIG_SERIAL_CONSOLE_ENABLE=1' is set in dietpi.txt: https://github.com/MichaIng/DietPi/issues/1759 General | DietPi.com website: Server has been upgraded to Debian Stretch, featuring HTTPS redirect. General | FBset is no longer a pre-req package for DietPi systems. This will be removed on fresh installations (not existing, to avoid any package conflicts): https://github.com/MichaIng/DietPi/issues/1716 -General | DietPi login script and globals init moved to /etc/profile.d/99-dietpi-login.sh. Ensuring any user on system with sudo permissions can load them. Global commands are also now supported across multiple users, eg: either 'sudo -i G_AGI pacakge' or 'G_SUDO G_AGI package': https://github.com/MichaIng/DietPi/issues/1477 +General | DietPi login script and globals init moved to /etc/profile.d/99-dietpi-login.sh. Ensuring any user on system with sudo permissions can load them. Global commands are also now supported across multiple users, e.g. either 'sudo -i G_AGI package' or 'G_SUDO G_AGI package': https://github.com/MichaIng/DietPi/issues/1477 General | G_WHIP*: Improved scaling detection based on character count and line count. We now also calculate character count per line, to determine if additional lines are required against X. In other words, it should be a more 'snug' fit :) https://github.com/MichaIng/DietPi/issues/1740 DietPi-Automation | 'AUTO_SETUP_RAMLOG_MAXSIZE' added to dietpi.txt. Sets max /var/log tmpfs size during 1st run. Requires v6.8 or higher image. -DietPi-Config | Native PC > Soundcard: 'firmware-intel-sound' is now installed automatically for Intel based CPUs. +DietPi-Config | Native PC > Sound card: 'firmware-intel-sound' is now installed automatically for Intel based CPUs. DietPi-Drive_Manager | Added ability to adjust reserved blocks percentage on ext4 file system: https://github.com/MichaIng/DietPi/issues/1662 DietPi-Drive_Manager | Added ability to check and optionally repair a filesystem. Many thanks to MonZon for the feature request! rootFS and /boot checks will be added in v6.9, currently additional drives are supported by this feature https://github.com/MichaIng/DietPi/issues/1740 DietPi-Drive_Manager | Enabled access for virtual machines: https://github.com/MichaIng/DietPi/issues/1765 DietPi-LetsEncrypt | Lighttpd: SSL configuration upgrade according to Mozillas SSL generator: https://mozilla.github.io/server-side-tls/ssl-config-generator/?server=lighttpd-1.4.35&openssl=1.0.1t&hsts=yes&profile=intermediate -DietPi-LetsEncrypt | Minor code and error handling improvements, as well increasing transparancy of what the script is currently doing: https://github.com/MichaIng/DietPi/pull/1738 +DietPi-LetsEncrypt | Minor code and error handling improvements, as well increasing transparency of what the script is currently doing: https://github.com/MichaIng/DietPi/pull/1738 DietPi-Process_tool | Rewrite of save file, to allow for stringed entries. The save file will be cleared during the update, to support this feature: https://github.com/MichaIng/DietPi/issues/1750 DietPi-Process_tool | Added Plex Media Server to process tool, however, transcoding will not be affected by this: https://github.com/MichaIng/DietPi/issues/1750#issuecomment-386826317 -DietPi-Set_Hardware | Allo Piano firmware is now installed on demand and will be removed on update, if not chosen as soundcard: https://github.com/MichaIng/DietPi/issues/1656 +DietPi-Set_Hardware | Allo Piano firmware is now installed on demand and will be removed on update, if not chosen as sound card: https://github.com/MichaIng/DietPi/issues/1656 DietPi-Software | AmiBerry (Amiga Emulator): Updated to v2.19, contains bug fixes and improvements: https://github.com/MichaIng/DietPi/issues/1707#issue-314377609 DietPi-Software | Chromium: No longer requires a desktop and can be installed as a lightweight single use program, using dietpi-autostart to run under kiosk mode. Many thanks to @AYapejian! 720p is the default window size, please see '/var/lib/dietpi/dietpi-software/installed/chromium-autostart.sh' for full options when running under 'dietpi-autostart' mode: https://github.com/MichaIng/DietPi/issues/1737 DietPi-Software | Readymedia (MiniDLNA): Removed ALSA pre-req as it is not required. Many thanks to @bokiroki: https://github.com/MichaIng/DietPi/issues/1712 @@ -773,7 +774,7 @@ DietPi-Software | Gitea: Updated to latest version (1.4), for new installations DietPi-Software | PHPBB3: Latest version update (3.2.2), for new installations only. DietPi-Software | Docker: Enabled for ARMv8 devices: https://github.com/MichaIng/DietPi/issues/1736 PREP | G_HW_MODEL: Added for 'OrangePi PC Plus'. Many thanks to @SuBLiNeR: https://github.com/MichaIng/DietPi/pull/1704 -PREP | Optimized rootfs re-parition and resize. This will reduced the required intial system reboot count by one. Will take affect from official v6.8 DietPi images and onwards. +PREP | Optimized rootfs re-parition and resize. This will reduced the required inital system reboot count by one. Will take affect from official v6.8 DietPi images and onwards. Bug Fixes: General | Remote SCP/Rsync fix when running under 'dietpi' user: https://github.com/MichaIng/DietPi/issues/1703 @@ -806,10 +807,10 @@ DietPi-Backup | Free space check is now run, prior to backup: https://github.com DietPi-Banner | Added additional credits and support for displaying image creator + pre-image name: https://github.com/MichaIng/DietPi/issues/1621 DietPi-Config | MPEG2/VC1 keys: GPU memory is now increased automatically to 128 (if currently lower), required for this features to function: https://github.com/MichaIng/DietPi/issues/1487 DietPi-Drive_Manager | When formatting EXT4, reserved block size is now set to 0%. This will provide the max available storage for the device (previously 5% was reserved): https://github.com/MichaIng/DietPi/issues/1662#issuecomment-378860605 -DietPi-PREP | Updated to G_WHIP. Added image creator and pre-image name input box (used in banner). All user input questions/prompts at begining of script: https://github.com/MichaIng/DietPi/issues/1621 +DietPi-PREP | Updated to G_WHIP. Added image creator and pre-image name input box (used in banner). All user input questions/prompts at beginning of script: https://github.com/MichaIng/DietPi/issues/1621 DietPi-Software | Samba Server: Reduced the process count of smbd from 4 to 3, by fully disabling printer support. Applied to new installations only: https://github.com/MichaIng/DietPi/issues/1689#issuecomment-379038594 DietPi-Software | Samba Server: Max connections is now limited to 'CPU cores * 2'. This will prevent excess connections and resource usage. Applied to new installations only. -DietPi-Software | (RPi): 'rpi-bcm2835-ultrahq' is now the default installed soundcard, if no other soundcard has been selected. Previously this was 'rpi-bcm2835', which offered a lower quality audio output when compared to 'rpi-bcm2835-ultrahq'. +DietPi-Software | (RPi): 'rpi-bcm2835-ultrahq' is now the default installed sound card, if no other sound card has been selected. Previously this was 'rpi-bcm2835', which offered a lower quality audio output when compared to 'rpi-bcm2835-ultrahq'. DietPi-Sync | Free space check is now run, prior to sync: https://github.com/MichaIng/DietPi/pull/1686 Bug Fixes: @@ -847,7 +848,7 @@ Bug Fixes: General | RPi: Resolved issue with updating 'raspberrypi-sys-mods', where the patch would incorrectly apply a new apt mirror, breaking the ability to update: https://github.com/MichaIng/DietPi/issues/1659#issuecomment-377297103 General | firmware-misc-nonfree is now installed by default on all DietPi systems (minus those via PREP with WiFi disabled). Mostly Intel/Nvidia firmware, however, it also contains ralink WiFi firmware: https://github.com/MichaIng/DietPi/issues/1675#issuecomment-377806609 DietPi-Globals | G_RPI_UPDATE: Added APT hold state for "libraspberrypi0", to include all "raspberrypi-firmware" packages, that are overwritten by "rpi-update": https://github.com/MichaIng/DietPi/pull/1657 -DietPi-Process_Tool | Deluge: Is now a SystemD service, which resolves failed process tool apply on forking deluge process: https://github.com/MichaIng/DietPi/issues/1658 +DietPi-Process_Tool | Deluge: Is now a systemd service, which resolves failed process tool apply on forking deluge process: https://github.com/MichaIng/DietPi/issues/1658 ----------------------------------------------------------------------------------------------------------- @@ -863,7 +864,7 @@ DietPi-Environment | Move sudoers adjustments to "/etc/sudoers.d/dietpi": https: DietPi-Environment | Move sysctl adjustments to "/etc/sysctl.d/dietpi.conf" to assure higher priority than "/etc/sysctl.d/99-sysctl.conf": https://github.com/MichaIng/DietPi/pull/1635 DietPi-Config | Enabled possibility to adjust display resolution for VMs, but max guest display resolution might need to be adjusted within VM software as well: https://github.com/MichaIng/DietPi/issues/1227 DietPi-Config | Advanced options: You can now define the swapfile location: https://github.com/MichaIng/DietPi/issues/1602 -DietPi-Config | Soundcards (RPi): Added option for ApplePi DAC: https://github.com/MichaIng/DietPi/issues/1626 +DietPi-Config | Sound cards (RPi): Added option for ApplePi DAC: https://github.com/MichaIng/DietPi/issues/1626 DietPi-Process_Tool | Added ability to add custom process entries to "/DietPi/dietpi/.dietpi-process_tool_include". Add one process each line with the format :. Check via htop, e.g. "DHCP client:dhclient" DietPi-Software | NoMachine: Installation updated to 6.0.78 (new installations only): https://github.com/MichaIng/DietPi/issues/1340#issuecomment-372845397 DietPi-Software | Squeezebox server: Updated to systemd native service: https://github.com/MichaIng/DietPi/issues/1613 @@ -877,7 +878,7 @@ General | dphys-swapfile: Has been removed and replace with our own swapfile gen General | RPi: Resolved issue with gettext error during login due to /etc/profile.d/wifi-country.sh: https://github.com/MichaIng/DietPi/issues/1631 General | RPi: Resolved missing Allo Piano DAC firmware. General | RPi 3B+: Resolved inability to scan/connect with WiFi: https://github.com/MichaIng/DietPi/issues/1627#issuecomment-375912747 -DietPi-Drive_Manager | Resolved an issue where x-systemd.automount would fail if autofs4 was disabled in kernel/modules (eg: Rock64). x-systemd.automount is now disabled for systems which fail autofs4 detection: https://github.com/MichaIng/DietPi/issues/1607 +DietPi-Drive_Manager | Resolved an issue where x-systemd.automount would fail if autofs4 was disabled in kernel/modules (e.g. Rock64). x-systemd.automount is now disabled for systems which fail autofs4 detection: https://github.com/MichaIng/DietPi/issues/1607 DietPi-Config | Removed 'firmware-ralink' pre-req from WiFi enable. This is a virtual package for 'firmware-misc-nonfree': https://github.com/MichaIng/DietPi/issues/1631 DietPi-Config | RPi: Resolved missing Allo Piano DAC 2.1 entry. DietPi-Software | PineA64: Resolved issue with failure to run fbturbo driver on Debian Stretch: https://github.com/MichaIng/DietPi/issues/1604 @@ -892,7 +893,7 @@ v6.4 - HotFix (09/03/18) Changes / Improvements / Optimizations: -DietPi-Cron | Added ability to set minutely based cron jobs (eg: every 3 minutes), using /etc/cron.minutely. Many thanks to @d5c0d3 for adding this feature: https://github.com/MichaIng/DietPi/pull/1578 +DietPi-Cron | Added ability to set minutely based cron jobs (e.g. every 3 minutes), using /etc/cron.minutely. Many thanks to @d5c0d3 for adding this feature: https://github.com/MichaIng/DietPi/pull/1578 DietPi-Software | UrBackupServer: Updated to latest version 2.2.8: https://github.com/MichaIng/DietPi/issues/1600 Bug Fixes: @@ -914,11 +915,11 @@ Native PC BIOS | Image now available: https://dietpi.com/download NanoPi Neo | Image now available (based on FriendlyARM official image): https://github.com/MichaIng/DietPi/issues/1588 Changes / Improvements / Optimizations: -General | DietPi now uses its own "dietpi-postboot.service" to initiate dietpi-services, instead of /etc/rc.local. The latter will be reset on update, but in case of manual adjustments, a backup is safed to dietpi_userdata. The initiating "rc-local.service" will stay in place as well, so /etc/rc.local can be used as before: https://github.com/MichaIng/DietPi/issues/1376 +General | DietPi now uses its own "dietpi-postboot.service" to initiate dietpi-services, instead of /etc/rc.local. The latter will be reset on update, but in case of manual adjustments, a backup is saved to dietpi_userdata. The initiating "rc-local.service" will stay in place as well, so /etc/rc.local can be used as before: https://github.com/MichaIng/DietPi/issues/1376 General | Additional getty's (2-6) are now disabled via mask. This reduces resource usage for unneeded screens: https://github.com/MichaIng/DietPi/issues/1541 General | APT: 'Disabled install recommends' is now standard and default across all DietPi images: https://github.com/MichaIng/DietPi/issues/1482#issuecomment-368031044 General | Sparky SBC kernel patches: Pro-Ject-S2 dac DSD native support on sparky, also other few dac ids. Thanks @sudeep. -General | /tmp tmpfs size is now automatically set to 50% of RAM+SWAP, (previously 50% RAM only). To prevent out of memory errors during certain software installations (eg: Mono), where the swapfile can be used only when needed: https://github.com/MichaIng/DietPi/issues/1027#issuecomment-369435049 +General | /tmp tmpfs size is now automatically set to 50% of RAM+SWAP, (previously 50% RAM only). To prevent out of memory errors during certain software installations (e.g. Mono), where the swapfile can be used only when needed: https://github.com/MichaIng/DietPi/issues/1027#issuecomment-369435049 DietPi-Automation | dietpi.txt entries and support added for WPA2 Enterprise (WPA-EAP). Many thanks to @symo for implementing this feature!: https://github.com/MichaIng/DietPi/pull/1547 DietPi-Backup | Once backup is completed, you will be asked if you wish to view the log file, for the full rsync log. DietPi-Banner | Improved notification when no network is detected: https://github.com/MichaIng/DietPi/issues/1576 @@ -932,15 +933,15 @@ DietPi-Software | Sonarr: Now uses the develop repo branch, inline with our Rada DietPi-Software | Mono: Raspbian dist is now used for RPi devices: https://github.com/MichaIng/DietPi/issues/1566 DietPi-Software | FFmpeg: Fix backports dependency issues for all Odroids: https://github.com/MichaIng/DietPi/issues/1556 DietPi-Software | Improved UI options during NTPD failure. You will now be given multiple options that will assist in resolving NTPD time sync issues on your network: https://github.com/MichaIng/DietPi/issues/1580#issuecomment-370153882 -DietPi-Software | NTPD check will now run after the internet connection test, to prevent unnecessary delay when network is not yet configured: -DietPi-Software | SubSonic 5: Replaced with Airsonic: https://github.com/MichaIng/DietPi/issues/1585 +DietPi-Software | NTPD check will now run after the internet connection test, to prevent unnecessary delay when network is not yet configured. +DietPi-Software | Subsonic 5: Replaced with Airsonic: https://github.com/MichaIng/DietPi/issues/1585 DietPi-Software | Aria2: Optimized installation and connection settings based on hardware. Now uses a configuration file '/var/lib/dietpi/dietpi-software/installed/aria2.conf', which will allow users to change aria2 settings permanently. Please note, the aria2-webui does not support saving settings after session shutdown, this is a known limitation with the software, please use the aria2.conf to make changes: https://github.com/MichaIng/DietPi/issues/1575 DietPi-Sync | Once sync is completed, you will be asked if you wish to view the log file, for the full rsync log. DietPi-Update | G_AGUP/G_AGUG: Now runs prior to our patch system. Ensuring APT is upto date during our updates: https://dietpi.com/phpbb/viewtopic.php?f=11&t=2894&p=11150#p11149 Bug Fixes: General | G_AGUG: --allow-unauthenticated added for Stretch+ by default (inline with other G_AG commands) -General | Resolved POSIX issues with dropbear (limitation) and SSH sessions. We now detect for presence of POSIX and set user selected locale during session load: https://github.com/MichaIng/DietPi/issues/1540 +General | Resolved POSIX issues with Dropbear (limitation) and SSH sessions. We now detect for presence of POSIX and set user selected locale during session load: https://github.com/MichaIng/DietPi/issues/1540 General | Resolved multiple issues with failed GNU key management during APT installs from non-standard repos. Dirmngr is now installed on all DietPi systems by default: https://github.com/MichaIng/DietPi/issues/1388 General | Resolved basic APT issues with Meveric's repo and failing dependencies. Debian repo is now used in the first instance: https://github.com/MichaIng/DietPi/pull/1571#issuecomment-369973745 General | DietPi-Globals are now loaded prior to login script. Ensures aliases are functional during exit of 1st run setup: https://github.com/MichaIng/DietPi/issues/1580#issuecomment-370149636 @@ -952,7 +953,7 @@ DietPi-Software | Desktops: USB drive removed from .gtk-bookmarks as no longer u DietPi-Software | Shairport-Sync: Resolved ARMv6 binary Illegal instruction: https://github.com/MichaIng/DietPi/issues/1548 DietPi-Software | Lighttpd: Resolved an issue with failed enable of php module, due to perl being a undocumented pre-req for 'lighttpd-enable-mod'. DietPi-Software | MotionEye: Resolved failed installation due to missing build-essential pre-req: https://github.com/MichaIng/DietPi/issues/1564 -DietPi-Software | SubSonic6: Resolved broken URL link. Binary now hosted on dietpi.com: https://github.com/MichaIng/DietPi/issues/1582 +DietPi-Software | Subsonic6: Resolved broken URL link. Binary now hosted on dietpi.com: https://github.com/MichaIng/DietPi/issues/1582 DietPi-Services | Service stop order is now reversed: https://github.com/MichaIng/DietPi/issues/1462#issue-294140894 DietPi-Set_Hardware | Resolved issues with serial consoles not be disabled without dbus installed. Serial consoles are now masked/unmasked (previously disabled): https://github.com/MichaIng/DietPi/issues/1482 DietPi-Update | Resolved an issue where .update_available would exist during reboot, causing banner to display update available incorrectly: https://github.com/MichaIng/DietPi/issues/1535 @@ -963,19 +964,19 @@ v6.2 (18/02/18) Changes / Improvements / Optimizations: -Native PC UEFI | Image now includes options to install to either EMMC (eg: onboard) or SDA (1st HDD) device: https://github.com/MichaIng/DietPi/issues/1171#issuecomment-336522021 | https://dietpi.com/phpbb/viewtopic.php?f=9&t=2809&p=10808#p10808 +Native PC UEFI | Image now includes options to install to either EMMC (e.g. onboard) or SDA (1st HDD) device: https://github.com/MichaIng/DietPi/issues/1171#issuecomment-336522021 | https://dietpi.com/phpbb/viewtopic.php?f=9&t=2809&p=10808#p10808 DietPi-Backup | Rsync: Error control now handled by G_RUN_CMD DietPi-Config | Locale: Reworked, now only lists UTF-8 items, no longer using dpkg-reconfigure. Our custom set_software script handles all locales ensuring en_GB is always installed, and selected item is applied as system default. DietPi-Config | Display options > Resolution: Added fkms/kms (OpenGL) modes for RPi 2/3. -DietPi-Config | Sparky SBC: Added option to select usb-dac-1.1 soundcard, which will enable USB1.1 compatibility. +DietPi-Config | Sparky SBC: Added option to select usb-dac-1.1 sound card, which will enable USB1.1 compatibility. DietPi-Config | WiFi: Now supports connecting to hidden WiFi networks, thanks @shahwahed : https://github.com/MichaIng/DietPi/pull/1497 DietPi-LetsEncrypt | On Jessie, changed certificate auto renewal to native certbot renew command, to prevent certificate duplication: https://github.com/MichaIng/DietPi/issues/734 DietPi-LetsEncrypt | On Stretch, added automated Minio certificate renewal. Rerun "dietpi-letsencrypt" on your Stretch system to gain this feature. DietPi-Process_tool | Reduction of onscreen print. Additional status print will only occur when HIERARCHY is less than 2 and/or an error occurs. -DietPi-Software | AmiBerry: Massive update to v2.14 and SDL2, new installations only. Currently for RPi's under Stretch only, however, we have plans to impliment for other devices: https://dietpi.com/phpbb/viewtopic.php?f=8&t=5&p=64#p64 https://github.com/MichaIng/DietPi/issues/1410 +DietPi-Software | AmiBerry: Massive update to v2.14 and SDL2, new installations only. Currently for RPi's under Stretch only, however, we have plans to implement for other devices: https://dietpi.com/phpbb/viewtopic.php?f=8&t=5&p=64#p64 https://github.com/MichaIng/DietPi/issues/1410 DietPi-Software | LMS/Squeezebox: Has undergone an install review and re-write. All archs are now supported for Stretch + Jessie: https://github.com/MichaIng/DietPi/issues/1496 DietPi-Software | Pydio: Add PHP module 'intl' on installation, as requested via web ui warning: https://github.com/MichaIng/DietPi/issues/1240 -DietPi-Software | Nginx: To further reduce recource usage, by default 'nginx-light' will be installed now: https://github.com/MichaIng/DietPi/issues/1240 +DietPi-Software | Nginx: To further reduce resource usage, by default 'nginx-light' will be installed now: https://github.com/MichaIng/DietPi/issues/1240 DietPi-Software | PHP: Removed some unused PHP modules from default installation: https://github.com/MichaIng/DietPi/issues/1240 DietPi-Software | Added information regarding DietPi controlling services (stopping them), prior to install/uninstall. Thanks @gpioneer90: https://github.com/MichaIng/DietPi/issues/1484#issuecomment-363802523 DietPi-Software | PiJuice: Available for installation: https://dietpi.com/phpbb/viewtopic.php?f=8&t=5&p=10740#p10740 | https://github.com/MichaIng/DietPi/issues/1488 @@ -989,12 +990,12 @@ G_AGP | Will now only remove packages which are installed. Non matching items wi G_DIETPI-NOTIFY | Added initiating program name, to start of line print. Bug Fixes: -General | Resolved an issue where externally launched DietPi-Config with target menu, (eg: dietpi-config 8 1) had no effect. EG: fail connection, should go straight to networking submenu. +General | Resolved an issue where externally launched DietPi-Config with target menu, (e.g. dietpi-config 8 1) had no effect. E.g. fail connection, should go straight to networking submenu. General | Locales have been reworked and reset: To resolve broken Locales, they have been reset to en_GB.UTF-8.\n\nIf you had a different locale configured on this system, please use dietpi-config at a later date to re-configure. Backups of previous env and locale settings, are created in /mnt/dietpi_userdata/*.bak: https://github.com/MichaIng/DietPi/issues/1430 DietPi-Autostart | Custom: Resolved issue with the dietpi-autostart_custom service failing to run: https://dietpi.com/phpbb/viewtopic.php?f=11&t=2832&p=10862 DietPi-Config | AudioPhonics I-Sabre-K2M: Resolved issue with failed installation. This is now a source build ondemand: https://github.com/MichaIng/DietPi/issues/1437 DietPi-LetsEncrypt | Work around a non-DietPi issue, that prevents certificate renewal via Apache and Nginx on Stretch systems: https://github.com/MichaIng/DietPi/issues/734#issuecomment-361774084 -DietPi-Services | OpenVPN and DNSMASQ (PiHole): Are no longer controlled. This is to prevent unexpected loss of connection during DietPi scripts: https://github.com/MichaIng/DietPi/issues/1501 +DietPi-Services | OpenVPN and DNSMASQ (Pi-hole): Are no longer controlled. This is to prevent unexpected loss of connection during DietPi scripts: https://github.com/MichaIng/DietPi/issues/1501 DietPi-Software | Jessie: Pi-hole is now disabled, pending release of FTL 4.0, which is required to resolve incompatible logging with outdated dnsmasq options under Jessie: https://github.com/MichaIng/DietPi/issues/1524 DietPi-Software | Nginx: Resolved failed installation when IPv6 is disabled, thanks @MichaIng: https://github.com/MichaIng/DietPi/pull/1441 DietPi-Software | OpenVPN Server: Resolved failed installation under Debian Stretch: https://github.com/MichaIng/DietPi/issues/1450 @@ -1011,7 +1012,7 @@ DietPi-Software | NodeRed: resolved an issue where the nodered user lacked a hom Allo Web Interface v6: Sparky SBC: Resolved an issue where USB1.1 compatibility setting would always be applied, when usb-dac selected. -Sparky SBC: Added option to select usb-dac-1.1 soundcard, which will enable USB1.1 compatibility. +Sparky SBC: Added option to select usb-dac-1.1 sound card, which will enable USB1.1 compatibility. ----------------------------------------------------------------------------------------------------------- @@ -1052,9 +1053,9 @@ General | Swapfile generation is now completed during 1st run of dietpi-software General | DietPi-Funtime: Removed from DietPi. Although it looked pretty, it did absolutely nothing (except slow down a program) DietPi-Automation | All dietpi.txt entries have been renamed and cleaned up. DietPi-Automation | dietpi.txt: CONFIG_NTP_MODE will now be applied during 1st run of device: https://github.com/MichaIng/DietPi/issues/1379 -DietPi-Boot | Improved the method of initial FS_partition and FS_expansion during 1st run, via systemD services. 'fs_force_resize=' in dietpi.txt is no longer supported: https://github.com/MichaIng/DietPi/issues/1285#issuecomment-352159930 -DietPi-Banner | IP: Will now also list the active network adapter used (eg: eth0/wlan0) -DietPi-Config | Dion Audio LOCO V1/V2: Soundcards added for RPi. +DietPi-Boot | Improved the method of initial FS_partition and FS_expansion during 1st run, via systemd services. 'fs_force_resize=' in dietpi.txt is no longer supported: https://github.com/MichaIng/DietPi/issues/1285#issuecomment-352159930 +DietPi-Banner | IP: Will now also list the active network adapter used (e.g. eth0/wlan0) +DietPi-Config | Dion Audio LOCO V1/V2: Sound cards added for RPi. DietPi-Config | Locale: en_GB.UTF-8 is now automatically installed, alongside user selected choice. Required for DietPi scripts to function. DietPi-Drive_Manager | Added support for exFAT, many thanks @MichaIng : https://github.com/MichaIng/DietPi/pull/1312 DietPi-Globals | Global variables and functions are now exported during login. Please see the sourcecode for more information: https://github.com/MichaIng/DietPi/issues/1311 @@ -1064,7 +1065,7 @@ DietPi-Software | NAA Daemon: Updated to latest (3.5.2-36). Existing installs wi DietPi-Software | PHP-FPM: Increased from "$CPU_CORES_TOTAL" to "pm.max_children = $(( $CPU_CORES_TOTAL * 3 ))". This should avoid failed forking of PHP-FPM processes/requests : https://github.com/MichaIng/DietPi/issues/1298 DietPi-Software | ownCloud/Nextcloud: Added option to choose data directory via dietpi.txt pre installation: https://github.com/MichaIng/DietPi/issues/1314#issuecomment-352782055 DietPi-Software | ownCloud/Nextcloud: Switch to pretty URLs (without "index.php") on Apache -DietPi-Software | ownCloud/Nextcloud: Automated backup restoring on install and creation und uninstall to ownCloud/Nextcloud data directory +DietPi-Software | ownCloud/Nextcloud: Automated backup restoring on install and creation on uninstall to ownCloud/Nextcloud data directory DietPi-Software | ownCloud: Switch to non-package/archive installation. This allows usage of preferred web based updater. DietPi-Software | Nextcloud: Resolved OPcache admin panel warnings now also on Lighttpd DietPi-Software | UrBackup: Installation updated to latest version 2.1.20. For new installations only: https://github.com/MichaIng/DietPi/issues/1335 @@ -1086,7 +1087,7 @@ DietPi-Software | qBittorrent: Resolved an issue with inability to log into web DietPi-Software | Resolved an issue where our custom LD_LIBRARY_PATH would cause APT failures. LD_LIBRARY_PATH has now been reverted, apologies if this effected your system: https://github.com/MichaIng/DietPi/issues/1329 DietPi-Software | Resolved an issue where APT installations would fail if services were masked. All known DietPi software services, will be enabled/unmasked, before installation: https://github.com/MichaIng/DietPi/issues/1320 DietPi-Software | WiFi Hotspot (Stretch): Resolved an issue where hostapd would fail to run due to missing libssl1.0.0 lib, not available in repos: https://github.com/MichaIng/DietPi/issues/1299 -DietPi-Software | Shairport-sync (Stretch): Resolved an issue where this would fail to install, due to pre-req URLS becomming invalid: https://github.com/MichaIng/DietPi/issues/1303 +DietPi-Software | Shairport-sync (Stretch): Resolved an issue where this would fail to install, due to pre-req URLS becoming invalid: https://github.com/MichaIng/DietPi/issues/1303 DietPi-Software | Plex Media Server: Resolved uninstall to include /var/lib/plexmediaserver in removal (which is not completed via apt purge). DietPi-Software | MariaDB: Resolved an issue where MariaDB would fail to uninstall correctly: https://github.com/MichaIng/DietPi/pull/1280 DietPi-Software | Aira2 (Stretch): Resolved installation, now used APT installation: https://github.com/MichaIng/DietPi/issues/1310 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 38230e5409..2fbcb8ab81 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3212,6 +3212,12 @@ Package: *php7.3*\nPin: release *\nPin-Priority: -1' > /etc/apt/preferences.d/di if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then Banner_Installing + # On Stretch, use backports, which resolves missing /etc/profile (e.g. $PATH) load and failing install+service if IPv6 is disabled: https://github.com/MichaIng/DietPi/issues/3017 + (( $G_DISTRO == 4 )) && cat << _EOF_ > /etc/apt/preferences.d/dietpi-xrdp +Package: xrdp +Pin: release n=stretch-backports +Pin-Priority: 500 +_EOF_ G_AGI xrdp fi @@ -12290,6 +12296,7 @@ _EOF_ Banner_Uninstalling G_AGP xrdp + [[ -f '/etc/apt/preferences.d/dietpi-xrdp' ]] && rm /etc/apt/preferences.d/dietpi-xrdp fi diff --git a/dietpi/pre-patch_file b/dietpi/pre-patch_file index 35d0bfd08e..590ccefb75 100644 --- a/dietpi/pre-patch_file +++ b/dietpi/pre-patch_file @@ -45,7 +45,7 @@ #------------------------------------------------------------------------------- # Pre-patch 1: RAMlog 0 free space check due to issues with failing DietPi cron jobs in v6.11 - if (( $G_DIETPI_VERSION_SUB < 12 && $(df -B1M --output=avail /var/log | sed -n 2p) < 2 )); then + if (( $G_DIETPI_VERSION_SUB < 12 && $(df -m --output=avail /var/log | tail -1) < 2 )); then echo -e '\e[90m[\e[0m INFO \e[90m]\e[0m Pre-patch 1 | Clearing /var/log files to free up RAMlog space (<2MB) before update will continue' /DietPi/dietpi/func/dietpi-logclear 1 || { EXIT_CODE=1; break; } @@ -53,8 +53,7 @@ fi #------------------------------------------------------------------------------- # Pre-patch 2: https://github.com/MichaIng/DietPi/pull/2490 - if (( $G_DIETPI_VERSION_SUB < 21 )) && [[ -f '/etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf' ]] && - grep -qi 'buster' /etc/os-release; then + if (( $G_DIETPI_VERSION_SUB < 21 )) && [[ -f '/etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf' ]] && grep -qi 'buster' /etc/os-release; then echo -e '\e[90m[\e[0m INFO \e[90m]\e[0m Pre-patch 2 | Patching /etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf for MariaDB v10.3/Buster support' sed -i '/innodb_large_prefix/d' /etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf || { EXIT_CODE=2; break; } @@ -90,49 +89,29 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior fi #------------------------------------------------------------------------------- # Pre-patch 6: Move Jessie systems to "jessie-support" branch: https://github.com/MichaIng/DietPi/issues/2332 - # Pre-patch 7: https://github.com/MichaIng/DietPi/pull/2728 if grep -qi 'jessie' /etc/os-release; then - if ! grep -q '^[[:blank:]]*DEV_GITBRANCH=jessie-support' /DietPi/dietpi.txt; then + echo -e '\e[90m[\e[0m INFO \e[90m]\e[0m Pre-patch 7 | Migrating Jessie systems to "jessie-support" update branch' + if grep -q '^[[:blank:]]*DEV_GITBRANCH=' /DietPi/dietpi.txt; then - echo -e '\e[90m[\e[0m INFO \e[90m]\e[0m Pre-patch 7 | Migrating Jessie systems to "jessie-support" update branch' - if grep -q '^[[:blank:]]*DEV_GITBRANCH=' /DietPi/dietpi.txt; then + sed -i '/^[[:blank:]]*DEV_GITBRANCH=/c\DEV_GITBRANCH=jessie-support' /DietPi/dietpi.txt - sed -i '/^[[:blank:]]*DEV_GITBRANCH=/c\DEV_GITBRANCH=jessie-support' /DietPi/dietpi.txt + else - else - - echo 'DEV_GITBRANCH=jessie-support' >> /DietPi/dietpi.txt - - fi - - # Remove DietPi-Update working directory to allow concurrent execution. - cd /tmp - [[ -d '/tmp/DietPi-Update' ]] && rm -R /tmp/DietPi-Update - - # Apply update forcefully, since user has already chosen to do so. - /DietPi/dietpi/dietpi-update 1 - - # Kill parental dietpi-update instance and exit this script to avoid deprecated update finish. - kill $PPID - exit + echo 'DEV_GITBRANCH=jessie-support' >> /DietPi/dietpi.txt fi - if (( $G_DIETPI_VERSION_SUB < 23 && $(sed -n 1p /DietPi/dietpi/.hw_model) > 9 )); then - - echo -e '\e[90m[\e[0m INFO \e[90m]\e[0m Pre-patch 7 | Applying changes to APT sources.list since Debian dropped support for Jessie systems' - if [[ $(uname -m) == 'aarch64' ]]; then - - echo 'deb http://archive.debian.org/debian/ main contrib non-free' > /etc/apt/sources.list || { EXIT_CODE=7; break; } - - else + # Remove DietPi-Update working directory to allow concurrent execution. + cd /tmp + [[ -d '/tmp/DietPi-Update' ]] && rm -R /tmp/DietPi-Update - sed -Ei '/jessie-(backports|updates)/d' /etc/apt/sources.list || { EXIT_CODE=7; break; } + # Apply update forcefully, since user has already chosen to do so. + /DietPi/dietpi/dietpi-update 1 - fi - - fi + # Kill parental dietpi-update instance and exit this script to avoid deprecated update finish. + kill $PPID + exit fi #------------------------------------------------------------------------------- @@ -156,7 +135,19 @@ Pin: release n=buster\nPin-Priority: 501\n # Pin down all other Buster packages to only allow upgrades of already installed ones via: "apt upgrade" Package: *\nPin: release n=buster\nPin-Priority: 100' > /etc/apt/preferences.d/dietpi-php || { EXIT_CODE=9; break; } - fi + fi + #------------------------------------------------------------------------------- + # Pre-patch 10: https://github.com/MichaIng/DietPi/pull/3020 + if (( $G_DISTRO_VERSION_SUB < 26 )) && command -v xrdp &> /dev/null && grep -qi 'stretch' /etc/os-release; then + + echo -e '\e[90m[\e[0m INFO \e[90m]\e[0m Pre-patch 10 | Allow upgrade of XRDP from backports to resolve certain issues with current Stretch version' + cat << _EOF_ > /etc/apt/preferences.d/dietpi-xrdp || { EXIT_CODE=10; break; } +Package: xrdp +Pin: release n=stretch-backports +Pin-Priority: 500 +_EOF_ + + fi #------------------------------------------------------------------------------- # Finished echo -e '\e[90m[\e[0m \e[32mOK\e[0m \e[90m]\e[0m Successfully applied pre-patches\n' From 79ab1d9bab4062d277c06e2b24da5f7150d61aaf Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Wed, 31 Jul 2019 13:16:55 +0200 Subject: [PATCH 064/184] v6.26 + DietPi-Pre-patch | Typo --- dietpi/pre-patch_file | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/pre-patch_file b/dietpi/pre-patch_file index 590ccefb75..71ff8a5430 100644 --- a/dietpi/pre-patch_file +++ b/dietpi/pre-patch_file @@ -138,7 +138,7 @@ Package: *\nPin: release n=buster\nPin-Priority: 100' > /etc/apt/preferences.d/d fi #------------------------------------------------------------------------------- # Pre-patch 10: https://github.com/MichaIng/DietPi/pull/3020 - if (( $G_DISTRO_VERSION_SUB < 26 )) && command -v xrdp &> /dev/null && grep -qi 'stretch' /etc/os-release; then + if (( $G_DIETPI_VERSION_SUB < 26 )) && command -v xrdp &> /dev/null && grep -qi 'stretch' /etc/os-release; then echo -e '\e[90m[\e[0m INFO \e[90m]\e[0m Pre-patch 10 | Allow upgrade of XRDP from backports to resolve certain issues with current Stretch version' cat << _EOF_ > /etc/apt/preferences.d/dietpi-xrdp || { EXIT_CODE=10; break; } From 73e9d7c565038f0368efe490d87c5fb093d1ad05 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Thu, 1 Aug 2019 16:23:24 +0200 Subject: [PATCH 065/184] v6.26 + DietPi-Software | TigerVNC: Since Stretch, VNC4 has fully been replaced by TigerVNC (via transitional meta package), so lets name it what it is and skip installing the transitional meta package. + DietPi-Software | TigerVNC/RealVNC: Visually enhance the config + uninstall steps by printing the correct chosen software title + DietPi-Software | TigerVNC/RealVNC: Simplify our service script: Load dietpi.txt variables only where required and apply default values if none were found. Rely on failing binary call, if missing, to exit with failure, which allows the systemd unit to forward meaningful error messages to journald. --- dietpi/dietpi-software | 119 +++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 70 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 2fbcb8ab81..395bbf5f67 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -407,7 +407,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=28 - aSOFTWARE_WHIP_NAME[$software_id]='VNC4 Server' + aSOFTWARE_WHIP_NAME[$software_id]='TigerVNC Server' aSOFTWARE_WHIP_DESC[$software_id]='desktop for remote connection' aSOFTWARE_CATEGORY_INDEX[$software_id]=1 aSOFTWARE_TYPE[$software_id]=0 @@ -444,7 +444,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_DESKTOP[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=4149#p4149' - # - License RPi only + # - RPi only (archive.raspberrypi.org repo) for ((i=10; i<=$MAX_G_HW_MODEL; i++)) do @@ -2421,7 +2421,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it fi - # Additional software that requires VNC4 Server + # Additional software that requires TigerVNC # - XRDP: https://github.com/MichaIng/DietPi/issues/1727 software_id=28 if (( ${aSOFTWARE_INSTALL_STATE[29]} == 1 )); then @@ -3350,7 +3350,7 @@ _EOF_ local package_list='mariadb-server' # Install php-mysql module, if PHP was already installed (( ${aSOFTWARE_INSTALL_STATE[89]} == 2 )) && package_list+=" $PHP_NAME-mysql" - G_AGI "$package_list" + G_AGI $package_list # Remove obsolete sysvinit service as we use the systemd mariadb.service if [[ -f '/etc/init.d/mysql' ]]; then @@ -3370,7 +3370,7 @@ _EOF_ local package_list='sqlite3' # Install php-sqlite module, if PHP was already installed (( ${aSOFTWARE_INSTALL_STATE[89]} == 2 )) && package_list+=" $PHP_NAME-sqlite3" - G_AGI "$package_list" + G_AGI $package_list fi @@ -3648,7 +3648,7 @@ _EOF_ chown -R www-data:www-data /var/www/owncloud - [[ $DEPS_LIST ]] && G_DIETPI-NOTIFY 2 'Installing required PHP modules' && G_AGI "$DEPS_LIST" + [[ $DEPS_LIST ]] && G_DIETPI-NOTIFY 2 'Installing required PHP modules' && G_AGI $DEPS_LIST fi @@ -3683,7 +3683,7 @@ _EOF_ chown -R www-data:www-data /var/www/nextcloud - [[ $DEPS_LIST ]] && G_DIETPI-NOTIFY 2 'Installing required PHP modules' && G_AGI "$DEPS_LIST" + [[ $DEPS_LIST ]] && G_DIETPI-NOTIFY 2 'Installing required PHP modules' && G_AGI $DEPS_LIST fi @@ -4488,11 +4488,13 @@ _EOF_ fi - software_id=28 # VNC4 Server + software_id=28 # TigerVNC Server if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then Banner_Installing - G_AGI 'vnc4server x11vnc tigervnc-common' + # TigerVNC allows connecting to a virtual desktop + # X11VNC allows connecting to a real desktop session, thus shared desktop sessions as well + G_AGI tigervnc-standalone-server tigervnc-common x11vnc fi @@ -4500,8 +4502,6 @@ _EOF_ if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then Banner_Installing - - # Available in Raspbian APT repo G_AGI realvnc-vnc-server fi @@ -9089,10 +9089,11 @@ _EOF_ fi - #software_id=28/120 # VNC4/RealVNC Server - Shared setup + # TigerVNC/RealVNC Server - Shared setup if (( ${aSOFTWARE_INSTALL_STATE[28]} == 1 || ${aSOFTWARE_INSTALL_STATE[120]} == 1 )); then - #Banner_Configuration + (( ${aSOFTWARE_INSTALL_STATE[28]} == 1 )) && software_id=28 || software_id=120 + Banner_Configuration echo -e "$GLOBAL_PW=\n$GLOBAL_PW=\nn\n" | vncpasswd @@ -9100,7 +9101,7 @@ _EOF_ [Unit] Description=Manage VNC Server (DietPi) Before=xrdp.service xrdp-sesman.service -After=dietpi-boot.service dietpi-ramdisk.service dietpi-ramlog.service +After=dietpi-boot.service [Service] RemainAfterExit=yes @@ -9118,55 +9119,29 @@ _EOF_ cat << _EOF_ > /usr/local/bin/vncserver #!/bin/bash -# Globals -VNC_INSTALLED=0 -BINARY_FP=0 -SHARED_MODE=0 - -WIDTH=\$(grep -m1 '^[[:blank:]]*SOFTWARE_VNCSERVER_WIDTH=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') -HEIGHT=\$(grep -m1 '^[[:blank:]]*SOFTWARE_VNCSERVER_HEIGHT=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') -DEPTH=\$(grep -m1 '^[[:blank:]]*SOFTWARE_VNCSERVER_DEPTH=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') -DISPLAY=\$(grep -m1 '^[[:blank:]]*SOFTWARE_VNCSERVER_DISPLAY_INDEX=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') -SHARED_MODE=\$(grep -m1 '^[[:blank:]]*SOFTWARE_VNCSERVER_SHARE_DESKTOP=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') +# Check shared mode +SHARED_MODE=\$(grep -cm1 '^[[:blank:]]*SOFTWARE_VNCSERVER_SHARE_DESKTOP=1' /DietPi/dietpi.txt) -# RealVNC | Slightly different launch method to VNC4server +# RealVNC | Slightly different launch method to TigerVNC REALVNC=0 if dpkg-query -s realvnc-vnc-server &> /dev/null; then REALVNC=1 - - #Set shared desktop mode if autostart is enabled for desktops. This prevents another VNC server being launched on :1. - (( \$( /dev/null - killall -qw x11vnc - killall -qw Xtigervnc + DISPLAY=\$(grep -m1 '^[[:blank:]]*SOFTWARE_VNCSERVER_DISPLAY_INDEX=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') + \$BINARY_FP -kill :\${DISPLAY:-1} &> /dev/null + killall -qw x11vnc Xtigervnc ;; esac @@ -9212,14 +9192,7 @@ _EOF_ fi # - Stretch + TigerVNC: Disable Localhost only by default - echo '$localhost = "no";' >> /etc/vnc.conf - - fi - - software_id=28 # VNC4/RealVNC Server - if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 || ${aSOFTWARE_INSTALL_STATE[120]} == 1 )); then - - Banner_Configuration + [[ -f '/etc/vnc.conf' ]] && GCI_PRESERVE=1 G_CONFIG_INJECT '\$localhost[[:blank:]]*=' '$localhost = "no";' /etc/vnc.conf local cmd_launch_desktop='' # DESKTOP_LXDE @@ -13277,20 +13250,26 @@ _EOF_ fi - software_id=28 - if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 || ${aSOFTWARE_INSTALL_STATE[120]} == -1 )); then + # TigerVNC/RealVNC + if (( ${aSOFTWARE_INSTALL_STATE[28]} == -1 || ${aSOFTWARE_INSTALL_STATE[120]} == -1 )); then + (( ${aSOFTWARE_INSTALL_STATE[28]} == -1 )) && software_id=28 || software_id=120 Banner_Uninstalling - G_AGP tigervnc-* vnc4server x11vnc realvnc-vnc-server + G_AGP tigervnc-* x11vnc realvnc-vnc-server + + if [[ -f '/etc/systemd/system/vncserver.service' ]]; then - rm /etc/systemd/system/vncserver.service - rm /etc/init.d/vncserver - rm /usr/local/bin/vncserver - rm -R /root/.vnc + systemctl disable --now vncserver + rm -R /etc/systemd/system/vncserver.service* + + fi + [[ -f '/etc/init.d/vncserver' ]] && rm /etc/init.d/vncserver + [[ -f '/usr/local/bin/vncserver' ]] && rm /usr/local/bin/vncserver + [[ -d '/root/.vnc' ]] && rm -R /root/.vnc # + RealVNC services - systemctl disable vncserver-x11-serviced.service - systemctl disable vncserver-virtuald.service + systemctl disable vncserver-x11-serviced.service 2> /dev/null + systemctl disable vncserver-virtuald.service 2> /dev/null fi From 14fc3e8d7afdc6031c37647a1a8d70963c809fba Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Thu, 1 Aug 2019 18:34:50 +0200 Subject: [PATCH 066/184] v6.26 + DietPi-Software | X.org: Resolve uninstall APT error (dbus-x11) and mark graphics driver and library packages as auto installed to allow further cleanup via autoremoval. When uninstalling Xserver, user most likely does not require graphics functionality, otherwise a fresh install of required driver/library packages for e.g. Wayland or something else X11 independent, makes sense anyway. + DietPi-Software | LXDE: On RPi, apply pcmanfm fix only on Stretch, until issue and solution is verified on Buster, which then requires the Buster version package --- dietpi/dietpi-software | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 395bbf5f67..a2b9354bc9 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3126,8 +3126,8 @@ Package: *php7.3*\nPin: release *\nPin-Priority: -1' > /etc/apt/preferences.d/di G_AGI lxde upower policykit-1 firefox-esr #upower policykit-1. Needed for LXDE logout menu item to show shutdown/restart ... - # - RPi, revert to Debian pcmanfm install package: https://github.com/MichaIng/DietPi/issues/1558#issuecomment-390328173 - if (( $G_HW_MODEL < 10 )); then + # - RPi Stretch, revert to Debian pcmanfm install package: https://github.com/MichaIng/DietPi/issues/1558#issuecomment-390328173 + if (( $G_HW_MODEL < 10 && $G_DISTRO == 4 )); then Download_Install 'https://dietpi.com/downloads/binaries/all/pcmanfm_1.2.5-3_armhf.deb' apt-mark hold pcmanfm @@ -14226,8 +14226,8 @@ _EOF_ if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then Banner_Uninstalling - #apt-mark auto xserver-xorg-video-armsoc libdrm-rockchip1 libmali-rk-utgard-450-r7p0 aml-libs-odroid mali450-odroid xf86-video-mali-odroid libump* xf86-video-fbturbo* firmware-samsung xf86-video-armsoc-odroid malit628-odroid &> /dev/null - G_AGP xserver-xorg xinit xcompmgr xterm dbus-x11 xfonts-base x11-xserver-utils x11-utils + apt-mark auto dbus-x11 libgl1-mesa-dri mesa-* libdrm-rockchip1 libmali-rk-utgard-450-r7p0 xf86-video-* malit628-odroid mali450-odroid aml-libs-odroid libump* firmware-samsung &> /dev/null + G_AGP xorg* xserver-xorg* x11-* xinit xcompmgr xterm xfonts-base rm /etc/xdg/autostart/xcompmgr.desktop /etc/X11/xorg.conf /etc/X11/xorg.conf.d/99-dietpi-dpms_off.conf &> /dev/null fi From 9846e8136f23a2ad08c9f9262ea7c4d142e6844d Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Thu, 1 Aug 2019 18:55:06 +0200 Subject: [PATCH 067/184] v6.26 + DietPi-Set_software | /var/tmp should have the sticky bit! --- dietpi/func/dietpi-set_software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 7790d31849..4f7b10b0d4 100644 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -370,8 +370,8 @@ _EOF_ #///////////////////////////////////////////////////////////////////////////////////// Setpermissions_Main(){ - # Failsafe, assure /var/tmp 777 permissions: https://github.com/MichaIng/DietPi/issues/1144#issuecomment-425758727 - chmod 777 /var/tmp + # Failsafe, assure /var/tmp 1777 permissions: https://github.com/MichaIng/DietPi/issues/1144#issuecomment-425758727 + chmod 1777 /var/tmp # DietPi-Software secure global_pw encrypted chown root:root /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin From 86a33676cf12aafdeea211cf9ae7885429d2ec6f Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Thu, 1 Aug 2019 20:29:54 +0200 Subject: [PATCH 068/184] v6.26 + DietPi-Update | Exit update if important sub scripts fail, otherwise update will just continue, applying new version string as well. It is safer to exit immediately. The sub script produces meaningful error output that could be overseen or ignored by user, as update goes on, leaving system in unintended state. --- dietpi/dietpi-update | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dietpi/dietpi-update b/dietpi/dietpi-update index 19ed6d36e0..9ccee4e7cb 100644 --- a/dietpi/dietpi-update +++ b/dietpi/dietpi-update @@ -238,7 +238,7 @@ Please download the latest DietPi image from: https://dietpi.com/#download' G_VERSIONDB_SAVE # Verify/update dietpi.txt entries: - /DietPi/dietpi/func/dietpi-set_software verify_dietpi.txt + /DietPi/dietpi/func/dietpi-set_software verify_dietpi.txt || exit 1 # Failsafe: Sync changes to disk sync @@ -252,7 +252,7 @@ Please download the latest DietPi image from: https://dietpi.com/#download' while (( $G_DIETPI_VERSION_SUB < $SUBVERSION_SERVER )); do G_DIETPI-NOTIFY 2 "Patching $G_DIETPI_VERSION_CORE.$G_DIETPI_VERSION_SUB to $COREVERSION_SERVER.$(( $G_DIETPI_VERSION_SUB + 1 ))" - /DietPi/dietpi/patch_file $G_DIETPI_VERSION_SUB + /DietPi/dietpi/patch_file $G_DIETPI_VERSION_SUB || exit 1 G_DIETPI_VERSION_SUB=$(( $G_DIETPI_VERSION_SUB + 1 )) G_DIETPI_VERSION_RC=$RCVERSION_SERVER # Cancel any RC updates, as subversions override it @@ -262,7 +262,7 @@ Please download the latest DietPi image from: https://dietpi.com/#download' if (( $G_DIETPI_VERSION_RC < $RCVERSION_SERVER )); then G_DIETPI-NOTIFY 2 "Patching $G_DIETPI_VERSION_CORE.$G_DIETPI_VERSION_SUB.$G_DIETPI_VERSION_RC to $COREVERSION_SERVER.$SUBVERSION_SERVER.$RCVERSION_SERVER" - /DietPi/dietpi/patch_file $(( $G_DIETPI_VERSION_SUB - 1 )) # Rerun current subversion patch for RCs + /DietPi/dietpi/patch_file $(( $G_DIETPI_VERSION_SUB - 1 )) || exit 1 # Rerun current subversion patch for RCs G_DIETPI_VERSION_RC=$RCVERSION_SERVER fi From e6965b47e3d329fa72078c0851bd6d1e18b65fb2 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Thu, 1 Aug 2019 23:16:40 +0200 Subject: [PATCH 069/184] v6.26 + DietPi-Update | Tiny --- dietpi/dietpi-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-update b/dietpi/dietpi-update index 9ccee4e7cb..815b20ff85 100644 --- a/dietpi/dietpi-update +++ b/dietpi/dietpi-update @@ -167,7 +167,7 @@ If this error persists, please report at: https://github.com/MichaIng/DietPi/iss Please download the latest DietPi image from: https://dietpi.com/#download' # Update available - elif (( $G_DIETPI_VERSION_SUB < $SUBVERSION_SERVER || + elif (( $G_DIETPI_VERSION_SUB < $SUBVERSION_SERVER || ( $G_DIETPI_VERSION_SUB == $SUBVERSION_SERVER && $G_DIETPI_VERSION_RC < $RCVERSION_SERVER ) )); then UPDATE_AVAILABLE=1 From 62fe7ea9aee0ce1eebb9c4c98d2162b713b3cba4 Mon Sep 17 00:00:00 2001 From: sal666 Date: Fri, 2 Aug 2019 13:20:55 +0200 Subject: [PATCH 070/184] Add files via upload --- .meta/images/dietpi-background.png | Bin 0 -> 81677 bytes .meta/images/select_bkg_c.png | Bin 0 -> 448 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 .meta/images/dietpi-background.png create mode 100644 .meta/images/select_bkg_c.png diff --git a/.meta/images/dietpi-background.png b/.meta/images/dietpi-background.png new file mode 100644 index 0000000000000000000000000000000000000000..51e3f60791cb088d0937046d8addda282fbd63cb GIT binary patch literal 81677 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 Date: Sat, 3 Aug 2019 21:49:34 +0200 Subject: [PATCH 071/184] v6.26 + DietPi-Patch | On RPi, replace haveged with rng-tools --- dietpi/patch_file | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dietpi/patch_file b/dietpi/patch_file index 3dfcd2e5e1..380efd038a 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2138,6 +2138,15 @@ A backup will be created to "/etc/mympd/mympd.conf.bak_DDMMYYY_N" from where you done #------------------------------------------------------------------------------- + # On RPi, replace haveged with rng-tools, which is proven to work on RPi, is default on Raspbian and uses less RAM on idle. + if (( $G_HW_MODEL < 9 )); then + + systemctl disable --now haveged 2> /dev/null + G_AGP haveged + G_AGI rng-tools + + fi + #------------------------------------------------------------------------------- # Reinstalls and software install changes if (( $G_DIETPI_INSTALL_STAGE == 2 )); then From 56ae596be2f1156edfbea3b7f11951efac5ed7b0 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sat, 3 Aug 2019 21:53:57 +0200 Subject: [PATCH 072/184] v6.26 (#3030) + DietPi-PREP | On RPi, install rng-tools instead of haveged, which is proven to work on RPi, is default on Raspbian and uses less RAM on idle --- CHANGELOG.txt | 1 + PREP_SYSTEM_FOR_DIETPI.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f9724675ab..ec7219a9ca 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,7 @@ v6.26 Changes / Improvements / Optimisations: - General | Support for Debian Jessie has now been fully dropped from DietPi code. Jessie systems are moved to the "jessie-support" Git branch and will stay on v6.25. Critical bugs, if reported, may still be fixed, but DietPi-Software related issues and new features will not be handled anymore by the DietPi code team. However, everyone is free to open pull requests against the jessie-support branch: https://github.com/MichaIng/DietPi/tree/jessie-support - General | Initial support and definitions for Debian Bullseye, the new Debian testing version, have been added to DietPi code. You can now create Bullseye systems via DietPi-PREP: https://github.com/MichaIng/DietPi/issues/3009 +- RPi | The haveged daemon has been replaced with rng-tools, an alternative which does not work on all devices, but has been proven to work on RPi, is default on Raspbian and uses less RAM on idle. - DietPi-Config | Audio Options: Menu has been reworked. Audio capabilities (ALSA) can be enabled and disabled as a separate option. If enabled, generic sound card auto-detection has been added to the bottom of the list for all devices. This allows the selection of generic sound devices on all SBCs, e.g. if unknown to DietPi or if our hard-coded card/device IDs are wrong due to additional attached audio hardware. - DietPi-Config | RPi: Update certain config.txt settings to match new firmware version. WiFi and Bluetooth is now disabled via related dtoverlays, which should further reduce hardware and firmware loads. - DietPi-Config | Some /etc/modprobe.d/ configs are merged to less files and mostly prefixed with "dietpi-", to allow easier differentiation between Debian/pre-image and DietPi files. diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index 22e10878d1..fc937d2b98 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -732,7 +732,6 @@ _EOF_ 'ethtool' # Ethernet link checking 'fake-hwclock' # Hardware clock emulation, to allow correct timestamps during boot before network time sync 'gnupg' # apt-key add - 'haveged' # Entropy daemon: https://github.com/MichaIng/DietPi/issues/2806 'htop' # System monitor 'iputils-ping' # "ping" command 'isc-dhcp-client' # DHCP client @@ -773,10 +772,12 @@ _EOF_ G_AGI debian-archive-keyring aPACKAGES_REQUIRED_INSTALL+=('initramfs-tools') # RAM file system initialization, required for generic boot loader, but not required/used by RPi bootloader + aPACKAGES_REQUIRED_INSTALL+=('haveged') # Entropy daemon: https://github.com/MichaIng/DietPi/issues/2806 else G_AGI raspbian-archive-keyring + aPACKAGES_REQUIRED_INSTALL+=('rng-tools') # Entropy daemon: Alternative, that does not work on all devices, but is proven to work on RPi, is default on Raspbian and uses less RAM on idle. fi From 140464f19ca2c1da0ddbf9cdfa0a3f6d9f1be4f9 Mon Sep 17 00:00:00 2001 From: Dan Date: Sun, 4 Aug 2019 12:18:28 +0100 Subject: [PATCH 073/184] Pateron Legend addition oct8l --- dietpi/func/dietpi-banner | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/func/dietpi-banner b/dietpi/func/dietpi-banner index 1b8e5f0f90..88478c7993 100644 --- a/dietpi/func/dietpi-banner +++ b/dietpi/func/dietpi-banner @@ -144,7 +144,7 @@ $GREEN_LINE" [[ -f '/DietPi/dietpi/.prep_info' ]] && mawk 'NR==1 {sub(/^0$/,"DietPi Core Team");a=$0} NR==2 {print " Image : "a" (pre-image: "$0")"}' /DietPi/dietpi/.prep_info echo ' Web : https://DietPi.com | https://twitter.com/dietpi_ - Patreon Legends : PINE64 community + Patreon Legends : PINE64 community | oct8l Donate : https://DietPi.com/#donate' local image_additional_credits=$(mawk 'NR==8 {print}' /DietPi/dietpi/.hw_model 2>&1) From e060bde70ffff86c686c13a1250166ba55acfcc8 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 4 Aug 2019 16:05:47 +0200 Subject: [PATCH 074/184] v6.26 + DietPi-Software | X.org: On Odroid C2 use the exact xorg.conf provided by Meveric's setup-odroid --- .conf/dps_6/xorg_c2.conf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.conf/dps_6/xorg_c2.conf b/.conf/dps_6/xorg_c2.conf index 3b03382de7..997247df61 100644 --- a/.conf/dps_6/xorg_c2.conf +++ b/.conf/dps_6/xorg_c2.conf @@ -1,9 +1,9 @@ +# Provided by @Meveric's setup-odroid: http://fuzon.co.uk/meveric/pool/main/s/setup-odroid/ Section "Device" + Identifier "FBTURBO" + Driver "fbturbo" + Option "fbdev" "/dev/fb0" - Identifier "FBTurbo" - Driver "fbturbo" - Option "fbdev" "/dev/fb0" - Option "SwapbuffersWait" "true" - #Option "Rotate" "CCW" - + Option "SwapbuffersWait" "true" + Option "alpha_swap" "true" EndSection From 5fb67fe740038c0a86326a5f0bc41aca81497fcd Mon Sep 17 00:00:00 2001 From: Dan Date: Sun, 4 Aug 2019 16:03:21 +0100 Subject: [PATCH 075/184] Disable ASUS GPU Not functional with Buster: https://github.com/MichaIng/DietPi/issues/2977#issuecomment-518010484 --- dietpi/dietpi-software | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index a2b9354bc9..504d668131 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6157,36 +6157,6 @@ Mycroft AI requires at least 2 GiB memory on first start. We will now increase y #ln -sf /usr/lib/aarch64-linux-gnu/libMali.so /usr/lib/aarch64-linux-gnu/libMaliOpenCL.so #ln -sf /usr/lib/aarch64-linux-gnu/libMali.so /usr/lib/aarch64-linux-gnu/libOpenCL.so - # ASUS TB - elif (( $G_HW_MODEL == 52 )); then - - Download_Install 'https://dietpi.com/downloads/binaries/asus/ASUSTB_GPU.7z' gpu_driver - - cd gpu_driver - dpkg -i *.deb - G_AGF - - # - Hold GPU installed packages - apt-mark hold xserver-common xserver-xorg-core - - cd /tmp/$G_PROGRAM_NAME - rm -R gpu_driver - - dps_index=$software_id Download_Install 'xorg_asustb.conf' /etc/X11/xorg.conf - - rm $(ls /usr/lib/arm-linux-gnueabihf/libGLESv2.*) - rm $(ls /usr/lib/arm-linux-gnueabihf/libEGL.*) - mv /usr/lib/arm-linux-gnueabihf/libmali-midgard-r13p0-r0p0.so /usr/lib/arm-linux-gnueabihf/libMali.so - ln -sf /usr/lib/arm-linux-gnueabihf/libMali.so /usr/lib/arm-linux-gnueabihf/libEGL.so.1 - ln -sf /usr/lib/arm-linux-gnueabihf/libMali.so /usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0 - ln -sf /usr/lib/arm-linux-gnueabihf/libMali.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 - ln -sf /usr/lib/arm-linux-gnueabihf/libMali.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0 - ln -sf /usr/lib/arm-linux-gnueabihf/libMali.so /usr/lib/arm-linux-gnueabihf/libgbm.so.1 - ln -sf /usr/lib/arm-linux-gnueabihf/libMali.so /usr/lib/arm-linux-gnueabihf/libgbm.so.1.0.0 - ln -sf /usr/lib/arm-linux-gnueabihf/libMali.so /usr/lib/arm-linux-gnueabihf/libmali.so - ln -sf /usr/lib/arm-linux-gnueabihf/libMali.so /usr/lib/arm-linux-gnueabihf/libMaliOpenCL.so - ln -sf /usr/lib/arm-linux-gnueabihf/libMali.so /usr/lib/arm-linux-gnueabihf/libOpenCL.so - fi fi From 126032e27612d4281b2a42dc5cacd4b9f9f12297 Mon Sep 17 00:00:00 2001 From: Dan Date: Sun, 4 Aug 2019 16:06:13 +0100 Subject: [PATCH 076/184] No GPU support for ASUS since Buster update. https://github.com/MichaIng/DietPi/issues/2977#issuecomment-518010484 --- PREP_SYSTEM_FOR_DIETPI.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index fc937d2b98..c5067fae3d 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -393,7 +393,6 @@ '' '●─ Other ' '22' ': Generic device (unknown to DietPi)' '' '●─ SBC─(Core devices, with GPU support) ' - '52' ': ASUS Tinker Board' '12' ': Odroid C2' '11' ': Odroid XU3/XU4/HC1/HC2' '44' ': Pinebook 1080p' @@ -406,7 +405,7 @@ '21' ': x86_64 Native PC' '20' ': x86_64 Virtual Machine' '' '●─ SBC─(Limited support devices, no GPU support) ' - '10' ': Odroid C1' + '52' ': ASUS Tinker Board' '53' ': BananaPi (sinovoip)' '51' ': BananaPi Pro (Lemaker)' '50' ': BananaPi M2+ (sinovoip)' @@ -422,6 +421,7 @@ '62' ': NanoPi M3/T3/F3' '68' ': NanoPC T4' '67' ': NanoPi K1 Plus' + '10' ': Odroid C1' '14' ': Odroid N1' '15' ': Odroid N2' '13' ': Odroid U3' From 4758ff1b75e4a69d52e598c8ef5d9f37039fc6fc Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 4 Aug 2019 20:49:15 +0200 Subject: [PATCH 077/184] v6.26 + DietPi-Pre-patch | Sonarr: Update APT repository key to new long version --- dietpi/pre-patch_file | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dietpi/pre-patch_file b/dietpi/pre-patch_file index 71ff8a5430..650e2b6794 100644 --- a/dietpi/pre-patch_file +++ b/dietpi/pre-patch_file @@ -147,6 +147,14 @@ Pin: release n=stretch-backports Pin-Priority: 500 _EOF_ + fi + #------------------------------------------------------------------------------- + # Pre-patch 11: https://github.com/MichaIng/DietPi/issues/3029 + if (( $G_DIETPI_VERSION_SUB < 26 )) && [[ -f '/etc/apt/sources.list.d/sonarr.list' ]]; then + + echo -e '\e[90m[\e[0m INFO \e[90m]\e[0m Pre-patch 11 | Updating Sonarr APT repository key' + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493 || { EXIT_CODE=11; break; } + fi #------------------------------------------------------------------------------- # Finished From bde2a09893615836209937cb63bc40ea42ccb405 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 4 Aug 2019 20:50:56 +0200 Subject: [PATCH 078/184] v6.26 + CHANGELOG | Sonarr: Resolved an issue where install failed due to an outdated APT repository key --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index ec7219a9ca..68d50fcae3 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -12,6 +12,7 @@ Changes / Improvements / Optimisations: - DietPi-Software | Pi-hole: Lighttpd config has been added to block access to .dot dirs (.git*) and enable local fonts for web UI, based on: https://github.com/pi-hole/pi-hole/blob/master/advanced/lighttpd.conf.debian - DietPi-Software | OpenVPN: Rsyslog is not installed anymore together with OpenVPN server. Logs are available via "journalctl -u openvpn", all system logs via "journalctl". If you require persistent logs, uninstall DietPi-RAMlog via dietpi-software and make the journal boot persistent via: mkdir /var/log/journal - DietPi-Software | Gogs: On ARMv7 and x86_64 now the latest version from GitHub is installed. Reinstalls will upgrade the version while preserving existing settings. Many thanks to @LazyLama for doing this suggestion: https://github.com/MichaIng/DietPi/issues/2999 +- DietPi-Software | Sonarr: Resolved an issue where install failed due to an outdated APT repository key. Many thanks to @GregoryDosh and @GulyFMG for reporting this issue: https://github.com/MichaIng/DietPi/issues/3029 Bug Fixes: - General | Removed an obsolete OpenMediaVault cron job and binary that was leftover on at least one of our images (NanoPi NEO2) and is not part of the current OMV packages, thus save to remove in every case. Many thanks to @kt1024 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2994 From 5d60929e9e6420150918e3923297db49bfc73fa5 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 4 Aug 2019 20:51:44 +0200 Subject: [PATCH 079/184] v6.26 + CHANGELOG | Move Sonarr fix to bug fixes --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 68d50fcae3..ea1e74bcf0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -12,7 +12,6 @@ Changes / Improvements / Optimisations: - DietPi-Software | Pi-hole: Lighttpd config has been added to block access to .dot dirs (.git*) and enable local fonts for web UI, based on: https://github.com/pi-hole/pi-hole/blob/master/advanced/lighttpd.conf.debian - DietPi-Software | OpenVPN: Rsyslog is not installed anymore together with OpenVPN server. Logs are available via "journalctl -u openvpn", all system logs via "journalctl". If you require persistent logs, uninstall DietPi-RAMlog via dietpi-software and make the journal boot persistent via: mkdir /var/log/journal - DietPi-Software | Gogs: On ARMv7 and x86_64 now the latest version from GitHub is installed. Reinstalls will upgrade the version while preserving existing settings. Many thanks to @LazyLama for doing this suggestion: https://github.com/MichaIng/DietPi/issues/2999 -- DietPi-Software | Sonarr: Resolved an issue where install failed due to an outdated APT repository key. Many thanks to @GregoryDosh and @GulyFMG for reporting this issue: https://github.com/MichaIng/DietPi/issues/3029 Bug Fixes: - General | Removed an obsolete OpenMediaVault cron job and binary that was leftover on at least one of our images (NanoPi NEO2) and is not part of the current OMV packages, thus save to remove in every case. Many thanks to @kt1024 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2994 @@ -23,6 +22,7 @@ Bug Fixes: - DietPi-Software | Node-RED: Resolved an issue where user creation fails if "gpio" group is not present. Many thanks to @marcobrianza for reporting this issue: https://github.com/MichaIng/DietPi/issues/2975#issuecomment-513917360 - DietPi-Software | OpenVPN: Resolved an issue where install failed on Debian Buster due to a new easy-rsa version with changed commands and options. Now the most recent easy-rsa is manually downloaded on all systems to generate server and client key + cert with modern methods and the client config is slightly updated to match modern settings. - DietPi-Software | XRDP: On Stretch, new the version from backports is installed. This resolves a critical issue where /etc/profile was not loaded to the session and, due to incomplete $PATH variable, important system binaries were not available on terminal emulators which broke many install and upgrade tasks. Furthermore this resolves an issue where install and connection of XRDP failed if IPv6 was disabled. Many thanks to @aspinks for the debug session which allowed us to track the issue down to its root: https://github.com/MichaIng/DietPi/issues/3017 +- DietPi-Software | Sonarr: Resolved an issue where install failed due to an outdated APT repository key. Many thanks to @GregoryDosh and @GulyFMG for reporting this issue: https://github.com/MichaIng/DietPi/issues/3029 As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/XXXX From 3f118a3924248a8419cf94f77c42c315791be7e2 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Tue, 6 Aug 2019 16:35:34 +0200 Subject: [PATCH 080/184] v6.26 (#3035) + DietPi-Software | X.org: On Odroid C2, skip install of xf86-video-mali-odroid, which is required for fbdev only, but we use fbturbo which is covered by xf86-video-fbturbo-odroid. + DietPi-Software | Kodi: On Odroid XU4, skip installing PulseAudio as recommended by Meveric and to not conflict with pure ALSA setup used by other software installs. If there is still a real benefit and not other solution for ALSA, we can re-add at a later date. + DietPi-Software | X.org: Re-enable GPU support on ASUS TB for Stretch, use our updated drivers archive which does not require to create all the symlinks but already contains them correctly. On Buster, the new Debian-provided packages require testing first. + DietPi-Software | Use force options on manual DPKG install to avoid interactive input requests --- dietpi/dietpi-software | 46 ++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 504d668131..0066e260e1 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3861,32 +3861,21 @@ _EOF_ local package_list='kodi-odroid' - # - XU4: Requires pulse audio (fixes corrupt sound) - (( $G_HW_MODEL == 11 )) && package_list+=' pulseaudio' - # Everything else else local package_list='kodi' - # - RPi: Kodi 18 requires fbset to start with custom screen resolution: https://dietpi.com/phpbb/viewtopic.php?p=17550#p17550 + # RPi: Kodi 18 requires fbset to start with custom screen resolution: https://dietpi.com/phpbb/viewtopic.php?p=17550#p17550 (( $G_HW_MODEL < 10 )) && package_list+=' fbset' fi - # - libcurl3-gnutls required for C2. But lets apply to all: https://github.com/MichaIng/DietPi/issues/446 - package_list+=' libcurl3-gnutls' - - # - NFS/CEC support - if (( $G_DISTRO < 5 )); then - - package_list+=' libnfs8 libcec4' - - else - - package_list+=' libnfs12 libcec4' + # CEC support + libcurl3-gnutls required for C2, but lets apply to all: https://github.com/MichaIng/DietPi/issues/446 + package_list+=' libcec4 libcurl3-gnutls' - fi + # NFS support + (( $G_DISTRO < 5 )) && package_list+=' libnfs8' || package_list+=' libnfs12' G_AGI $package_list @@ -6114,7 +6103,7 @@ Mycroft AI requires at least 2 GiB memory on first start. We will now increase y # Odroid C2 elif (( $G_HW_MODEL == 12 )); then - DEPS_LIST='aml-libs-odroid mali450-odroid xf86-video-mali-odroid libump-odroid xf86-video-fbturbo-odroid' + DEPS_LIST='aml-libs-odroid mali450-odroid libump-odroid xf86-video-fbturbo-odroid' G_BACKUP_FP /etc/X11/xorg.conf dps_index=$software_id Download_Install 'xorg_c2.conf' /etc/X11/xorg.conf @@ -6123,7 +6112,7 @@ Mycroft AI requires at least 2 GiB memory on first start. We will now increase y G_AGI firmware-samsung xf86-video-armsoc-odroid malit628-odroid - # Pine64 + # Pine A64 elif (( $G_HW_MODEL == 40 )); then Download_Install 'https://dietpi.com/downloads/binaries/all/libump_1-1_arm64.deb' @@ -6157,6 +6146,17 @@ Mycroft AI requires at least 2 GiB memory on first start. We will now increase y #ln -sf /usr/lib/aarch64-linux-gnu/libMali.so /usr/lib/aarch64-linux-gnu/libMaliOpenCL.so #ln -sf /usr/lib/aarch64-linux-gnu/libMali.so /usr/lib/aarch64-linux-gnu/libOpenCL.so + # ASUS TB: On Stretch, install our prepared drivers archive + # - On Buster, new t76x driver packages require testing: https://packages.debian.org/buster/libegl1 + elif (( $G_HW_MODEL == 52 && $G_DISTRO == 4 )); then + + Download_Install 'https://dietpi.com/downloads/binaries/asus/ASUSTB_GPU.7z' gpu_drivers + dpkg --force-hold,confdef,confnew -i gpu_drivers/*.deb + G_AGF + rm -R gpu_drivers + + dps_index=$software_id Download_Install 'xorg_asustb.conf' /etc/X11/xorg.conf + fi fi @@ -8333,18 +8333,16 @@ _EOF_ Banner_Configuration # Remove Kodi user (Whilst waving) - userdel -r kodi &> /dev/null + getent passwd kodi &> /dev/null && userdel -r kodi # Run Kodi as root [[ -f '/etc/default/kodi' ]] && G_CONFIG_INJECT 'USER=' 'USER=root' /etc/default/kodi # Copy udev rules, probably not needed for root, but we'll do it anyway dps_index=$software_id Download_Install '99-dietpi-kodi.rules' /etc/udev/rules.d/99-dietpi-kodi.rules - chmod +x /etc/udev/rules.d/99-dietpi-kodi.rules - # Create .desktop SymLinks + # Create .desktop symlink mkdir -p /root/Desktop - [[ -f '/usr/share/applications/kodi.desktop' ]] && rm /usr/share/applications/kodi.desktop G_RUN_CMD wget https://raw.githubusercontent.com/MichaIng/DietPi/$G_GITBRANCH/.conf/desktop/apps/kodi.desktop -O /usr/share/applications/kodi.desktop ln -sf /usr/share/applications/kodi.desktop /root/Desktop/kodi.desktop @@ -12953,10 +12951,10 @@ _EOF_ if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then Banner_Uninstalling + #apt-mark auto libcec4 libcurl3-gnutls libnfs* G_AGP kodi kodi-odroid [[ -f '/usr/share/applications/kodi.desktop' ]] && rm /usr/share/applications/kodi.desktop - [[ -f '/root/Desktop/kodi.desktop' ]] && rm /root/Desktop/kodi.desktop - rm -f /home/*/Desktop/kodi.desktop + rm -f /{root,home/*}/Desktop/kodi.desktop [[ -f '/etc/udev/rules.d/99-dietpi-kodi.rules' ]] && rm /etc/udev/rules.d/99-dietpi-kodi.rules fi From aa5002d7a7ff986013f76f73e2f615baabe1b4fd Mon Sep 17 00:00:00 2001 From: Atk Date: Wed, 7 Aug 2019 15:19:00 +0100 Subject: [PATCH 081/184] v6.26 (#3041) + DietPi-Globals | Renamed G_USER_INPUTS to G_INTERACTIVE which is more precise and understandable for end users --- dietpi/dietpi-login | 8 +++--- dietpi/dietpi-services | 8 +++--- dietpi/dietpi-software | 4 +-- dietpi/dietpi-survey | 4 +-- dietpi/func/dietpi-benchmark | 4 +-- dietpi/func/dietpi-globals | 49 +++++++++++++++++++++--------------- dietpi/func/run_ntpd | 4 +-- 7 files changed, 45 insertions(+), 36 deletions(-) diff --git a/dietpi/dietpi-login b/dietpi/dietpi-login index d02a73a512..b93e5958aa 100644 --- a/dietpi/dietpi-login +++ b/dietpi/dietpi-login @@ -25,7 +25,7 @@ Show_License(){ - if [[ -f '/var/lib/dietpi/license.txt' ]] && (( $G_USER_INPUTS )); then + if [[ -f '/var/lib/dietpi/license.txt' ]] && (( $G_INTERACTIVE )); then G_WHIP_VIEWFILE /var/lib/dietpi/license.txt rm /var/lib/dietpi/license.txt @@ -113,7 +113,7 @@ Run_DietPi_First_Run_Setup(){ # - Set non-interactive shell if automated install chosen, as .bashrc run via STDIN check is interactive - grep -qi '^[[:blank:]]*AUTO_SETUP_AUTOMATED=1' /DietPi/dietpi.txt && export G_USER_INPUTS=0 + grep -qi '^[[:blank:]]*AUTO_SETUP_AUTOMATED=1' /DietPi/dietpi.txt && export G_INTERACTIVE=0 # - Prompt and wait if this script runs in other session already local pid_firstrunsetup='' @@ -122,7 +122,7 @@ # - First run setup running in other session local additional_text='Please resume setup on the active screen.' - (( $G_USER_INPUTS )) || additional_text='Automated setup is in progress. When completed, the system will be rebooted.' + (( $G_INTERACTIVE )) || additional_text='Automated setup is in progress. When completed, the system will be rebooted.' G_WHIP_MSG "[INFO] DietPi first run setup: Currently running on another screen (PID=$pid_firstrunsetup).\n\n$additional_text" @@ -228,7 +228,7 @@ Please login again as user "root" with password "dietpi", respectively the one y # - Force interactive mode to show G_WHIP error prompts # NB: We need to write this to dietpi.txt as well to not have this overwritten on next loop. - export G_USER_INPUTS=1 + export G_INTERACTIVE=1 G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=0' /DietPi/dietpi.txt if G_WHIP_DEFAULT_ITEM='yes' G_WHIP_YESNO "[FAILED] Unknown install state/First run setup failed\n diff --git a/dietpi/dietpi-services b/dietpi/dietpi-services index 1ce13705cd..ee2b4a9d1e 100644 --- a/dietpi/dietpi-services +++ b/dietpi/dietpi-services @@ -392,8 +392,8 @@ _EOF_ # Enable ownCloud and Nextcloud maintenance mode before all services being stopped or restarted if [[ $command == 'stop' || $command == 'restart' && ! $index ]]; then - [[ -f '/var/www/owncloud/config/config.php' ]] && grep -q "'maintenance' => false," /var/www/owncloud/config/config.php && G_USER_INPUTS=0 G_ERROR_HANDLER_INFO_ONLY=1 G_RUN_CMD occ maintenance:mode --on - [[ -f '/var/www/nextcloud/config/config.php' ]] && grep -q "'maintenance' => false," /var/www/nextcloud/config/config.php && G_USER_INPUTS=0 G_ERROR_HANDLER_INFO_ONLY=1 G_RUN_CMD ncc maintenance:mode --on + [[ -f '/var/www/owncloud/config/config.php' ]] && grep -q "'maintenance' => false," /var/www/owncloud/config/config.php && G_INTERACTIVE=0 G_ERROR_HANDLER_INFO_ONLY=1 G_RUN_CMD occ maintenance:mode --on + [[ -f '/var/www/nextcloud/config/config.php' ]] && grep -q "'maintenance' => false," /var/www/nextcloud/config/config.php && G_INTERACTIVE=0 G_ERROR_HANDLER_INFO_ONLY=1 G_RUN_CMD ncc maintenance:mode --on fi @@ -411,8 +411,8 @@ _EOF_ # Disable ownCloud and Nextcloud maintenance mode after all services being started or restarted if [[ $command == 'start' || $command == 'restart' && ! $index ]]; then - [[ -f '/var/www/owncloud/config/config.php' ]] && grep -q "'maintenance' => true," /var/www/owncloud/config/config.php && G_USER_INPUTS=0 G_ERROR_HANDLER_INFO_ONLY=1 G_RUN_CMD occ maintenance:mode --off - [[ -f '/var/www/nextcloud/config/config.php' ]] && grep -q "'maintenance' => true," /var/www/nextcloud/config/config.php && G_USER_INPUTS=0 G_ERROR_HANDLER_INFO_ONLY=1 G_RUN_CMD ncc maintenance:mode --off + [[ -f '/var/www/owncloud/config/config.php' ]] && grep -q "'maintenance' => true," /var/www/owncloud/config/config.php && G_INTERACTIVE=0 G_ERROR_HANDLER_INFO_ONLY=1 G_RUN_CMD occ maintenance:mode --off + [[ -f '/var/www/nextcloud/config/config.php' ]] && grep -q "'maintenance' => true," /var/www/nextcloud/config/config.php && G_INTERACTIVE=0 G_ERROR_HANDLER_INFO_ONLY=1 G_RUN_CMD ncc maintenance:mode --off fi diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 0066e260e1..9ee130b53a 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -2370,7 +2370,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it # Disable software installation, if user input is required for automated installs Install_Disable_Requires_UserInput(){ - if (( ! $G_USER_INPUTS )); then + if (( ! $G_INTERACTIVE )); then for i in ${!aSOFTWARE_INSTALL_STATE[@]} do @@ -3077,7 +3077,7 @@ Package: *php7.3*\nPin: release *\nPin-Priority: -1' > /etc/apt/preferences.d/di elif [[ $type == 'deb' ]]; then # - Allow error on first attempt, giving APT fix a change to resolve e.g. dependencies - G_USER_INPUTS=0 G_ERROR_HANDLER_INFO_ONLY=1 G_RUN_CMD dpkg --force-hold,confdef,confold -i $file + G_INTERACTIVE=0 G_ERROR_HANDLER_INFO_ONLY=1 G_RUN_CMD dpkg --force-hold,confdef,confold -i $file (( $G_ERROR_HANDLER_EXITCODE_RETURN )) && G_DIETPI-NOTIFY 2 'Trying automated APT fix' && G_AGF elif [[ $type == 'zip' ]]; then diff --git a/dietpi/dietpi-survey b/dietpi/dietpi-survey index e439acbc0a..71efa9e38e 100644 --- a/dietpi/dietpi-survey +++ b/dietpi/dietpi-survey @@ -109,7 +109,7 @@ _EOF_ - https://github.com/MichaIng/DietPi/issues or https://dietpi.com/phpbb/viewforum.php?f=11' # Check if we have a working internet connection beforehand - if G_USER_INPUTS=0 G_ERROR_HANDLER_INFO_ONLY=1 G_CHECK_URL $SFTP_ADDR; then + if G_INTERACTIVE=0 G_ERROR_HANDLER_INFO_ONLY=1 G_CHECK_URL $SFTP_ADDR; then if (( $OPTED_IN )); then @@ -161,7 +161,7 @@ _EOF_ OPTED_IN=$(sed -n '/^[[:blank:]]*SURVEY_OPTED_IN=[01]$/{s/^[^=]*=//;p;q}' /DietPi/dietpi.txt) # Force interactive menu if no choice was done yet - elif (( $G_USER_INPUTS )); then + elif (( $G_INTERACTIVE )); then INPUT=0 diff --git a/dietpi/func/dietpi-benchmark b/dietpi/func/dietpi-benchmark index b15ecbee64..fd91163324 100644 --- a/dietpi/func/dietpi-benchmark +++ b/dietpi/func/dietpi-benchmark @@ -13,7 +13,7 @@ # /DietPi/dietpi/func/dietpi-benchmark 0 = init vars for sourcing /var/lib/dietpi/dietpi-benchmark/results # FP_BENCHFILE=/location BENCH_FILESIZE=optional_size_MiB /DietPi/dietpi/func/dietpi-benchmark 1 = Benchmark $FP_BENCHFILE filesystem read/write. # /DietPi/dietpi/func/dietpi-benchmark 2 = Run all benchmarks and upload to dietpi.com - # G_USER_INPUTS=0 /DietPi/dietpi/func/dietpi-benchmark 2 = Same as above, automated + # G_INTERACTIVE=0 /DietPi/dietpi/func/dietpi-benchmark 2 = Same as above, automated # /DietPi/dietpi/func/dietpi-benchmark 3 = iPerf server # /DietPi/dietpi/func/dietpi-benchmark 4 = iPerf client with prompt # @@ -275,7 +275,7 @@ _EOF_ SHOW_RESULTS=0 mkdir -p /var/lib/dietpi/dietpi-benchmark - if (( $G_USER_INPUTS )); then + if (( $G_INTERACTIVE )); then if G_WHIP_YESNO "$G_PROGRAM_NAME will now run the following benchmarks:\n - CPU performance\n - RootFS read/write performance\n - RAM read/write performance. The test duration will depend on hardware specs, however, most devices will not exceed 40 seconds.\n\nIf you are opted in to the DietPi-Survey, your scores will uploaded automatically. diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index f8bd31c67d..dc196b711c 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -28,15 +28,24 @@ # Interactive mode # - Affects whether G_ERROR_ and G_WHIP_ prompts are displayed or not - # - Run "export G_USER_INPUTS=0" prior to script call to force non-interactive/automated mode. - # - Run "unset G_USER_INPUTS" afterwards to return to auto detection. + # - Run "export G_INTERACTIVE=0" prior to script call to force non-interactive/automated mode. + # - Run "unset G_INTERACTIVE" afterwards to return to auto detection. # - If not set, check for STDIN availability: # OK | systemd = no STDIN # OK | Cron = no STDIN # NB | /etc/profile, ~/.profile, /etc/profile.d/, /etc/bash.bashrc, ~/.bashrc and /etc/bashrc.d/ can all be interactive since those are sourced from originating shell/bash session. - if [[ $G_USER_INPUTS != [01] ]]; then + if [[ $G_INTERACTIVE != [01] ]]; then - [[ -t 0 ]] && G_USER_INPUTS=1 || G_USER_INPUTS=0 + # Backwards compatibility to keep user scripts valid for a while + if [[ $G_USER_INPUTS == [01] ]]; then + + G_INTERACTIVE=$G_USER_INPUTS + + else + + [[ -t 0 ]] && G_INTERACTIVE=1 || G_INTERACTIVE=0 + + fi fi @@ -536,7 +545,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then #----------------------------------------------------------------------------------- # Whiptail (Whippy-da-whip-whip-whip tail!) - # - Automatically detects/processes for G_USER_INPUTS + # - Automatically detects/processes for G_INTERACTIVE #----------------------------------------------------------------------------------- # Input: # - G_WHIP_DEFAULT_ITEM | Optional, to set the default selected/menu item or input box entry @@ -784,7 +793,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then local WHIP_MESSAGE=$@ - if (( $G_USER_INPUTS )); then + if (( $G_INTERACTIVE )); then G_WHIP_INIT 0 whiptail --title "$G_PROGRAM_NAME" --msgbox "$WHIP_MESSAGE" --ok-button "$G_WHIP_BUTTON_OK_TEXT" --backtitle "$WHIP_BACKTITLE" $WHIP_SIZE_Y $WHIP_SIZE_X @@ -805,7 +814,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then local WHIP_MESSAGE=$@ - if (( $G_USER_INPUTS )); then + if (( $G_INTERACTIVE )); then G_WHIP_INIT 0 whiptail --title "$G_PROGRAM_NAME" --scrolltext --msgbox "$WHIP_MESSAGE" --ok-button "$G_WHIP_BUTTON_OK_TEXT" --backtitle "$WHIP_BACKTITLE" $WHIP_SIZE_Y $WHIP_SIZE_X @@ -827,7 +836,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then local result=1 - if (( $G_USER_INPUTS )); then + if (( $G_INTERACTIVE )); then local WHIP_MESSAGE=$@ G_WHIP_INIT 0 @@ -851,7 +860,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then local result=1 unset G_WHIP_RETURNED_VALUE # in case left from last G_WHIP - if (( $G_USER_INPUTS )); then + if (( $G_INTERACTIVE )); then local WHIP_MESSAGE=$@ G_WHIP_INIT 0 @@ -881,7 +890,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then local return_value=1 result='' - if (( $G_USER_INPUTS )); then + if (( $G_INTERACTIVE )); then local WHIP_MESSAGE=$@ G_WHIP_INIT 0 @@ -920,7 +929,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then local result=1 unset G_WHIP_RETURNED_VALUE # in case left from last G_WHIP - if (( $G_USER_INPUTS )); then + if (( $G_INTERACTIVE )); then local WHIP_MESSAGE=$@ G_WHIP_INIT 1 @@ -944,7 +953,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then local result=1 unset G_WHIP_RETURNED_VALUE # in case left from last G_WHIP - if (( $G_USER_INPUTS )); then + if (( $G_INTERACTIVE )); then local WHIP_MESSAGE=$@ G_WHIP_INIT 2 @@ -967,7 +976,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then local result=0 - if (( $G_USER_INPUTS )); then + if (( $G_INTERACTIVE )); then local log=${log:-0} # Optional yes/no prompt for viewing logs local fp_file=$1 @@ -1011,7 +1020,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then # - G_ERROR_HANDLER_COMMAND= | Command name for print out # - G_ERROR_HANDLER_EXITCODE= | Commands exit code # Optional input: - # - G_ERROR_HANDLER_NO_FAIL=1 | Always report a success, regardless of the exit code | G_USER_INPUTS=0 is not required for this + # - G_ERROR_HANDLER_NO_FAIL=1 | Always report a success, regardless of the exit code | G_INTERACTIVE=0 is not required for this # - G_ERROR_HANDLER_INFO_ONLY=1 | Only print info and retry options, no exit or bug report, sets G_ERROR_HANDLER_ONERROR_EXIT=0 automatically # - G_ERROR_HANDLER_ONERROR_EXIT=0 | Do not exit the script on error # - G_ERROR_HANDLER_RETRY=1 | Allow to retry the command. Requires loop in originating script! @@ -1077,7 +1086,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then [[ $G_PROGRAM_NAME && $G_ERROR_HANDLER_INFO_ONLY != 1 ]] && G_DIETPI-NOTIFY 2 "$print_report_to_dietpi_info" # If interactive, prompt whip message - if (( $G_USER_INPUTS )); then + if (( $G_INTERACTIVE )); then local whip_msg="${G_PROGRAM_NAME+$G_PROGRAM_NAME: }$G_ERROR_HANDLER_COMMAND - Exit code: $G_ERROR_HANDLER_EXITCODE @@ -1279,7 +1288,7 @@ $logfile_content # - $optional_cmd_inputs (eg: --no-check-certificate) # - G_CHECK_URL_TIMEOUT to override default and dietpi.txt set timeout # - G_CHECK_URL_ATTEMPTS to override default and dietpi.txt set attempts - # In case of failure and $G_USER_INPUTS=1: Prompts user to configure network + # In case of failure and $G_INTERACTIVE=1: Prompts user to configure network G_CHECK_URL(){ local url=$@ @@ -2044,7 +2053,7 @@ $logfile_content G_THREAD_COMMAND[$G_THREAD_COUNT]=$@ echo -1337 > /tmp/.G_THREAD_EXITCODE_$G_THREAD_COUNT - { { G_USER_INPUTS=0 ${G_THREAD_COMMAND[$G_THREAD_COUNT]} &> /tmp/.G_THREAD_COMMAND_$G_THREAD_COUNT; echo $? > /tmp/.G_THREAD_EXITCODE_$G_THREAD_COUNT; } & disown; } &> /dev/null + { { G_INTERACTIVE=0 ${G_THREAD_COMMAND[$G_THREAD_COUNT]} &> /tmp/.G_THREAD_COMMAND_$G_THREAD_COUNT; echo $? > /tmp/.G_THREAD_EXITCODE_$G_THREAD_COUNT; } & disown; } &> /dev/null G_DIETPI-NOTIFY 2 "G_THREAD_START_$G_THREAD_COUNT | ${G_THREAD_COMMAND[$G_THREAD_COUNT]}" @@ -2127,13 +2136,13 @@ $logfile_content G_CHECK_ROOT_USER 1 - export G_USER_INPUTS=0 + export G_INTERACTIVE=0 /DietPi/dietpi/dietpi-backup -1 G_CONFIG_INJECT 'DEV_GITBRANCH=' 'DEV_GITBRANCH=dev' /DietPi/dietpi.txt /DietPi/dietpi/dietpi-update -1 /DietPi/dietpi/dietpi-backup 1 - unset G_USER_INPUTS + unset G_INTERACTIVE } @@ -2150,7 +2159,7 @@ $logfile_content G_DEV_BENCH(){ echo 1 > /DietPi/dietpi/.dietpi-survey - G_USER_INPUTS=0 /DietPi/dietpi/func/dietpi-benchmark 2 + G_INTERACTIVE=0 /DietPi/dietpi/func/dietpi-benchmark 2 } diff --git a/dietpi/func/run_ntpd b/dietpi/func/run_ntpd index 0c35468d05..0eb25f8a46 100644 --- a/dietpi/func/run_ntpd +++ b/dietpi/func/run_ntpd @@ -32,7 +32,7 @@ Update_NTPD(){ - # Loop NTP check until sucess, or, non-G_USER_INPUTS and timeout + # Loop NTP check until sucess, or, non-G_INTERACTIVE and timeout while (( $EXIT_CODE == 1 )) do @@ -63,7 +63,7 @@ G_DIETPI-NOTIFY 2 'NTPD: Timeed out waiting for systemd-timesyncd' - if (( $G_USER_INPUTS )); then + if (( $G_INTERACTIVE )); then # - Ask G_WHIP_MENU_ARRAY=( From 03b883c87de031f386e2a189daaebb4d84316a45 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Thu, 8 Aug 2019 15:32:08 +0200 Subject: [PATCH 082/184] v6.26 + CHANGELOG | DietPi-Globals: The environment variable $G_USER_INPUTS has been renamed to $G_INTERACTIVE --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index ea1e74bcf0..ccba694b67 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,7 @@ Changes / Improvements / Optimisations: - General | Support for Debian Jessie has now been fully dropped from DietPi code. Jessie systems are moved to the "jessie-support" Git branch and will stay on v6.25. Critical bugs, if reported, may still be fixed, but DietPi-Software related issues and new features will not be handled anymore by the DietPi code team. However, everyone is free to open pull requests against the jessie-support branch: https://github.com/MichaIng/DietPi/tree/jessie-support - General | Initial support and definitions for Debian Bullseye, the new Debian testing version, have been added to DietPi code. You can now create Bullseye systems via DietPi-PREP: https://github.com/MichaIng/DietPi/issues/3009 - RPi | The haveged daemon has been replaced with rng-tools, an alternative which does not work on all devices, but has been proven to work on RPi, is default on Raspbian and uses less RAM on idle. +- DietPi-Globals | The environment variable $G_USER_INPUTS has been renamed to $G_INTERACTIVE, which describes better what it does. When setting this to "0", DietPi scripts will run non-interactively, i.e. all whiptail dialog prompts and other tasks that require manual user input are skipped. Note that this is not required when running scripts from cron jobs or systemd units, since those have no STDIN attached which makes DietPi scripts run non-interactively automatically. Scripts will stay backwards-compatible, thus respect $G_USER_INPUTS for a while, but please adjust your scripts or docs where you make use of it. Many thanks to @AtkLordOverAll for contributing this change: https://github.com/MichaIng/DietPi/pull/3041 - DietPi-Config | Audio Options: Menu has been reworked. Audio capabilities (ALSA) can be enabled and disabled as a separate option. If enabled, generic sound card auto-detection has been added to the bottom of the list for all devices. This allows the selection of generic sound devices on all SBCs, e.g. if unknown to DietPi or if our hard-coded card/device IDs are wrong due to additional attached audio hardware. - DietPi-Config | RPi: Update certain config.txt settings to match new firmware version. WiFi and Bluetooth is now disabled via related dtoverlays, which should further reduce hardware and firmware loads. - DietPi-Config | Some /etc/modprobe.d/ configs are merged to less files and mostly prefixed with "dietpi-", to allow easier differentiation between Debian/pre-image and DietPi files. From 253486634259877114d0c6bce011be8b99c8f38c Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sat, 10 Aug 2019 17:21:18 +0200 Subject: [PATCH 083/184] v6.26 (#3040) + DietPi-Software | Skip "/DietPi/dietpi/func/dietpi-set_software setpermissions" to not overwrite user custom permissions and probably other software permission modes that are more secure. Instead apply required permissions directly during individual software config step. + DietPi-Software | BaiKal: Handle reinstalls properly, replace the old instance but keep the old database/configs dir. Install and enable required PHP modules explicitly which allows us on long term to keep the default PHP install slim without additional modules installed by default. + DietPi-Software | Uninstall enhancements: Disable services before removing units, unmask in case they are not located in /etc, to have any related symlinks removed for cleaner uninstall. Add checks before removing files/dirs/users to avoid error messages. + DietPi-Software | Failsafe "cp -a source/. target/" syntax to assure target is never created as file + DietPi-Software | Always use "cp -a" instead of "cp -R" to preserve permissions + DietPi-Software | Shorten array names: aSOFTWARE_WHIP_NAME => aSOFTWARE_NAME and aSOFTWARE_WHIP_DESC => aSOFTWARE_DESC + DietPi-Software | When looping through all existing software titles, loop through aSOFTWARE_NAME, as aSOFTWARE_INSTALL_STATE can have an old saved value from .installed even if the software title has been dropped from DietPi-Software. + DietPi-Set_userdata | Skip re-setting permissions. Correct permissions are assured by "G_CHECK_FS_PERMISSION_SUPPORT" and "cp -a" and we should not overwrite any custom permissions set by either user or program installs. + DietPi-Patch | Apply encrypted PW file permissions only, instead of calling deprecated setpermissions command + DietPi-Set_software | Remove setpermissions function. Those are now applied on install for software titles individually. Aside from that we should never overwrite the whole userdata permissions which breaks user custom changes and implies possible security issues in some software cases. + DietPi-WiFi-Monitor | Spelling + General | Coding: Remove trailing free spaces and multiple empty lines --- .conf/desktop/lxde/lxde-rc.xml | 1 - .conf/dps_94/conf | 1 - .conf/dps_98/haproxy.service | 2 - CHANGELOG.txt | 1 + PREP_SYSTEM_FOR_DIETPI.sh | 2 +- config.txt | 2 +- dietpi.txt | 2 +- dietpi/dietpi-autostart | 2 +- dietpi/dietpi-cloudshell | 41 +- dietpi/dietpi-drive_manager | 2 +- dietpi/dietpi-morsecode | 1 - dietpi/dietpi-services | 4 +- dietpi/dietpi-software | 1268 +++++++++-------- dietpi/dietpi-sync | 20 +- dietpi/func/dietpi-benchmark | 1 - dietpi/func/dietpi-globals | 2 +- dietpi/func/dietpi-led_control | 1 - dietpi/func/dietpi-set_software | 183 +-- dietpi/func/dietpi-set_userdata | 29 +- dietpi/misc/dietpi-justboom | 1 - dietpi/patch_file | 3 +- dietpi/pre-patch_file | 2 +- rootfs/etc/bashrc.d/dietpi.bash | 2 +- .../lib/dietpi/dietpi-software/conf/cava.conf | 21 +- .../dietpi/services/dietpi-wifi-monitor.sh | 4 +- 25 files changed, 752 insertions(+), 846 deletions(-) diff --git a/.conf/desktop/lxde/lxde-rc.xml b/.conf/desktop/lxde/lxde-rc.xml index ae27f0b160..db537bb60b 100644 --- a/.conf/desktop/lxde/lxde-rc.xml +++ b/.conf/desktop/lxde/lxde-rc.xml @@ -671,7 +671,6 @@ # when multiple rules match a window, they will all be applied, in the # order that they appear in this list - # each element can be left out or set to 'default' to specify to not # change that attribute of the window diff --git a/.conf/dps_94/conf b/.conf/dps_94/conf index 64901177af..ec3027cc7e 100644 --- a/.conf/dps_94/conf +++ b/.conf/dps_94/conf @@ -2,7 +2,6 @@ # File Location # /etc/proftpd/proftpd.conf - # Includes DSO modules Include /etc/proftpd/modules.conf diff --git a/.conf/dps_98/haproxy.service b/.conf/dps_98/haproxy.service index 18f40a56c1..5e9f8f152d 100644 --- a/.conf/dps_98/haproxy.service +++ b/.conf/dps_98/haproxy.service @@ -18,7 +18,6 @@ EXTRAOPTS= . /lib/lsb/init-functions - haproxy_start() { start-stop-daemon --start --pidfile "$PIDFILE" \ @@ -64,7 +63,6 @@ haproxy_status() return 0 } - case "$1" in start) log_daemon_msg "Starting haproxy" "haproxy" diff --git a/CHANGELOG.txt b/CHANGELOG.txt index ccba694b67..c8e53f7d20 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,7 @@ v6.26 Changes / Improvements / Optimisations: - General | Support for Debian Jessie has now been fully dropped from DietPi code. Jessie systems are moved to the "jessie-support" Git branch and will stay on v6.25. Critical bugs, if reported, may still be fixed, but DietPi-Software related issues and new features will not be handled anymore by the DietPi code team. However, everyone is free to open pull requests against the jessie-support branch: https://github.com/MichaIng/DietPi/tree/jessie-support - General | Initial support and definitions for Debian Bullseye, the new Debian testing version, have been added to DietPi code. You can now create Bullseye systems via DietPi-PREP: https://github.com/MichaIng/DietPi/issues/3009 +- General | DietPi scripts, i.e. dietpi-software, will not overwrite you custom permissions in /mnt/dietpi_userdata anymore. Instead required permissions are now only applied for individual software titles that are being installed. Besides saving you time to re-apply custom permission, this as well enhances security in some cases where software installers/archives apply/contain stricter per-file/dir permissions. Many thanks to @JJGO and @johnvick for suggesting this enhancement: https://github.com/MichaIng/DietPi/issues/2641 - RPi | The haveged daemon has been replaced with rng-tools, an alternative which does not work on all devices, but has been proven to work on RPi, is default on Raspbian and uses less RAM on idle. - DietPi-Globals | The environment variable $G_USER_INPUTS has been renamed to $G_INTERACTIVE, which describes better what it does. When setting this to "0", DietPi scripts will run non-interactively, i.e. all whiptail dialog prompts and other tasks that require manual user input are skipped. Note that this is not required when running scripts from cron jobs or systemd units, since those have no STDIN attached which makes DietPi scripts run non-interactively automatically. Scripts will stay backwards-compatible, thus respect $G_USER_INPUTS for a while, but please adjust your scripts or docs where you make use of it. Many thanks to @AtkLordOverAll for contributing this change: https://github.com/MichaIng/DietPi/pull/3041 - DietPi-Config | Audio Options: Menu has been reworked. Audio capabilities (ALSA) can be enabled and disabled as a separate option. If enabled, generic sound card auto-detection has been added to the bottom of the list for all devices. This allows the selection of generic sound devices on all SBCs, e.g. if unknown to DietPi or if our hard-coded card/device IDs are wrong due to additional attached audio hardware. diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index c5067fae3d..8daff4ab43 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -814,7 +814,7 @@ _EOF_ local efi_packages='grub-efi-amd64' # On Buster+ enable secure boot compatibility: https://packages.debian.org/buster/grub-efi-amd64-signed (( $DISTRO_TARGET > 4 )) && efi_packages+='grub-efi-amd64-signed shim-signed' - G_AGI $efi_packages + G_AGI $efi_packages # Grub BIOS else diff --git a/config.txt b/config.txt index 4b686d706d..b8fdb337a8 100644 --- a/config.txt +++ b/config.txt @@ -7,7 +7,7 @@ #hdmi_safe=1 # Uncomment to adjust the HDMI signal strength if you have interferences, blanking, or no display. -# - Values from "0" to "11" are allowed, use values above "7" only if required, e.g. with very long HDMI cable. +# - Values from "0" to "11" are allowed, use values above "7" only if required, e.g. with very long HDMI cable. # - Default on first RPi1 is "2" and on RPi2 and above: "5" #config_hdmi_boost=5 diff --git a/dietpi.txt b/dietpi.txt index ca17106c8a..1a5c261bb9 100644 --- a/dietpi.txt +++ b/dietpi.txt @@ -20,7 +20,7 @@ AUTO_SETUP_TIMEZONE=Europe/London ##### Networking Options ##### # Enable Ethernet or WiFi adapter: 1=enable | 0=disable -# - If both Ethernet and WiFi are enabled, WiFi will take priority and Ethernet will be disabled. +# - If both Ethernet and WiFi are enabled, WiFi will take priority and Ethernet will be disabled. # - If using WiFi, please edit dietpi-wifi.txt to pre-enter credentials. AUTO_SETUP_NET_ETHERNET_ENABLED=1 AUTO_SETUP_NET_WIFI_ENABLED=0 diff --git a/dietpi/dietpi-autostart b/dietpi/dietpi-autostart index 6016eaaa51..8dab4de171 100644 --- a/dietpi/dietpi-autostart +++ b/dietpi/dietpi-autostart @@ -232,7 +232,7 @@ _EOF_ G_WHIP_MSG 'A template script has been created:\n - /var/lib/dietpi/dietpi-autostart/custom.sh\n Please edit this file and enter the required commands you wish to launch. DietPi will then execute this script during boot.' - fi + fi fi diff --git a/dietpi/dietpi-cloudshell b/dietpi/dietpi-cloudshell index 58325ac569..5ee8e8e1c4 100644 --- a/dietpi/dietpi-cloudshell +++ b/dietpi/dietpi-cloudshell @@ -17,22 +17,22 @@ # dietpi-cloudshell 2 = Run + Skip intro #//////////////////////////////////// - #Import DietPi-Globals --------------------------------------------------------------- + # Import DietPi-Globals -------------------------------------------------------------- . /DietPi/dietpi/func/dietpi-globals G_PROGRAM_NAME='DietPi-Cloudshell' G_CHECK_ROOT_USER G_INIT_ALLOW_CONCURRENT=1 G_INIT - #Import DietPi-Globals --------------------------------------------------------------- + # Import DietPi-Globals -------------------------------------------------------------- - #Grab Input (valid interger) + # Grab Input (valid interger) INPUT=0 disable_error=1 G_CHECK_VALIDINT "$1" && INPUT=$1 - #Version + # Version DIETPI_CLOUDSHELL_VERSION=9 - #/tmp/.* files used throughout this script. + # /tmp/.* files used throughout this script. FP_TEMP="/tmp/$G_PROGRAM_NAME/.tmp" BLANK_SCREEN_ACTIVE=0 @@ -40,12 +40,12 @@ BLANK_SCREEN_TIME_HOUR_START=0 BLANK_SCREEN_TIME_HOUR_END=0 - #This will only work if dietpi-cloudshell was started by autostart (login script), as the setterm power options can only be applied when the command originates from the same terminal (no redirects). + # This will only work if dietpi-cloudshell was started by autostart (login script), as the setterm power options can only be applied when the command originates from the same terminal (no redirects). RUN_BLANK_SCREEN_AT_SPECIFIC_TIME(){ local current_hour=$(date +%-H) - #Turn screen off + # Turn screen off if (( ! $BLANK_SCREEN_ACTIVE )); then if (( $BLANK_SCREEN_TIME_HOUR_START == $current_hour )); then @@ -57,7 +57,7 @@ fi - #Turn screen on + # Turn screen on elif (( $BLANK_SCREEN_TIME_HOUR_END == $current_hour )); then Disable_Screen_Blanking @@ -75,7 +75,7 @@ } - #BC does not allow for printing leading zeros. + # BC does not allow for printing leading zeros. BC_ADD_LEADING_ZERO(){ #$1 = string input @@ -98,7 +98,7 @@ } - #Converts a byte int to string, in human readable byte format. + # Converts a byte int to string, in human readable byte format. BYTE_PRINT_CONVERSION(){ local return_value=0 @@ -130,15 +130,15 @@ } - #Converts a byte int to string, in human readable bit format. - # - for network data transmission rate (LAN, WLAN, ...) + # Converts a byte int to string, in human readable bit format. + # - for network data transmission rate (LAN, WLAN, ...) # - 1MB = 8Mbit | 1Mbit = 0.125MB BIT_PRINT_CONVERSION(){ local return_value=0 local decimal_count=1 - #$1=byte value + # $1=byte value # - Kbit if (( $1 < 1000000 )); then @@ -157,12 +157,12 @@ fi - #BC - Add leading zero to start of .* string. + # BC - Add leading zero to start of .* string. return_value=$(BC_ADD_LEADING_ZERO "$return_value") echo "$return_value" - } + } Init_Term_Options(){ @@ -183,10 +183,10 @@ C_RESET='\e[0m' C_REVERSE='\e[7m' - #C_BOLD makes normal text "brighter" + # C_BOLD makes normal text "brighter" C_BOLD='\e[1m' - #Colour array + # Colour array #0 WHITE #1 RED #2 GREEN @@ -208,7 +208,7 @@ ) - #user colour + # user colour USER_COLOUR_INDEX=3 C_PERCENT_GRAPH=0 @@ -492,8 +492,7 @@ local index_start=$1 local index_end=$2 - - #df will endless hang when NFS server is down: https://github.com/MichaIng/DietPi/issues/395 + # df will endless hang when NFS server is down: https://github.com/MichaIng/DietPi/issues/395 # - So lets run it as another thread so we can kill it if it hangs. local df_failed=0 rm $FP_TEMP @@ -1396,7 +1395,6 @@ _EOF_ fi - fi done @@ -1778,7 +1776,6 @@ _EOF_ } - #///////////////////////////////////////////////////////////////////////////////////// # MAIN #///////////////////////////////////////////////////////////////////////////////////// diff --git a/dietpi/dietpi-drive_manager b/dietpi/dietpi-drive_manager index c4de3df553..946c57feb6 100644 --- a/dietpi/dietpi-drive_manager +++ b/dietpi/dietpi-drive_manager @@ -432,7 +432,7 @@ aDRIVE_ISPARTITIONTABLE ${aDRIVE_ISPARTITIONTABLE[$i]} sync mount -a - } + } Update_Menu_Drive_Index(){ diff --git a/dietpi/dietpi-morsecode b/dietpi/dietpi-morsecode index eed1fd491d..d534613128 100644 --- a/dietpi/dietpi-morsecode +++ b/dietpi/dietpi-morsecode @@ -88,7 +88,6 @@ fi } - #///////////////////////////////////////////////////////////////////////////////////// # Morse Code Data #///////////////////////////////////////////////////////////////////////////////////// diff --git a/dietpi/dietpi-services b/dietpi/dietpi-services index ee2b4a9d1e..d7bd68c4b4 100644 --- a/dietpi/dietpi-services +++ b/dietpi/dietpi-services @@ -217,7 +217,7 @@ Available services: aSERVICE_NAME+=('nxserver') # NoMachine Server aSERVICE_NAME+=('xrdp') # XRDP Server aSERVICE_NAME+=('amiberry') # DietPi Amiberry service - #aSERVICE_NAME+=('wg-quick@wg0') # WireGuard: Currently instantiated services are not supported + #aSERVICE_NAME+=('wg-quick@wg0') # WireGuard: Currently instantiated services are not supported # - DietPi aSERVICE_NAME+=('dietpi-nordvpn') # NordVPN install + client @@ -644,7 +644,7 @@ If you experience any issues with the wrapper, remove the file, reload and resta do aSERVICE_MODE[$i]=$(systemctl is-enabled "${aSERVICE_NAME[$i]}" 2> /dev/null) - Load_Process_Tool $i + Load_Process_Tool $i done diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 9ee130b53a..5f9b657b81 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -59,7 +59,7 @@ > $fp_target # Save installed states - for i in ${!aSOFTWARE_INSTALL_STATE[@]} + for i in ${!aSOFTWARE_NAME[@]} do # - Never save pending state for software (=1). Excluding temp saves. @@ -154,11 +154,11 @@ _EOF_ GLOBAL_PW='' - # - Use new "pbkdf2" function on Buster to resolve warning about deprecated key derivation used: https://github.com/MichaIng/DietPi/issues/2213 + # Use new "pbkdf2" function on Buster to resolve warning about deprecated key derivation used: https://github.com/MichaIng/DietPi/issues/2213 local pbkdf2 (( $G_DISTRO > 4 )) && pbkdf2='-iter 10000' - # - Encrypted + # Read encrypted password if [[ -f '/var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin' ]]; then GLOBAL_PW=$(openssl enc -d -a -md sha256 -aes-256-cbc $pbkdf2 -salt -pass pass:'DietPiRocks!' -in /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin) @@ -170,12 +170,11 @@ _EOF_ fi - # - 1st run automated setup or user cancelled manual password choice + # If encryption has not yet been done, do it now! elif GLOBAL_PW=$(grep -m1 '^[[:blank:]]*AUTO_SETUP_GLOBAL_PASSWORD=' /DietPi/dietpi.txt | sed 's/^[^=]*=//'); then G_CONFIG_INJECT 'AUTO_SETUP_GLOBAL_PASSWORD=' 'AUTO_SETUP_GLOBAL_PASSWORD=Password has been encrypted and secured on rootFS' /DietPi/dietpi.txt openssl enc -e -a -md sha256 -aes-256-cbc $pbkdf2 -salt -pass pass:'DietPiRocks!' -out /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin <<< $GLOBAL_PW - chmod 600 /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin [[ $GLOBAL_PW != 'dietpi' ]] && G_WHIP_MSG '[ INFO ] For security reasons your global software password has been removed from dietpi.txt and instead ecrypted and saved to: - /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin\n DietPi-Software will decrypt and use it for software installs. You can change it via: @@ -183,7 +182,11 @@ DietPi-Software will decrypt and use it for software installs. You can change it fi - # - Failsafe + # Apply safe permissions + chown root:root /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin + chmod 600 /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin + + # Failsafe if [[ ! $GLOBAL_PW ]]; then GLOBAL_PW='dietpi' @@ -317,8 +320,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=23 - aSOFTWARE_WHIP_NAME[$software_id]='LXDE' - aSOFTWARE_WHIP_DESC[$software_id]='ultra lightweight desktop' + aSOFTWARE_NAME[$software_id]='LXDE' + aSOFTWARE_DESC[$software_id]='ultra lightweight desktop' aSOFTWARE_CATEGORY_INDEX[$software_id]=0 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 @@ -328,8 +331,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=173 - aSOFTWARE_WHIP_NAME[$software_id]='LXQt' - aSOFTWARE_WHIP_DESC[$software_id]='lightweight desktop' + aSOFTWARE_NAME[$software_id]='LXQt' + aSOFTWARE_DESC[$software_id]='lightweight desktop' aSOFTWARE_CATEGORY_INDEX[$software_id]=0 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 @@ -339,8 +342,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=24 - aSOFTWARE_WHIP_NAME[$software_id]='MATE' - aSOFTWARE_WHIP_DESC[$software_id]='desktop enviroment' + aSOFTWARE_NAME[$software_id]='MATE' + aSOFTWARE_DESC[$software_id]='desktop enviroment' aSOFTWARE_CATEGORY_INDEX[$software_id]=0 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 @@ -350,8 +353,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=25 - aSOFTWARE_WHIP_NAME[$software_id]='XFCE' - aSOFTWARE_WHIP_DESC[$software_id]='lightweight desktop' + aSOFTWARE_NAME[$software_id]='XFCE' + aSOFTWARE_DESC[$software_id]='lightweight desktop' aSOFTWARE_CATEGORY_INDEX[$software_id]=0 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 @@ -361,8 +364,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=26 - aSOFTWARE_WHIP_NAME[$software_id]='GNUStep' - aSOFTWARE_WHIP_DESC[$software_id]='lightweight desktop based on OpenStep' + aSOFTWARE_NAME[$software_id]='GNUStep' + aSOFTWARE_DESC[$software_id]='lightweight desktop based on OpenStep' aSOFTWARE_CATEGORY_INDEX[$software_id]=0 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 @@ -372,8 +375,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=113 - aSOFTWARE_WHIP_NAME[$software_id]='Chromium' - aSOFTWARE_WHIP_DESC[$software_id]='web browser for desktop or autostart' + aSOFTWARE_NAME[$software_id]='Chromium' + aSOFTWARE_DESC[$software_id]='web browser for desktop or autostart' aSOFTWARE_CATEGORY_INDEX[$software_id]=0 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 @@ -386,8 +389,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=174 - aSOFTWARE_WHIP_NAME[$software_id]='GIMP' - aSOFTWARE_WHIP_DESC[$software_id]='mspaint on steroids' + aSOFTWARE_NAME[$software_id]='GIMP' + aSOFTWARE_DESC[$software_id]='mspaint on steroids' aSOFTWARE_CATEGORY_INDEX[$software_id]=0 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_XSERVERXORG[$software_id]=1 @@ -396,8 +399,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=175 - aSOFTWARE_WHIP_NAME[$software_id]='XFCE4 Power' - aSOFTWARE_WHIP_DESC[$software_id]='power manager with brightness (recommended for LXDE/LXQt)' + aSOFTWARE_NAME[$software_id]='XFCE4 Power' + aSOFTWARE_DESC[$software_id]='power manager with brightness (recommended for LXDE/LXQt)' aSOFTWARE_CATEGORY_INDEX[$software_id]=0 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_XSERVERXORG[$software_id]=1 @@ -407,8 +410,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=28 - aSOFTWARE_WHIP_NAME[$software_id]='TigerVNC Server' - aSOFTWARE_WHIP_DESC[$software_id]='desktop for remote connection' + aSOFTWARE_NAME[$software_id]='TigerVNC Server' + aSOFTWARE_DESC[$software_id]='desktop for remote connection' aSOFTWARE_CATEGORY_INDEX[$software_id]=1 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_DESKTOP[$software_id]=1 @@ -417,8 +420,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=29 - aSOFTWARE_WHIP_NAME[$software_id]='XRDP' - aSOFTWARE_WHIP_DESC[$software_id]='remote desktop protocol (rdp) server' + aSOFTWARE_NAME[$software_id]='XRDP' + aSOFTWARE_DESC[$software_id]='remote desktop protocol (rdp) server' aSOFTWARE_CATEGORY_INDEX[$software_id]=1 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_DESKTOP[$software_id]=1 @@ -427,8 +430,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=30 - aSOFTWARE_WHIP_NAME[$software_id]='NoMachine' - aSOFTWARE_WHIP_DESC[$software_id]='multi-platform server and client access' + aSOFTWARE_NAME[$software_id]='NoMachine' + aSOFTWARE_DESC[$software_id]='multi-platform server and client access' aSOFTWARE_CATEGORY_INDEX[$software_id]=1 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_DESKTOP[$software_id]=1 @@ -437,8 +440,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=120 - aSOFTWARE_WHIP_NAME[$software_id]='RealVNC Server' - aSOFTWARE_WHIP_DESC[$software_id]='desktop for remote connection' + aSOFTWARE_NAME[$software_id]='RealVNC Server' + aSOFTWARE_DESC[$software_id]='desktop for remote connection' aSOFTWARE_CATEGORY_INDEX[$software_id]=1 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_DESKTOP[$software_id]=1 @@ -456,8 +459,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=31 - aSOFTWARE_WHIP_NAME[$software_id]='Kodi' - aSOFTWARE_WHIP_DESC[$software_id]='the media centre for linux' + aSOFTWARE_NAME[$software_id]='Kodi' + aSOFTWARE_DESC[$software_id]='the media centre for linux' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 @@ -481,8 +484,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=32 - aSOFTWARE_WHIP_NAME[$software_id]='ympd' - aSOFTWARE_WHIP_DESC[$software_id]='lightweight web interface music player for mpd' + aSOFTWARE_NAME[$software_id]='ympd' + aSOFTWARE_DESC[$software_id]='lightweight web interface music player for mpd' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 @@ -491,8 +494,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=148 - aSOFTWARE_WHIP_NAME[$software_id]='myMPD' - aSOFTWARE_WHIP_DESC[$software_id]='fork of ympd with improved features' + aSOFTWARE_NAME[$software_id]='myMPD' + aSOFTWARE_DESC[$software_id]='fork of ympd with improved features' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 @@ -502,8 +505,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=119 - aSOFTWARE_WHIP_NAME[$software_id]='CAVA' - aSOFTWARE_WHIP_DESC[$software_id]='optional: console audio vis for mpd' + aSOFTWARE_NAME[$software_id]='CAVA' + aSOFTWARE_DESC[$software_id]='optional: console audio vis for mpd' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 @@ -512,8 +515,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=33 - aSOFTWARE_WHIP_NAME[$software_id]='Airsonic' - aSOFTWARE_WHIP_DESC[$software_id]='web interface media streaming server' + aSOFTWARE_NAME[$software_id]='Airsonic' + aSOFTWARE_DESC[$software_id]='web interface media streaming server' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 @@ -528,8 +531,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=34 - aSOFTWARE_WHIP_NAME[$software_id]='Subsonic' - aSOFTWARE_WHIP_DESC[$software_id]='web interface media streaming server' + aSOFTWARE_NAME[$software_id]='Subsonic' + aSOFTWARE_DESC[$software_id]='web interface media streaming server' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 @@ -544,8 +547,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=35 - aSOFTWARE_WHIP_NAME[$software_id]='Logitech Media Server' - aSOFTWARE_WHIP_DESC[$software_id]='aka LMS, Squeezebox Server' + aSOFTWARE_NAME[$software_id]='Logitech Media Server' + aSOFTWARE_DESC[$software_id]='aka LMS, Squeezebox Server' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1009#p1009' @@ -553,8 +556,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=36 - aSOFTWARE_WHIP_NAME[$software_id]='SqueezeLite' - aSOFTWARE_WHIP_DESC[$software_id]='audio player for lms & squeezebox' + aSOFTWARE_NAME[$software_id]='SqueezeLite' + aSOFTWARE_DESC[$software_id]='audio player for lms & squeezebox' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 @@ -563,8 +566,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=37 - aSOFTWARE_WHIP_NAME[$software_id]='Shairport Sync' - aSOFTWARE_WHIP_DESC[$software_id]='airplay audio player with multiroom sync' + aSOFTWARE_NAME[$software_id]='Shairport Sync' + aSOFTWARE_DESC[$software_id]='airplay audio player with multiroom sync' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 @@ -573,8 +576,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=39 - aSOFTWARE_WHIP_NAME[$software_id]='ReadyMedia' - aSOFTWARE_WHIP_DESC[$software_id]='(MiniDLNA) media streaming server (dlna, upnp)' + aSOFTWARE_NAME[$software_id]='ReadyMedia' + aSOFTWARE_DESC[$software_id]='(MiniDLNA) media streaming server (dlna, upnp)' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=49#p49' @@ -582,8 +585,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=40 - aSOFTWARE_WHIP_NAME[$software_id]='Ampache' - aSOFTWARE_WHIP_DESC[$software_id]='web interface media streaming server' + aSOFTWARE_NAME[$software_id]='Ampache' + aSOFTWARE_DESC[$software_id]='web interface media streaming server' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 @@ -597,8 +600,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=41 - aSOFTWARE_WHIP_NAME[$software_id]='Emby Server' - aSOFTWARE_WHIP_DESC[$software_id]='web interface media streaming server' + aSOFTWARE_NAME[$software_id]='Emby Server' + aSOFTWARE_DESC[$software_id]='web interface media streaming server' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1789#p1789' @@ -609,8 +612,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=42 - aSOFTWARE_WHIP_NAME[$software_id]='Plex Media Server' - aSOFTWARE_WHIP_DESC[$software_id]='web interface media streaming server' + aSOFTWARE_NAME[$software_id]='Plex Media Server' + aSOFTWARE_DESC[$software_id]='web interface media streaming server' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1949#p1949' @@ -621,8 +624,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=43 - aSOFTWARE_WHIP_NAME[$software_id]='Murmur' - aSOFTWARE_WHIP_DESC[$software_id]='mumble voip server' + aSOFTWARE_NAME[$software_id]='Murmur' + aSOFTWARE_DESC[$software_id]='mumble voip server' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1691#p1691' @@ -630,8 +633,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=118 - aSOFTWARE_WHIP_NAME[$software_id]='Mopidy' - aSOFTWARE_WHIP_DESC[$software_id]='web interface music & radio player' + aSOFTWARE_NAME[$software_id]='Mopidy' + aSOFTWARE_DESC[$software_id]='web interface music & radio player' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=3611#p3611' @@ -640,8 +643,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=121 - aSOFTWARE_WHIP_NAME[$software_id]='Roon Bridge' - aSOFTWARE_WHIP_DESC[$software_id]='Turns device into Roon capable audio player' + aSOFTWARE_NAME[$software_id]='Roon Bridge' + aSOFTWARE_DESC[$software_id]='Turns device into Roon capable audio player' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=4153#p4153' @@ -653,8 +656,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=124 - aSOFTWARE_WHIP_NAME[$software_id]='NAA daemon' - aSOFTWARE_WHIP_DESC[$software_id]='signalyst network audio adaptor (naa)' + aSOFTWARE_NAME[$software_id]='NAA daemon' + aSOFTWARE_DESC[$software_id]='signalyst network audio adaptor (naa)' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=4294#p4294' @@ -663,8 +666,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=128 - aSOFTWARE_WHIP_NAME[$software_id]='MPD' - aSOFTWARE_WHIP_DESC[$software_id]='music player daemon' + aSOFTWARE_NAME[$software_id]='MPD' + aSOFTWARE_DESC[$software_id]='music player daemon' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 #aSOFTWARE_ONLINEDOC_URL[$software_id] @@ -673,8 +676,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=129 - aSOFTWARE_WHIP_NAME[$software_id]='O!MPD' - aSOFTWARE_WHIP_DESC[$software_id]='feature-rich, web interface audio player for mpd' + aSOFTWARE_NAME[$software_id]='O!MPD' + aSOFTWARE_DESC[$software_id]='feature-rich, web interface audio player for mpd' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=5171#p5171' @@ -686,8 +689,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=135 - aSOFTWARE_WHIP_NAME[$software_id]='IceCast' - aSOFTWARE_WHIP_DESC[$software_id]='Shoutcast streaming server (+DarkIce)' + aSOFTWARE_NAME[$software_id]='IceCast' + aSOFTWARE_DESC[$software_id]='Shoutcast streaming server (+DarkIce)' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 @@ -699,8 +702,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=141 - aSOFTWARE_WHIP_NAME[$software_id]='Spotify Connect Web' - aSOFTWARE_WHIP_DESC[$software_id]='web interface for spotify premium' + aSOFTWARE_NAME[$software_id]='Spotify Connect Web' + aSOFTWARE_DESC[$software_id]='web interface for spotify premium' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=7013#p7013' @@ -718,8 +721,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=143 - aSOFTWARE_WHIP_NAME[$software_id]='Koel' - aSOFTWARE_WHIP_DESC[$software_id]='web interface audio streamer' + aSOFTWARE_NAME[$software_id]='Koel' + aSOFTWARE_DESC[$software_id]='web interface audio streamer' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=7305#p7305' @@ -734,8 +737,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=146 - aSOFTWARE_WHIP_NAME[$software_id]='Tautulli' - aSOFTWARE_WHIP_DESC[$software_id]='monitoring and tracking tool for Plex' + aSOFTWARE_NAME[$software_id]='Tautulli' + aSOFTWARE_DESC[$software_id]='monitoring and tracking tool for Plex' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=7463#p7463' @@ -744,8 +747,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=154 - aSOFTWARE_WHIP_NAME[$software_id]='Roon Server' - aSOFTWARE_WHIP_DESC[$software_id]='Roon capable audio player and core' + aSOFTWARE_NAME[$software_id]='Roon Server' + aSOFTWARE_DESC[$software_id]='Roon capable audio player and core' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=7966#p7966' @@ -764,8 +767,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=159 - aSOFTWARE_WHIP_NAME[$software_id]='Allo' - aSOFTWARE_WHIP_DESC[$software_id]='web interface' + aSOFTWARE_NAME[$software_id]='Allo' + aSOFTWARE_DESC[$software_id]='web interface' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=-1 #aSOFTWARE_ONLINEDOC_URL[$software_id] @@ -777,8 +780,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=160 - aSOFTWARE_WHIP_NAME[$software_id]='Allo_update' - aSOFTWARE_WHIP_DESC[$software_id]='quick reinstall/update web only' + aSOFTWARE_NAME[$software_id]='Allo_update' + aSOFTWARE_DESC[$software_id]='quick reinstall/update web only' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=-1 #aSOFTWARE_ONLINEDOC_URL[$software_id] @@ -786,8 +789,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=163 - aSOFTWARE_WHIP_NAME[$software_id]='GMediaRender' - aSOFTWARE_WHIP_DESC[$software_id]='DLNA audio render/endpoint' + aSOFTWARE_NAME[$software_id]='GMediaRender' + aSOFTWARE_DESC[$software_id]='DLNA audio render/endpoint' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 @@ -796,8 +799,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=167 - aSOFTWARE_WHIP_NAME[$software_id]='Raspotify' - aSOFTWARE_WHIP_DESC[$software_id]='spotify connect client' + aSOFTWARE_NAME[$software_id]='Raspotify' + aSOFTWARE_DESC[$software_id]='spotify connect client' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 @@ -810,8 +813,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=80 - aSOFTWARE_WHIP_NAME[$software_id]='Ubooquity' - aSOFTWARE_WHIP_DESC[$software_id]='a free home server for your comics and ebooks library' + aSOFTWARE_NAME[$software_id]='Ubooquity' + aSOFTWARE_DESC[$software_id]='a free home server for your comics and ebooks library' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_JAVA_JRE_JDK[$software_id]=1 @@ -820,8 +823,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=86 - aSOFTWARE_WHIP_NAME[$software_id]='Roon Extension Manager' - aSOFTWARE_WHIP_DESC[$software_id]='Manage extensions from within Roon' + aSOFTWARE_NAME[$software_id]='Roon Extension Manager' + aSOFTWARE_DESC[$software_id]='Manage extensions from within Roon' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_GIT[$software_id]=1 @@ -832,8 +835,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=44 - aSOFTWARE_WHIP_NAME[$software_id]='Transmission' - aSOFTWARE_WHIP_DESC[$software_id]='bittorrent server with web interface (c)' + aSOFTWARE_NAME[$software_id]='Transmission' + aSOFTWARE_DESC[$software_id]='bittorrent server with web interface (c)' aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=46#p46' @@ -841,8 +844,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=45 - aSOFTWARE_WHIP_NAME[$software_id]='Deluge' - aSOFTWARE_WHIP_DESC[$software_id]='bittorrent server with web interface (python)' + aSOFTWARE_NAME[$software_id]='Deluge' + aSOFTWARE_DESC[$software_id]='bittorrent server with web interface (python)' aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=61#p61' @@ -850,8 +853,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=46 - aSOFTWARE_WHIP_NAME[$software_id]='qBitTorrent' - aSOFTWARE_WHIP_DESC[$software_id]='bittorrent server with web interface (c++)' + aSOFTWARE_NAME[$software_id]='qBitTorrent' + aSOFTWARE_DESC[$software_id]='bittorrent server with web interface (c++)' aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=2272#p2272' @@ -859,8 +862,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=107 - aSOFTWARE_WHIP_NAME[$software_id]='rTorrent' - aSOFTWARE_WHIP_DESC[$software_id]='bittorrent server with rutorrent web interface' + aSOFTWARE_NAME[$software_id]='rTorrent' + aSOFTWARE_DESC[$software_id]='bittorrent server with rutorrent web interface' aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_WEBSERVER[$software_id]=1 @@ -870,8 +873,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=116 - aSOFTWARE_WHIP_NAME[$software_id]='Medusa' - aSOFTWARE_WHIP_DESC[$software_id]='Automatic Video Library Manager for TV Shows' + aSOFTWARE_NAME[$software_id]='Medusa' + aSOFTWARE_DESC[$software_id]='Automatic Video Library Manager for TV Shows' aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=3327#p3327' @@ -879,8 +882,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=132 - aSOFTWARE_WHIP_NAME[$software_id]='Aria2' - aSOFTWARE_WHIP_DESC[$software_id]='download manager with web interface' + aSOFTWARE_NAME[$software_id]='Aria2' + aSOFTWARE_DESC[$software_id]='download manager with web interface' aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=6177#p6177' @@ -891,8 +894,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=139 - aSOFTWARE_WHIP_NAME[$software_id]='SABnzbd' - aSOFTWARE_WHIP_DESC[$software_id]='nzb download manager' + aSOFTWARE_NAME[$software_id]='SABnzbd' + aSOFTWARE_DESC[$software_id]='nzb download manager' aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=6747#p6747' @@ -902,8 +905,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=142 - aSOFTWARE_WHIP_NAME[$software_id]='CouchPotato' - aSOFTWARE_WHIP_DESC[$software_id]='automatically download movies' + aSOFTWARE_NAME[$software_id]='CouchPotato' + aSOFTWARE_DESC[$software_id]='automatically download movies' aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=6747#p6747' @@ -913,8 +916,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=144 - aSOFTWARE_WHIP_NAME[$software_id]='Sonarr' - aSOFTWARE_WHIP_DESC[$software_id]='automatically download TV shows' + aSOFTWARE_NAME[$software_id]='Sonarr' + aSOFTWARE_DESC[$software_id]='automatically download TV shows' aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=7455#p7455' @@ -923,8 +926,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=145 - aSOFTWARE_WHIP_NAME[$software_id]='Radarr' - aSOFTWARE_WHIP_DESC[$software_id]='automatically download movies' + aSOFTWARE_NAME[$software_id]='Radarr' + aSOFTWARE_DESC[$software_id]='automatically download movies' aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=7457#p7457' @@ -933,8 +936,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=106 - aSOFTWARE_WHIP_NAME[$software_id]='Lidarr' - aSOFTWARE_WHIP_DESC[$software_id]='automatically download music' + aSOFTWARE_NAME[$software_id]='Lidarr' + aSOFTWARE_DESC[$software_id]='automatically download music' aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=13580#p13580' @@ -943,8 +946,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=147 - aSOFTWARE_WHIP_NAME[$software_id]='Jackett' - aSOFTWARE_WHIP_DESC[$software_id]='API support for your torrent trackers' + aSOFTWARE_NAME[$software_id]='Jackett' + aSOFTWARE_DESC[$software_id]='API support for your torrent trackers' aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=7503#p7503' @@ -952,8 +955,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=149 - aSOFTWARE_WHIP_NAME[$software_id]='NZBget' - aSOFTWARE_WHIP_DESC[$software_id]='nzb download manager' + aSOFTWARE_NAME[$software_id]='NZBget' + aSOFTWARE_DESC[$software_id]='nzb download manager' aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=7575#p7575' @@ -961,8 +964,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=155 - aSOFTWARE_WHIP_NAME[$software_id]='HTPC Manager' - aSOFTWARE_WHIP_DESC[$software_id]='manage your HTPC from anywhere' + aSOFTWARE_NAME[$software_id]='HTPC Manager' + aSOFTWARE_DESC[$software_id]='manage your HTPC from anywhere' aSOFTWARE_REQUIRES_GIT[$software_id]=1 aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=0 @@ -972,8 +975,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=47 - aSOFTWARE_WHIP_NAME[$software_id]='ownCloud' - aSOFTWARE_WHIP_DESC[$software_id]='File sync, sharing and collaboration platform' + aSOFTWARE_NAME[$software_id]='ownCloud' + aSOFTWARE_DESC[$software_id]='File sync, sharing and collaboration platform' aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_WEBSERVER[$software_id]=1 @@ -991,8 +994,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=114 - aSOFTWARE_WHIP_NAME[$software_id]='Nextcloud' - aSOFTWARE_WHIP_DESC[$software_id]='File sync, sharing and collaboration platform' + aSOFTWARE_NAME[$software_id]='Nextcloud' + aSOFTWARE_DESC[$software_id]='File sync, sharing and collaboration platform' aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_WEBSERVER[$software_id]=1 @@ -1003,8 +1006,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=168 - aSOFTWARE_WHIP_NAME[$software_id]='Nextcloud Talk' - aSOFTWARE_WHIP_DESC[$software_id]='Video calls with configured coTURN server' + aSOFTWARE_NAME[$software_id]='Nextcloud Talk' + aSOFTWARE_DESC[$software_id]='Video calls with configured coTURN server' aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=0 # Currently requires manual domain and coTURN server port input. @@ -1015,8 +1018,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=48 - aSOFTWARE_WHIP_NAME[$software_id]='Pydio' - aSOFTWARE_WHIP_DESC[$software_id]='feature-rich backup and sync server' + aSOFTWARE_NAME[$software_id]='Pydio' + aSOFTWARE_DESC[$software_id]='feature-rich backup and sync server' aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_WEBSERVER[$software_id]=1 @@ -1027,8 +1030,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=111 - aSOFTWARE_WHIP_NAME[$software_id]='UrBackup Server' - aSOFTWARE_WHIP_DESC[$software_id]='full system backup server' + aSOFTWARE_NAME[$software_id]='UrBackup Server' + aSOFTWARE_DESC[$software_id]='full system backup server' aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=65#p65' @@ -1039,8 +1042,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=49 - aSOFTWARE_WHIP_NAME[$software_id]='Gogs' - aSOFTWARE_WHIP_DESC[$software_id]='personal github server with web interface' + aSOFTWARE_NAME[$software_id]='Gogs' + aSOFTWARE_DESC[$software_id]='personal github server with web interface' aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_GIT[$software_id]=1 @@ -1053,8 +1056,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=50 - aSOFTWARE_WHIP_NAME[$software_id]='Syncthing' - aSOFTWARE_WHIP_DESC[$software_id]='backup and sync server with web interface' + aSOFTWARE_NAME[$software_id]='Syncthing' + aSOFTWARE_DESC[$software_id]='backup and sync server with web interface' aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=2363#p2363' @@ -1062,8 +1065,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=134 - aSOFTWARE_WHIP_NAME[$software_id]='Tonido' - aSOFTWARE_WHIP_DESC[$software_id]='lightweight cloud based backup system' + aSOFTWARE_NAME[$software_id]='Tonido' + aSOFTWARE_DESC[$software_id]='lightweight cloud based backup system' aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=6476#p6476' @@ -1075,16 +1078,16 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=158 - aSOFTWARE_WHIP_NAME[$software_id]='Minio' - aSOFTWARE_WHIP_DESC[$software_id]='S3 compatible distributed object server' + aSOFTWARE_NAME[$software_id]='Minio' + aSOFTWARE_DESC[$software_id]='S3 compatible distributed object server' aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=0 #------------------ software_id=161 - aSOFTWARE_WHIP_NAME[$software_id]='FuguHub' - aSOFTWARE_WHIP_DESC[$software_id]='Lightweight WebDAV cloud (eg: dropbox) with a CMS' + aSOFTWARE_NAME[$software_id]='FuguHub' + aSOFTWARE_DESC[$software_id]='Lightweight WebDAV cloud (eg: dropbox) with a CMS' aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=0 @@ -1094,8 +1097,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=165 - aSOFTWARE_WHIP_NAME[$software_id]='Gitea' - aSOFTWARE_WHIP_DESC[$software_id]='Git with a cup of tea' + aSOFTWARE_NAME[$software_id]='Gitea' + aSOFTWARE_DESC[$software_id]='Git with a cup of tea' aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_GIT[$software_id]=1 @@ -1106,8 +1109,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=108 - aSOFTWARE_WHIP_NAME[$software_id]='AmiBerry' - aSOFTWARE_WHIP_DESC[$software_id]='amiga emulator' + aSOFTWARE_NAME[$software_id]='AmiBerry' + aSOFTWARE_DESC[$software_id]='amiga emulator' aSOFTWARE_CATEGORY_INDEX[$software_id]=5 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 @@ -1129,8 +1132,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=51 - aSOFTWARE_WHIP_NAME[$software_id]='OpenTyrian' - aSOFTWARE_WHIP_DESC[$software_id]='a classic retro game, addictive' + aSOFTWARE_NAME[$software_id]='OpenTyrian' + aSOFTWARE_DESC[$software_id]='a classic retro game, addictive' aSOFTWARE_CATEGORY_INDEX[$software_id]=5 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 @@ -1151,8 +1154,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=112 - aSOFTWARE_WHIP_NAME[$software_id]='DXX-Rebirth' - aSOFTWARE_WHIP_DESC[$software_id]='Descent 1/2' + aSOFTWARE_NAME[$software_id]='DXX-Rebirth' + aSOFTWARE_DESC[$software_id]='Descent 1/2' aSOFTWARE_CATEGORY_INDEX[$software_id]=5 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 @@ -1169,8 +1172,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=52 - aSOFTWARE_WHIP_NAME[$software_id]='Cuberite' - aSOFTWARE_WHIP_DESC[$software_id]='minecraft server with web interface (c++)' + aSOFTWARE_NAME[$software_id]='Cuberite' + aSOFTWARE_DESC[$software_id]='minecraft server with web interface (c++)' aSOFTWARE_CATEGORY_INDEX[$software_id]=5 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=2068#p2068' @@ -1181,8 +1184,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=53 - aSOFTWARE_WHIP_NAME[$software_id]='MineOS' - aSOFTWARE_WHIP_DESC[$software_id]='minecraft servers with web interface (java)' + aSOFTWARE_NAME[$software_id]='MineOS' + aSOFTWARE_DESC[$software_id]='minecraft servers with web interface (java)' aSOFTWARE_CATEGORY_INDEX[$software_id]=5 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_BUILDESSENTIAL[$software_id]=1 @@ -1194,8 +1197,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=156 - aSOFTWARE_WHIP_NAME[$software_id]='Steam' - aSOFTWARE_WHIP_DESC[$software_id]='client' + aSOFTWARE_NAME[$software_id]='Steam' + aSOFTWARE_DESC[$software_id]='client' aSOFTWARE_CATEGORY_INDEX[$software_id]=5 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=8016#p8016' @@ -1215,8 +1218,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=164 - aSOFTWARE_WHIP_NAME[$software_id]='Nukkit' - aSOFTWARE_WHIP_DESC[$software_id]='A nuclear-powered server for Minecraft Pocket Edition' + aSOFTWARE_NAME[$software_id]='Nukkit' + aSOFTWARE_DESC[$software_id]='A nuclear-powered server for Minecraft Pocket Edition' aSOFTWARE_CATEGORY_INDEX[$software_id]=5 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_JAVA_JRE_JDK[$software_id]=1 @@ -1226,8 +1229,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=54 - aSOFTWARE_WHIP_NAME[$software_id]='phpBB' - aSOFTWARE_WHIP_DESC[$software_id]='bulletin board forum software' + aSOFTWARE_NAME[$software_id]='phpBB' + aSOFTWARE_DESC[$software_id]='bulletin board forum software' aSOFTWARE_CATEGORY_INDEX[$software_id]=6 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_WEBSERVER[$software_id]=1 @@ -1246,8 +1249,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=55 - aSOFTWARE_WHIP_NAME[$software_id]='Wordpress' - aSOFTWARE_WHIP_DESC[$software_id]='website blog and publishing platform' + aSOFTWARE_NAME[$software_id]='Wordpress' + aSOFTWARE_DESC[$software_id]='website blog and publishing platform' aSOFTWARE_CATEGORY_INDEX[$software_id]=6 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_WEBSERVER[$software_id]=1 @@ -1258,8 +1261,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=38 - aSOFTWARE_WHIP_NAME[$software_id]='FreshRSS' - aSOFTWARE_WHIP_DESC[$software_id]='self-hosted RSS feed aggregator' + aSOFTWARE_NAME[$software_id]='FreshRSS' + aSOFTWARE_DESC[$software_id]='self-hosted RSS feed aggregator' aSOFTWARE_CATEGORY_INDEX[$software_id]=6 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_WEBSERVER[$software_id]=1 @@ -1270,8 +1273,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=56 - aSOFTWARE_WHIP_NAME[$software_id]='Image Gallery' - aSOFTWARE_WHIP_DESC[$software_id]='website to host / browse your images' + aSOFTWARE_NAME[$software_id]='Image Gallery' + aSOFTWARE_DESC[$software_id]='website to host / browse your images' aSOFTWARE_CATEGORY_INDEX[$software_id]=6 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_WEBSERVER[$software_id]=1 @@ -1281,8 +1284,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=57 - aSOFTWARE_WHIP_NAME[$software_id]='BaiKal' - aSOFTWARE_WHIP_DESC[$software_id]='lightweight caldav + carddav server' + aSOFTWARE_NAME[$software_id]='BaiKal' + aSOFTWARE_DESC[$software_id]='lightweight caldav + carddav server' aSOFTWARE_CATEGORY_INDEX[$software_id]=6 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_WEBSERVER[$software_id]=1 @@ -1293,8 +1296,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=58 - aSOFTWARE_WHIP_NAME[$software_id]='OpenBazaar' - aSOFTWARE_WHIP_DESC[$software_id]='decentralised peer to peer bitcoin market' + aSOFTWARE_NAME[$software_id]='OpenBazaar' + aSOFTWARE_DESC[$software_id]='decentralised peer to peer bitcoin market' aSOFTWARE_CATEGORY_INDEX[$software_id]=6 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_BUILDESSENTIAL[$software_id]=1 @@ -1305,8 +1308,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=133 - aSOFTWARE_WHIP_NAME[$software_id]='YaCy' - aSOFTWARE_WHIP_DESC[$software_id]='decentralised open source search engine' + aSOFTWARE_NAME[$software_id]='YaCy' + aSOFTWARE_DESC[$software_id]='decentralised open source search engine' aSOFTWARE_CATEGORY_INDEX[$software_id]=6 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_JAVA_JRE_JDK[$software_id]=1 @@ -1315,8 +1318,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=2 - aSOFTWARE_WHIP_NAME[$software_id]='Folding@Home' - aSOFTWARE_WHIP_DESC[$software_id]='distributed disease research project' + aSOFTWARE_NAME[$software_id]='Folding@Home' + aSOFTWARE_DESC[$software_id]='distributed disease research project' aSOFTWARE_CATEGORY_INDEX[$software_id]=20 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=13704#p13704' @@ -1335,8 +1338,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=59 - aSOFTWARE_WHIP_NAME[$software_id]='RPi Cam Control' - aSOFTWARE_WHIP_DESC[$software_id]='web interface & controls for your rpi camera' + aSOFTWARE_NAME[$software_id]='RPi Cam Control' + aSOFTWARE_DESC[$software_id]='web interface & controls for your rpi camera' aSOFTWARE_CATEGORY_INDEX[$software_id]=7 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_WEBSERVER[$software_id]=1 @@ -1354,8 +1357,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=136 - aSOFTWARE_WHIP_NAME[$software_id]='MotionEye' - aSOFTWARE_WHIP_DESC[$software_id]='web interface & surveillance for your camera' + aSOFTWARE_NAME[$software_id]='MotionEye' + aSOFTWARE_DESC[$software_id]='web interface & surveillance for your camera' aSOFTWARE_CATEGORY_INDEX[$software_id]=7 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=6610#p6610' @@ -1368,8 +1371,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=60 - aSOFTWARE_WHIP_NAME[$software_id]='WiFi Hotspot' - aSOFTWARE_WHIP_DESC[$software_id]='turn your device into a wifi hotspot' + aSOFTWARE_NAME[$software_id]='WiFi Hotspot' + aSOFTWARE_DESC[$software_id]='turn your device into a wifi hotspot' aSOFTWARE_CATEGORY_INDEX[$software_id]=8 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1207#p1207' @@ -1380,8 +1383,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=61 - aSOFTWARE_WHIP_NAME[$software_id]='Tor Hotspot' - aSOFTWARE_WHIP_DESC[$software_id]='optional: route hotspot traffic through tor' + aSOFTWARE_NAME[$software_id]='Tor Hotspot' + aSOFTWARE_DESC[$software_id]='optional: route hotspot traffic through tor' aSOFTWARE_CATEGORY_INDEX[$software_id]=8 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1529#p1529' @@ -1395,8 +1398,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=62 - aSOFTWARE_WHIP_NAME[$software_id]='DietPi-Cloudshell' - aSOFTWARE_WHIP_DESC[$software_id]='system stats displayed on lcd/panel' + aSOFTWARE_NAME[$software_id]='DietPi-Cloudshell' + aSOFTWARE_DESC[$software_id]='system stats displayed on lcd/panel' aSOFTWARE_CATEGORY_INDEX[$software_id]=9 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=204#p204' @@ -1404,8 +1407,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=63 - aSOFTWARE_WHIP_NAME[$software_id]='LinuxDash' - aSOFTWARE_WHIP_DESC[$software_id]='web interface system stats' + aSOFTWARE_NAME[$software_id]='LinuxDash' + aSOFTWARE_DESC[$software_id]='web interface system stats' aSOFTWARE_CATEGORY_INDEX[$software_id]=9 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_WEBSERVER[$software_id]=1 @@ -1415,8 +1418,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=64 - aSOFTWARE_WHIP_NAME[$software_id]='PhpSysInfo' - aSOFTWARE_WHIP_DESC[$software_id]='web interface system stats' + aSOFTWARE_NAME[$software_id]='PhpSysInfo' + aSOFTWARE_DESC[$software_id]='web interface system stats' aSOFTWARE_CATEGORY_INDEX[$software_id]=9 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_WEBSERVER[$software_id]=1 @@ -1426,8 +1429,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=65 - aSOFTWARE_WHIP_NAME[$software_id]='NetData' - aSOFTWARE_WHIP_DESC[$software_id]='real-time performance monitoring' + aSOFTWARE_NAME[$software_id]='NetData' + aSOFTWARE_DESC[$software_id]='real-time performance monitoring' aSOFTWARE_CATEGORY_INDEX[$software_id]=9 aSOFTWARE_TYPE[$software_id]=0 # Node.js only required for our custom package @@ -1437,8 +1440,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=66 - aSOFTWARE_WHIP_NAME[$software_id]='RPi-Monitor' - aSOFTWARE_WHIP_DESC[$software_id]='web interface system stats' + aSOFTWARE_NAME[$software_id]='RPi-Monitor' + aSOFTWARE_DESC[$software_id]='web interface system stats' aSOFTWARE_CATEGORY_INDEX[$software_id]=9 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1503#p1503' @@ -1454,8 +1457,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=115 - aSOFTWARE_WHIP_NAME[$software_id]='Webmin' - aSOFTWARE_WHIP_DESC[$software_id]='web interface system management' + aSOFTWARE_NAME[$software_id]='Webmin' + aSOFTWARE_DESC[$software_id]='web interface system management' aSOFTWARE_CATEGORY_INDEX[$software_id]=9 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=3047#p3047' @@ -1464,8 +1467,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=162 - aSOFTWARE_WHIP_NAME[$software_id]='Docker' - aSOFTWARE_WHIP_DESC[$software_id]='Build, ship, and run distributed applications' + aSOFTWARE_NAME[$software_id]='Docker' + aSOFTWARE_DESC[$software_id]='Build, ship, and run distributed applications' aSOFTWARE_CATEGORY_INDEX[$software_id]=9 aSOFTWARE_TYPE[$software_id]=0 @@ -1473,8 +1476,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=67 - aSOFTWARE_WHIP_NAME[$software_id]='NoIp' - aSOFTWARE_WHIP_DESC[$software_id]='url website address for your device' + aSOFTWARE_NAME[$software_id]='NoIp' + aSOFTWARE_DESC[$software_id]='url website address for your device' aSOFTWARE_CATEGORY_INDEX[$software_id]=10 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=58#p58' @@ -1482,8 +1485,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=68 - aSOFTWARE_WHIP_NAME[$software_id]='Remot3.it' - aSOFTWARE_WHIP_DESC[$software_id]='(Weaved) access your device over the internet' + aSOFTWARE_NAME[$software_id]='Remot3.it' + aSOFTWARE_DESC[$software_id]='(Weaved) access your device over the internet' aSOFTWARE_CATEGORY_INDEX[$software_id]=10 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=188#p188' @@ -1491,8 +1494,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=138 - aSOFTWARE_WHIP_NAME[$software_id]='VirtualHere' - aSOFTWARE_WHIP_DESC[$software_id]='server: share USB devices over the network' + aSOFTWARE_NAME[$software_id]='VirtualHere' + aSOFTWARE_DESC[$software_id]='server: share USB devices over the network' aSOFTWARE_CATEGORY_INDEX[$software_id]=10 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=6709#p6709' @@ -1503,8 +1506,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=69 - aSOFTWARE_WHIP_NAME[$software_id]='RPi.GPIO' - aSOFTWARE_WHIP_DESC[$software_id]='gpio interface library for rpi (python)' + aSOFTWARE_NAME[$software_id]='RPi.GPIO' + aSOFTWARE_DESC[$software_id]='gpio interface library for rpi (python)' aSOFTWARE_CATEGORY_INDEX[$software_id]=11 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1065#p1065' @@ -1520,8 +1523,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=70 - aSOFTWARE_WHIP_NAME[$software_id]='WiringPi' - aSOFTWARE_WHIP_DESC[$software_id]='gpio interface library (c)' + aSOFTWARE_NAME[$software_id]='WiringPi' + aSOFTWARE_DESC[$software_id]='gpio interface library (c)' aSOFTWARE_CATEGORY_INDEX[$software_id]=11 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_BUILDESSENTIAL[$software_id]=1 @@ -1541,8 +1544,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=71 - aSOFTWARE_WHIP_NAME[$software_id]='WebIOPi' - aSOFTWARE_WHIP_DESC[$software_id]='web interface to control rpi.gpio' + aSOFTWARE_NAME[$software_id]='WebIOPi' + aSOFTWARE_DESC[$software_id]='web interface to control rpi.gpio' aSOFTWARE_CATEGORY_INDEX[$software_id]=11 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_BUILDESSENTIAL[$software_id]=1 @@ -1559,8 +1562,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=72 - aSOFTWARE_WHIP_NAME[$software_id]='I2C' - aSOFTWARE_WHIP_DESC[$software_id]='enables support for i2c based hardware' + aSOFTWARE_NAME[$software_id]='I2C' + aSOFTWARE_DESC[$software_id]='enables support for i2c based hardware' aSOFTWARE_CATEGORY_INDEX[$software_id]=11 aSOFTWARE_TYPE[$software_id]=0 @@ -1575,8 +1578,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=100 - aSOFTWARE_WHIP_NAME[$software_id]='PiJuice' - aSOFTWARE_WHIP_DESC[$software_id]='pisupply ups' + aSOFTWARE_NAME[$software_id]='PiJuice' + aSOFTWARE_DESC[$software_id]='pisupply ups' aSOFTWARE_CATEGORY_INDEX[$software_id]=11 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=10740#p10740' @@ -1592,8 +1595,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=122 - aSOFTWARE_WHIP_NAME[$software_id]='Node-Red' - aSOFTWARE_WHIP_DESC[$software_id]='tool for wiring devices, APIs and online services' + aSOFTWARE_NAME[$software_id]='Node-Red' + aSOFTWARE_DESC[$software_id]='tool for wiring devices, APIs and online services' aSOFTWARE_CATEGORY_INDEX[$software_id]=11 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=4292#p4292' @@ -1603,8 +1606,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=123 - aSOFTWARE_WHIP_NAME[$software_id]='Mosquitto ' - aSOFTWARE_WHIP_DESC[$software_id]='MQTT messaging broker' + aSOFTWARE_NAME[$software_id]='Mosquitto ' + aSOFTWARE_DESC[$software_id]='MQTT messaging broker' aSOFTWARE_CATEGORY_INDEX[$software_id]=11 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=4293#p4293' @@ -1612,8 +1615,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=131 - aSOFTWARE_WHIP_NAME[$software_id]='Blynk Server' - aSOFTWARE_WHIP_DESC[$software_id]='msg controller for blynk mobile app and sbcs' + aSOFTWARE_NAME[$software_id]='Blynk Server' + aSOFTWARE_DESC[$software_id]='msg controller for blynk mobile app and sbcs' aSOFTWARE_CATEGORY_INDEX[$software_id]=11 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=5901#p5901' @@ -1624,8 +1627,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=166 - aSOFTWARE_WHIP_NAME[$software_id]='PI-SPC' - aSOFTWARE_WHIP_DESC[$software_id]='audiophonics pi-spc power control module' + aSOFTWARE_NAME[$software_id]='PI-SPC' + aSOFTWARE_DESC[$software_id]='audiophonics pi-spc power control module' aSOFTWARE_CATEGORY_INDEX[$software_id]=11 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=9359#p9359' @@ -1641,8 +1644,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=169 - aSOFTWARE_WHIP_NAME[$software_id]='Google AIY' - aSOFTWARE_WHIP_DESC[$software_id]='voice kit' + aSOFTWARE_NAME[$software_id]='Google AIY' + aSOFTWARE_DESC[$software_id]='voice kit' aSOFTWARE_CATEGORY_INDEX[$software_id]=11 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 @@ -1660,8 +1663,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=176 - aSOFTWARE_WHIP_NAME[$software_id]='Mycroft AI' - aSOFTWARE_WHIP_DESC[$software_id]='Open Source Voice Assistant' + aSOFTWARE_NAME[$software_id]='Mycroft AI' + aSOFTWARE_DESC[$software_id]='Open Source Voice Assistant' aSOFTWARE_CATEGORY_INDEX[$software_id]=11 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=18562#p18562' @@ -1672,8 +1675,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=74 - aSOFTWARE_WHIP_NAME[$software_id]='InfluxDB' - aSOFTWARE_WHIP_DESC[$software_id]='time-series database' + aSOFTWARE_NAME[$software_id]='InfluxDB' + aSOFTWARE_DESC[$software_id]='time-series database' aSOFTWARE_CATEGORY_INDEX[$software_id]=11 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=12523#p12523' @@ -1681,8 +1684,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=77 - aSOFTWARE_WHIP_NAME[$software_id]='Grafana' - aSOFTWARE_WHIP_DESC[$software_id]='platform for analytics and monitoring' + aSOFTWARE_NAME[$software_id]='Grafana' + aSOFTWARE_DESC[$software_id]='platform for analytics and monitoring' aSOFTWARE_CATEGORY_INDEX[$software_id]=11 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=12524#p12524' @@ -1691,8 +1694,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=73 - aSOFTWARE_WHIP_NAME[$software_id]='Fail2Ban' - aSOFTWARE_WHIP_DESC[$software_id]='prevents brute-force attacks with ip ban' + aSOFTWARE_NAME[$software_id]='Fail2Ban' + aSOFTWARE_DESC[$software_id]='prevents brute-force attacks with ip ban' aSOFTWARE_CATEGORY_INDEX[$software_id]=12 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=452#p452' @@ -1702,8 +1705,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=75 - aSOFTWARE_WHIP_NAME[$software_id]='LASP' - aSOFTWARE_WHIP_DESC[$software_id]='apache2 | sqlite | php' + aSOFTWARE_NAME[$software_id]='LASP' + aSOFTWARE_DESC[$software_id]='apache2 | sqlite | php' aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=52#p52' @@ -1711,8 +1714,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=76 - aSOFTWARE_WHIP_NAME[$software_id]='LAMP' - aSOFTWARE_WHIP_DESC[$software_id]='apache2 | mariadb | php' + aSOFTWARE_NAME[$software_id]='LAMP' + aSOFTWARE_DESC[$software_id]='apache2 | mariadb | php' aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=52#p52' @@ -1720,8 +1723,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=78 - aSOFTWARE_WHIP_NAME[$software_id]='LESP' - aSOFTWARE_WHIP_DESC[$software_id]='nginx | sqlite | php' + aSOFTWARE_NAME[$software_id]='LESP' + aSOFTWARE_DESC[$software_id]='nginx | sqlite | php' aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=53#p53' @@ -1729,8 +1732,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=79 - aSOFTWARE_WHIP_NAME[$software_id]='LEMP' - aSOFTWARE_WHIP_DESC[$software_id]='nginx | mariadb | php' + aSOFTWARE_NAME[$software_id]='LEMP' + aSOFTWARE_DESC[$software_id]='nginx | mariadb | php' aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=53#p53' @@ -1738,8 +1741,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=81 - aSOFTWARE_WHIP_NAME[$software_id]='LLSP' - aSOFTWARE_WHIP_DESC[$software_id]='lighttpd | sqlite | php' + aSOFTWARE_NAME[$software_id]='LLSP' + aSOFTWARE_DESC[$software_id]='lighttpd | sqlite | php' aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1335#p1335' @@ -1747,8 +1750,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=82 - aSOFTWARE_WHIP_NAME[$software_id]='LLMP' - aSOFTWARE_WHIP_DESC[$software_id]='lighttpd | mariadb | php' + aSOFTWARE_NAME[$software_id]='LLMP' + aSOFTWARE_DESC[$software_id]='lighttpd | mariadb | php' aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1335#p1335' @@ -1756,8 +1759,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=83 - aSOFTWARE_WHIP_NAME[$software_id]='Apache2' - aSOFTWARE_WHIP_DESC[$software_id]='webserver' + aSOFTWARE_NAME[$software_id]='Apache2' + aSOFTWARE_DESC[$software_id]='webserver' aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=-1 aSOFTWARE_REQUIRES_PHP[$software_id]=1 @@ -1766,8 +1769,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=84 - aSOFTWARE_WHIP_NAME[$software_id]='Lighttpd' - aSOFTWARE_WHIP_DESC[$software_id]='webserver' + aSOFTWARE_NAME[$software_id]='Lighttpd' + aSOFTWARE_DESC[$software_id]='webserver' aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=-1 aSOFTWARE_REQUIRES_PHP[$software_id]=1 @@ -1776,8 +1779,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=85 - aSOFTWARE_WHIP_NAME[$software_id]='Nginx' - aSOFTWARE_WHIP_DESC[$software_id]='webserver' + aSOFTWARE_NAME[$software_id]='Nginx' + aSOFTWARE_DESC[$software_id]='webserver' aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=-1 aSOFTWARE_REQUIRES_PHP[$software_id]=1 @@ -1786,8 +1789,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=87 - aSOFTWARE_WHIP_NAME[$software_id]='SQLite' - aSOFTWARE_WHIP_DESC[$software_id]='database' + aSOFTWARE_NAME[$software_id]='SQLite' + aSOFTWARE_DESC[$software_id]='database' aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=-1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1335#p1335' @@ -1795,8 +1798,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=88 - aSOFTWARE_WHIP_NAME[$software_id]='MariaDB' - aSOFTWARE_WHIP_DESC[$software_id]='database' + aSOFTWARE_NAME[$software_id]='MariaDB' + aSOFTWARE_DESC[$software_id]='database' aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=-1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1335#p1335' @@ -1804,8 +1807,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=89 - aSOFTWARE_WHIP_NAME[$software_id]='PHP' - aSOFTWARE_WHIP_DESC[$software_id]='Hypertext Preprocessor for dynamic web content' + aSOFTWARE_NAME[$software_id]='PHP' + aSOFTWARE_DESC[$software_id]='Hypertext Preprocessor for dynamic web content' aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=-1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1335#p1335' @@ -1813,8 +1816,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=90 - aSOFTWARE_WHIP_NAME[$software_id]='phpMyAdmin' - aSOFTWARE_WHIP_DESC[$software_id]='optional mysql admin tools' + aSOFTWARE_NAME[$software_id]='phpMyAdmin' + aSOFTWARE_DESC[$software_id]='optional mysql admin tools' aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_WEBSERVER[$software_id]=1 @@ -1832,16 +1835,16 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=91 - aSOFTWARE_WHIP_NAME[$software_id]='Redis' - aSOFTWARE_WHIP_DESC[$software_id]='optional non-sql database store' + aSOFTWARE_NAME[$software_id]='Redis' + aSOFTWARE_DESC[$software_id]='optional non-sql database store' aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=0 #------------------ software_id=92 - aSOFTWARE_WHIP_NAME[$software_id]='CertBot' - aSOFTWARE_WHIP_DESC[$software_id]='free, ssl cert install allowing https://' + aSOFTWARE_NAME[$software_id]='CertBot' + aSOFTWARE_DESC[$software_id]='free, ssl cert install allowing https://' aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1061#p1062' @@ -1849,8 +1852,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=125 - aSOFTWARE_WHIP_NAME[$software_id]='Tomcat8' - aSOFTWARE_WHIP_DESC[$software_id]='apache tomcat server' + aSOFTWARE_NAME[$software_id]='Tomcat8' + aSOFTWARE_DESC[$software_id]='apache tomcat server' aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=4316#p4316' @@ -1863,8 +1866,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=93 - aSOFTWARE_WHIP_NAME[$software_id]='Pi-hole' - aSOFTWARE_WHIP_DESC[$software_id]='block adverts for any device on your network' + aSOFTWARE_NAME[$software_id]='Pi-hole' + aSOFTWARE_DESC[$software_id]='block adverts for any device on your network' aSOFTWARE_CATEGORY_INDEX[$software_id]=14 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_GIT[$software_id]=1 @@ -1878,8 +1881,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=94 - aSOFTWARE_WHIP_NAME[$software_id]='ProFTP' - aSOFTWARE_WHIP_DESC[$software_id]='lightweight ftp server' + aSOFTWARE_NAME[$software_id]='ProFTP' + aSOFTWARE_DESC[$software_id]='lightweight ftp server' aSOFTWARE_CATEGORY_INDEX[$software_id]=15 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=55#p55' @@ -1887,8 +1890,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=95 - aSOFTWARE_WHIP_NAME[$software_id]='vsFTPD' - aSOFTWARE_WHIP_DESC[$software_id]='alternative ftp server' + aSOFTWARE_NAME[$software_id]='vsFTPD' + aSOFTWARE_DESC[$software_id]='alternative ftp server' aSOFTWARE_CATEGORY_INDEX[$software_id]=15 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=2820#p2820' @@ -1896,8 +1899,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=96 - aSOFTWARE_WHIP_NAME[$software_id]='Samba' - aSOFTWARE_WHIP_DESC[$software_id]='feature-rich file server' + aSOFTWARE_NAME[$software_id]='Samba' + aSOFTWARE_DESC[$software_id]='feature-rich file server' aSOFTWARE_CATEGORY_INDEX[$software_id]=15 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=56#p56' @@ -1905,8 +1908,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=109 - aSOFTWARE_WHIP_NAME[$software_id]='NFS' - aSOFTWARE_WHIP_DESC[$software_id]='network file system server' + aSOFTWARE_NAME[$software_id]='NFS' + aSOFTWARE_DESC[$software_id]='network file system server' aSOFTWARE_CATEGORY_INDEX[$software_id]=15 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=2821#p2821' @@ -1917,8 +1920,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=97 - aSOFTWARE_WHIP_NAME[$software_id]='OpenVPN' - aSOFTWARE_WHIP_DESC[$software_id]='vpn server' + aSOFTWARE_NAME[$software_id]='OpenVPN' + aSOFTWARE_DESC[$software_id]='vpn server' aSOFTWARE_CATEGORY_INDEX[$software_id]=16 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=613#p613' @@ -1926,8 +1929,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=117 - aSOFTWARE_WHIP_NAME[$software_id]='PiVPN' - aSOFTWARE_WHIP_DESC[$software_id]='openvpn server install & management tool' + aSOFTWARE_NAME[$software_id]='PiVPN' + aSOFTWARE_DESC[$software_id]='openvpn server install & management tool' aSOFTWARE_CATEGORY_INDEX[$software_id]=16 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_RSYSLOG[$software_id]=1 @@ -1938,8 +1941,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=171 - aSOFTWARE_WHIP_NAME[$software_id]='DietPi-NordVPN' - aSOFTWARE_WHIP_DESC[$software_id]='vpn client with connection gui' + aSOFTWARE_NAME[$software_id]='DietPi-NordVPN' + aSOFTWARE_DESC[$software_id]='vpn client with connection gui' aSOFTWARE_CATEGORY_INDEX[$software_id]=16 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p15975#p15975' @@ -1947,8 +1950,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=172 - aSOFTWARE_WHIP_NAME[$software_id]='WireGuard' - aSOFTWARE_WHIP_DESC[$software_id]='an extremely simple yet fast and modern VPN' + aSOFTWARE_NAME[$software_id]='WireGuard' + aSOFTWARE_DESC[$software_id]='an extremely simple yet fast and modern VPN' aSOFTWARE_CATEGORY_INDEX[$software_id]=16 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=16308#p16308' @@ -1977,8 +1980,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=98 - aSOFTWARE_WHIP_NAME[$software_id]='HaProxy' - aSOFTWARE_WHIP_DESC[$software_id]='high performance tcp/http load balancer' + aSOFTWARE_NAME[$software_id]='HaProxy' + aSOFTWARE_DESC[$software_id]='high performance tcp/http load balancer' aSOFTWARE_CATEGORY_INDEX[$software_id]=17 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_BUILDESSENTIAL[$software_id]=1 @@ -1988,8 +1991,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=99 - aSOFTWARE_WHIP_NAME[$software_id]='EmonPi' - aSOFTWARE_WHIP_DESC[$software_id]='energy usage addon board with web interface' + aSOFTWARE_NAME[$software_id]='EmonPi' + aSOFTWARE_DESC[$software_id]='energy usage addon board with web interface' aSOFTWARE_CATEGORY_INDEX[$software_id]=18 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1525#p1525' @@ -2005,8 +2008,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=157 - aSOFTWARE_WHIP_NAME[$software_id]='Home Assistant' - aSOFTWARE_WHIP_DESC[$software_id]='open-source home automation platform' + aSOFTWARE_NAME[$software_id]='Home Assistant' + aSOFTWARE_DESC[$software_id]='open-source home automation platform' aSOFTWARE_CATEGORY_INDEX[$software_id]=18 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_GIT[$software_id]=1 @@ -2021,8 +2024,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=137 - aSOFTWARE_WHIP_NAME[$software_id]='CloudPrint' - aSOFTWARE_WHIP_DESC[$software_id]='print server for google cloud print' + aSOFTWARE_NAME[$software_id]='CloudPrint' + aSOFTWARE_DESC[$software_id]='print server for google cloud print' aSOFTWARE_CATEGORY_INDEX[$software_id]=19 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=6630#p6630' @@ -2031,8 +2034,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=153 - aSOFTWARE_WHIP_NAME[$software_id]='OctoPrint' - aSOFTWARE_WHIP_DESC[$software_id]='web interface for controlling 3d printers' + aSOFTWARE_NAME[$software_id]='OctoPrint' + aSOFTWARE_DESC[$software_id]='web interface for controlling 3d printers' aSOFTWARE_CATEGORY_INDEX[$software_id]=19 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=7958#p7958' @@ -2047,8 +2050,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=0 - aSOFTWARE_WHIP_NAME[$software_id]='OpenSSH Client' - aSOFTWARE_WHIP_DESC[$software_id]='' + aSOFTWARE_NAME[$software_id]='OpenSSH Client' + aSOFTWARE_DESC[$software_id]='' aSOFTWARE_CATEGORY_INDEX[$software_id]=0 aSOFTWARE_TYPE[$software_id]=1 #------------------ @@ -2057,16 +2060,16 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=1 - aSOFTWARE_WHIP_NAME[$software_id]='Samba Client' - aSOFTWARE_WHIP_DESC[$software_id]='access network shares' + aSOFTWARE_NAME[$software_id]='Samba Client' + aSOFTWARE_DESC[$software_id]='access network shares' aSOFTWARE_CATEGORY_INDEX[$software_id]=1 aSOFTWARE_TYPE[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]=' dietpi-config > Network Options: NAS/Misc' #------------------ software_id=110 - aSOFTWARE_WHIP_NAME[$software_id]='NFS Client' - aSOFTWARE_WHIP_DESC[$software_id]='network file system client' + aSOFTWARE_NAME[$software_id]='NFS Client' + aSOFTWARE_DESC[$software_id]='network file system client' aSOFTWARE_CATEGORY_INDEX[$software_id]=1 aSOFTWARE_TYPE[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]=' dietpi-config > Network Options: NAS/Misc' @@ -2076,15 +2079,15 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=3 - aSOFTWARE_WHIP_NAME[$software_id]='MC' - aSOFTWARE_WHIP_DESC[$software_id]='midnight commander, powerful file manager' + aSOFTWARE_NAME[$software_id]='MC' + aSOFTWARE_DESC[$software_id]='midnight commander, powerful file manager' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=1 #------------------ software_id=4 - aSOFTWARE_WHIP_NAME[$software_id]='ViFM' - aSOFTWARE_WHIP_DESC[$software_id]='file manager with vi bindings' + aSOFTWARE_NAME[$software_id]='ViFM' + aSOFTWARE_DESC[$software_id]='file manager with vi bindings' aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=1 #------------------ @@ -2093,23 +2096,23 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=5 - aSOFTWARE_WHIP_NAME[$software_id]='ALSA' - aSOFTWARE_WHIP_DESC[$software_id]='linux sound system' + aSOFTWARE_NAME[$software_id]='ALSA' + aSOFTWARE_DESC[$software_id]='linux sound system' aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=1 #------------------ software_id=6 - aSOFTWARE_WHIP_NAME[$software_id]='Xserver' - aSOFTWARE_WHIP_DESC[$software_id]='linux display system' + aSOFTWARE_NAME[$software_id]='Xserver' + aSOFTWARE_DESC[$software_id]='linux display system' aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=1 #------------------ software_id=151 - aSOFTWARE_WHIP_NAME[$software_id]='Nvidia' - aSOFTWARE_WHIP_DESC[$software_id]='display driver' + aSOFTWARE_NAME[$software_id]='Nvidia' + aSOFTWARE_DESC[$software_id]='display driver' aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=1 aSOFTWARE_REQUIRES_XSERVERXORG[$software_id]=1 @@ -2127,36 +2130,36 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=7 - aSOFTWARE_WHIP_NAME[$software_id]='FFmpeg' - aSOFTWARE_WHIP_DESC[$software_id]='audio & visual libary' + aSOFTWARE_NAME[$software_id]='FFmpeg' + aSOFTWARE_DESC[$software_id]='audio & visual libary' aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=1 #------------------ software_id=8 - aSOFTWARE_WHIP_NAME[$software_id]='Java' - aSOFTWARE_WHIP_DESC[$software_id]='OpenJDK + JRE libary' + aSOFTWARE_NAME[$software_id]='Java' + aSOFTWARE_DESC[$software_id]='OpenJDK + JRE libary' aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=1 #------------------ software_id=9 - aSOFTWARE_WHIP_NAME[$software_id]='Node.js' - aSOFTWARE_WHIP_DESC[$software_id]='javascript runtime' + aSOFTWARE_NAME[$software_id]='Node.js' + aSOFTWARE_DESC[$software_id]='javascript runtime' aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=1 #------------------ software_id=130 - aSOFTWARE_WHIP_NAME[$software_id]='Python Pip' - aSOFTWARE_WHIP_DESC[$software_id]='python pip package installer' + aSOFTWARE_NAME[$software_id]='Python Pip' + aSOFTWARE_DESC[$software_id]='python pip package installer' aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=1 #------------------ software_id=140 - aSOFTWARE_WHIP_NAME[$software_id]='SDL2' - aSOFTWARE_WHIP_DESC[$software_id]='simple direct layer 2' + aSOFTWARE_NAME[$software_id]='SDL2' + aSOFTWARE_DESC[$software_id]='simple direct layer 2' aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=1 SOFTWARE_REQUIRES_XSERVERXORG[$software_id]=1 @@ -2166,15 +2169,15 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=150 - aSOFTWARE_WHIP_NAME[$software_id]='Mono' - aSOFTWARE_WHIP_DESC[$software_id]='runtime libraries and repo' + aSOFTWARE_NAME[$software_id]='Mono' + aSOFTWARE_DESC[$software_id]='runtime libraries and repo' aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=1 #------------------ software_id=126 - aSOFTWARE_WHIP_NAME[$software_id]='LibSSL1.0.0' - aSOFTWARE_WHIP_DESC[$software_id]='backwards compatibility (stretch+)' + aSOFTWARE_NAME[$software_id]='LibSSL1.0.0' + aSOFTWARE_DESC[$software_id]='backwards compatibility (stretch+)' aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=1 @@ -2182,50 +2185,50 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=10 - aSOFTWARE_WHIP_NAME[$software_id]='iftop' - aSOFTWARE_WHIP_DESC[$software_id]='displays bandwidth usage information' + aSOFTWARE_NAME[$software_id]='iftop' + aSOFTWARE_DESC[$software_id]='displays bandwidth usage information' aSOFTWARE_CATEGORY_INDEX[$software_id]=5 aSOFTWARE_TYPE[$software_id]=1 #------------------ software_id=11 - aSOFTWARE_WHIP_NAME[$software_id]='IPTraf' - aSOFTWARE_WHIP_DESC[$software_id]='interactive colorful ip lan monitor' + aSOFTWARE_NAME[$software_id]='IPTraf' + aSOFTWARE_DESC[$software_id]='interactive colorful ip lan monitor' aSOFTWARE_CATEGORY_INDEX[$software_id]=5 aSOFTWARE_TYPE[$software_id]=1 #------------------ software_id=12 - aSOFTWARE_WHIP_NAME[$software_id]='Iperf' - aSOFTWARE_WHIP_DESC[$software_id]='internet protocol bandwidth measuring tool' + aSOFTWARE_NAME[$software_id]='Iperf' + aSOFTWARE_DESC[$software_id]='internet protocol bandwidth measuring tool' aSOFTWARE_CATEGORY_INDEX[$software_id]=5 aSOFTWARE_TYPE[$software_id]=1 #------------------ software_id=13 - aSOFTWARE_WHIP_NAME[$software_id]='MTR-Tiny' - aSOFTWARE_WHIP_DESC[$software_id]='full screen ncurses traceroute tool' + aSOFTWARE_NAME[$software_id]='MTR-Tiny' + aSOFTWARE_DESC[$software_id]='full screen ncurses traceroute tool' aSOFTWARE_CATEGORY_INDEX[$software_id]=5 aSOFTWARE_TYPE[$software_id]=1 #------------------ software_id=14 - aSOFTWARE_WHIP_NAME[$software_id]='nLoad' - aSOFTWARE_WHIP_DESC[$software_id]='realtime console network usage monitor' + aSOFTWARE_NAME[$software_id]='nLoad' + aSOFTWARE_DESC[$software_id]='realtime console network usage monitor' aSOFTWARE_CATEGORY_INDEX[$software_id]=5 aSOFTWARE_TYPE[$software_id]=1 #------------------ software_id=15 - aSOFTWARE_WHIP_NAME[$software_id]='tcpdump' - aSOFTWARE_WHIP_DESC[$software_id]='command-line network traffic analyzer' + aSOFTWARE_NAME[$software_id]='tcpdump' + aSOFTWARE_DESC[$software_id]='command-line network traffic analyzer' aSOFTWARE_CATEGORY_INDEX[$software_id]=5 aSOFTWARE_TYPE[$software_id]=1 #------------------ software_id=152 - aSOFTWARE_WHIP_NAME[$software_id]='Avahi-Daemon' - aSOFTWARE_WHIP_DESC[$software_id]='hostname broadcast (mac, pc bonjour)' + aSOFTWARE_NAME[$software_id]='Avahi-Daemon' + aSOFTWARE_DESC[$software_id]='hostname broadcast (mac, pc bonjour)' aSOFTWARE_CATEGORY_INDEX[$software_id]=5 aSOFTWARE_TYPE[$software_id]=1 @@ -2233,22 +2236,22 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=16 - aSOFTWARE_WHIP_NAME[$software_id]='Build-Essentials' - aSOFTWARE_WHIP_DESC[$software_id]='common packages for compile' + aSOFTWARE_NAME[$software_id]='Build-Essentials' + aSOFTWARE_DESC[$software_id]='common packages for compile' aSOFTWARE_CATEGORY_INDEX[$software_id]=6 aSOFTWARE_TYPE[$software_id]=1 #------------------ software_id=17 - aSOFTWARE_WHIP_NAME[$software_id]='Git Client' - aSOFTWARE_WHIP_DESC[$software_id]='git clone etc' + aSOFTWARE_NAME[$software_id]='Git Client' + aSOFTWARE_DESC[$software_id]='git clone etc' aSOFTWARE_CATEGORY_INDEX[$software_id]=6 aSOFTWARE_TYPE[$software_id]=1 #------------------ software_id=170 - aSOFTWARE_WHIP_NAME[$software_id]='Unrar' - aSOFTWARE_WHIP_DESC[$software_id]='unarchiver for .rar files' + aSOFTWARE_NAME[$software_id]='Unrar' + aSOFTWARE_DESC[$software_id]='unarchiver for .rar files' aSOFTWARE_CATEGORY_INDEX[$software_id]=6 aSOFTWARE_TYPE[$software_id]=1 #------------------ @@ -2257,36 +2260,36 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=18 - aSOFTWARE_WHIP_NAME[$software_id]='Emacs' - aSOFTWARE_WHIP_DESC[$software_id]='gnu emacs editor' + aSOFTWARE_NAME[$software_id]='Emacs' + aSOFTWARE_DESC[$software_id]='gnu emacs editor' aSOFTWARE_CATEGORY_INDEX[$software_id]=7 aSOFTWARE_TYPE[$software_id]=1 #------------------ software_id=19 - aSOFTWARE_WHIP_NAME[$software_id]='Jed' - aSOFTWARE_WHIP_DESC[$software_id]='editor for programmers' + aSOFTWARE_NAME[$software_id]='Jed' + aSOFTWARE_DESC[$software_id]='editor for programmers' aSOFTWARE_CATEGORY_INDEX[$software_id]=7 aSOFTWARE_TYPE[$software_id]=1 #------------------ software_id=20 - aSOFTWARE_WHIP_NAME[$software_id]='Vim' - aSOFTWARE_WHIP_DESC[$software_id]='vi enhanced text editor' + aSOFTWARE_NAME[$software_id]='Vim' + aSOFTWARE_DESC[$software_id]='vi enhanced text editor' aSOFTWARE_CATEGORY_INDEX[$software_id]=7 aSOFTWARE_TYPE[$software_id]=1 #------------------ software_id=21 - aSOFTWARE_WHIP_NAME[$software_id]='Vim-Tiny' - aSOFTWARE_WHIP_DESC[$software_id]='compact release of vim' + aSOFTWARE_NAME[$software_id]='Vim-Tiny' + aSOFTWARE_DESC[$software_id]='compact release of vim' aSOFTWARE_CATEGORY_INDEX[$software_id]=7 aSOFTWARE_TYPE[$software_id]=1 #------------------ software_id=127 - aSOFTWARE_WHIP_NAME[$software_id]='NeoVim' - aSOFTWARE_WHIP_DESC[$software_id]='heavily refactored vim fork' + aSOFTWARE_NAME[$software_id]='NeoVim' + aSOFTWARE_DESC[$software_id]='heavily refactored vim fork' aSOFTWARE_CATEGORY_INDEX[$software_id]=7 aSOFTWARE_TYPE[$software_id]=1 #------------------ @@ -2295,8 +2298,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=22 - aSOFTWARE_WHIP_NAME[$software_id]='QuiteRSS' - aSOFTWARE_WHIP_DESC[$software_id]='cross-platform, free rss reader' + aSOFTWARE_NAME[$software_id]='QuiteRSS' + aSOFTWARE_DESC[$software_id]='cross-platform, free rss reader' aSOFTWARE_CATEGORY_INDEX[$software_id]=8 aSOFTWARE_TYPE[$software_id]=1 aSOFTWARE_REQUIRES_DESKTOP[$software_id]=1 @@ -2307,24 +2310,24 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=101 - aSOFTWARE_WHIP_NAME[$software_id]='Log Rotate' - aSOFTWARE_WHIP_DESC[$software_id]='rotates log files' + aSOFTWARE_NAME[$software_id]='Log Rotate' + aSOFTWARE_DESC[$software_id]='rotates log files' aSOFTWARE_CATEGORY_INDEX[$software_id]=0 aSOFTWARE_TYPE[$software_id]=-1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=68#p68' #------------------ software_id=102 - aSOFTWARE_WHIP_NAME[$software_id]='Rsyslog' - aSOFTWARE_WHIP_DESC[$software_id]='system logging' + aSOFTWARE_NAME[$software_id]='Rsyslog' + aSOFTWARE_DESC[$software_id]='system logging' aSOFTWARE_CATEGORY_INDEX[$software_id]=0 aSOFTWARE_TYPE[$software_id]=-1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=68#p68' #------------------ software_id=103 - aSOFTWARE_WHIP_NAME[$software_id]='DietPi-RAMlog' - aSOFTWARE_WHIP_DESC[$software_id]='minimal, optimised logging' + aSOFTWARE_NAME[$software_id]='DietPi-RAMlog' + aSOFTWARE_DESC[$software_id]='minimal, optimised logging' aSOFTWARE_CATEGORY_INDEX[$software_id]=0 aSOFTWARE_TYPE[$software_id]=-1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=68#p68' @@ -2335,16 +2338,16 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=104 - aSOFTWARE_WHIP_NAME[$software_id]='Dropbear' - aSOFTWARE_WHIP_DESC[$software_id]='lightweight ssh server' + aSOFTWARE_NAME[$software_id]='Dropbear' + aSOFTWARE_DESC[$software_id]='lightweight ssh server' aSOFTWARE_CATEGORY_INDEX[$software_id]=0 aSOFTWARE_TYPE[$software_id]=-1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=62#p62' #------------------ software_id=105 - aSOFTWARE_WHIP_NAME[$software_id]='OpenSSH Server' - aSOFTWARE_WHIP_DESC[$software_id]='feature rich ssh server' + aSOFTWARE_NAME[$software_id]='OpenSSH Server' + aSOFTWARE_DESC[$software_id]='feature rich ssh server' aSOFTWARE_CATEGORY_INDEX[$software_id]=0 aSOFTWARE_TYPE[$software_id]=-1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=63#p63' @@ -2352,7 +2355,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- # Init install state for defined software - for i in ${!aSOFTWARE_WHIP_NAME[@]} + for i in ${!aSOFTWARE_NAME[@]} do aSOFTWARE_INSTALL_STATE[$i]=0 @@ -2372,15 +2375,15 @@ DietPi-Software will decrypt and use it for software installs. You can change it if (( ! $G_INTERACTIVE )); then - for i in ${!aSOFTWARE_INSTALL_STATE[@]} + for i in ${!aSOFTWARE_NAME[@]} do if (( ${aSOFTWARE_INSTALL_STATE[$i]} == 1 && ${aSOFTWARE_REQUIRES_USERINPUT[$i]:-0} == 1 )); then # - Disable aSOFTWARE_INSTALL_STATE[$i]=0 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$i]}: Install requires user input and cannot be automated." - G_DIETPI-NOTIFY 1 "${aSOFTWARE_WHIP_NAME[$i]}: Please run 'dietpi-software' to install manually." + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$i]}: Install requires user input and cannot be automated." + G_DIETPI-NOTIFY 1 "${aSOFTWARE_NAME[$i]}: Please run 'dietpi-software' to install manually." fi @@ -2408,7 +2411,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it ${aSOFTWARE_INSTALL_STATE[$software_id]} < 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi @@ -2417,7 +2420,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it if (( ${aSOFTWARE_INSTALL_STATE[61]} == 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi @@ -2427,7 +2430,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it if (( ${aSOFTWARE_INSTALL_STATE[29]} == 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi @@ -2437,7 +2440,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it if (( ${aSOFTWARE_INSTALL_STATE[166]} == 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi @@ -2462,7 +2465,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it if (( ${aSOFTWARE_INSTALL_STATE[169]} == 1 )); then aSOFTWARE_INSTALL_STATE[69]=1 # RPi.GPIO - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[69]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[69]} will be installed" #aSOFTWARE_INSTALL_STATE[130]=1 # python-pip, enabled in #Software that requires Python-Pip fi @@ -2476,7 +2479,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it ${aSOFTWARE_INSTALL_STATE[163]} == 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi @@ -2489,7 +2492,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it ${aSOFTWARE_INSTALL_STATE[147]} == 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi @@ -2502,7 +2505,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it ( ${aSOFTWARE_INSTALL_STATE[147]} == 1 && $G_HW_ARCH == 1 ) )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi @@ -2511,7 +2514,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it if (( ${aSOFTWARE_INSTALL_STATE[108]} == 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi @@ -2529,7 +2532,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it ${aSOFTWARE_INSTALL_STATE[169]} == 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi @@ -2545,7 +2548,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it ${aSOFTWARE_INSTALL_STATE[148]} == 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi @@ -2557,7 +2560,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it ${aSOFTWARE_INSTALL_STATE[114]} == 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi @@ -2571,7 +2574,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it ${aSOFTWARE_INSTALL_STATE[139]} == 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi @@ -2635,7 +2638,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------------------------------------------------------------- # Pre-req software, for items that DO have their own array aSOFTWARE_REQUIRES_SOFTWARENAME - for i in ${!aSOFTWARE_INSTALL_STATE[@]} + for i in ${!aSOFTWARE_NAME[@]} do (( ${aSOFTWARE_INSTALL_STATE[$i]} != 1 )) && continue @@ -2677,7 +2680,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it if (( ${aSOFTWARE_REQUIRES_PHP[$i]:=0} && aSOFTWARE_INSTALL_STATE[$software_id] != 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi @@ -2686,7 +2689,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it if (( ${aSOFTWARE_REQUIRES_MYSQL[$i]:=0} && aSOFTWARE_INSTALL_STATE[$software_id] != 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi @@ -2695,7 +2698,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it if (( ${aSOFTWARE_REQUIRES_SQLITE[$i]:=0} && aSOFTWARE_INSTALL_STATE[$software_id] != 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi @@ -2709,7 +2712,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it # - If no desktop is selected or installed (0), default to LXDE aSOFTWARE_INSTALL_STATE[23]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" # Pretent software requiring Xserver, to mark it below, in case desktop ID already passed: aSOFTWARE_REQUIRES_XSERVERXORG[$i]=1 @@ -2721,7 +2724,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it if (( ${aSOFTWARE_REQUIRES_GIT[$i]:=0} && aSOFTWARE_INSTALL_STATE[$software_id] != 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi # BUILDESSENTIAL @@ -2729,7 +2732,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it if (( ${aSOFTWARE_REQUIRES_BUILDESSENTIAL[$i]:=0} && aSOFTWARE_INSTALL_STATE[$software_id] != 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi @@ -2738,7 +2741,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it if (( ${aSOFTWARE_REQUIRES_RSYSLOG[$i]:=0} && aSOFTWARE_INSTALL_STATE[$software_id] != 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi # FFMPEG @@ -2746,7 +2749,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it if (( ${aSOFTWARE_REQUIRES_FFMPEG[$i]:=0} && aSOFTWARE_INSTALL_STATE[$software_id] != 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi @@ -2755,7 +2758,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it if (( ${aSOFTWARE_REQUIRES_JAVA_JRE_JDK[$i]:=0} && aSOFTWARE_INSTALL_STATE[$software_id] != 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi @@ -2764,7 +2767,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it if (( ${aSOFTWARE_REQUIRES_NODEJS[$i]:=0} && aSOFTWARE_INSTALL_STATE[$software_id] != 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi @@ -2773,7 +2776,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it if (( ${aSOFTWARE_REQUIRES_ALSA[$i]:=0} && aSOFTWARE_INSTALL_STATE[$software_id] != 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi @@ -2782,7 +2785,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it if (( ${aSOFTWARE_REQUIRES_XSERVERXORG[$i]:=0} && aSOFTWARE_INSTALL_STATE[$software_id] != 1 )); then aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" fi @@ -2849,74 +2852,71 @@ Package: *php7.3*\nPin: release *\nPin-Priority: -1' > /etc/apt/preferences.d/di Create_Desktop_Shared_Items(){ - # - Pre-create dirs - mkdir -p /root/Desktop - mkdir -p /usr/share/applications - mkdir -p /var/lib/dietpi/dietpi-software/installed/desktop/icons - mkdir -p /var/lib/dietpi/dietpi-software/installed/desktop/wallpapers + # Pre-create dirs + mkdir -p /root/Desktop /usr/share/applications + mkdir -p /var/lib/dietpi/dietpi-software/installed/desktop/{icons,wallpapers} - # - Copy DietPi favourite links + # Copy DietPi favourite links G_THREAD_START wget https://raw.githubusercontent.com/MichaIng/DietPi/$G_GITBRANCH/.conf/desktop/gtk/.gtk-bookmarks -O /root/.gtk-bookmarks - # - DietPi Apps to download + # DietPi apps to download local adesktop_items=( - 'dietpi-software.desktop' - 'dietpi-drive_manager.desktop' - 'dietpi-update.desktop' - 'dietpi-config.desktop' - 'dietpi-backup.desktop' - 'dietpi-sync.desktop' - #'dietpi-bugreport.desktop' - 'dietpi-services.desktop' - 'dietpi-cleaner.desktop' - 'dietpi-cron.desktop' - 'dietpi-launcher.desktop' - 'dietpi-justboom.desktop' - - 'es2_info.desktop' - 'es2_gears.desktop' - 'glx_info.desktop' - 'glx_gears.desktop' + 'dietpi-software' + 'dietpi-drive_manager' + 'dietpi-update' + 'dietpi-config' + 'dietpi-backup' + 'dietpi-sync' + #'dietpi-bugreport' + 'dietpi-services' + 'dietpi-cleaner' + 'dietpi-cron' + 'dietpi-launcher' + 'dietpi-justboom' + + 'es2_info' + 'es2_gears' + 'glx_info' + 'glx_gears' ) for i in ${adesktop_items[@]} do - G_THREAD_START wget https://raw.githubusercontent.com/MichaIng/DietPi/$G_GITBRANCH/.conf/desktop/apps/$i -O /usr/share/applications/$i + G_THREAD_START wget https://raw.githubusercontent.com/MichaIng/DietPi/$G_GITBRANCH/.conf/desktop/apps/$i.desktop -O /usr/share/applications/$i.desktop done - unset adesktop_items - - # - Icons + # Icons G_THREAD_START wget https://raw.githubusercontent.com/MichaIng/DietPi/$G_GITBRANCH/.conf/desktop/icons/dietpi-icon.png -O /var/lib/dietpi/dietpi-software/installed/desktop/icons/dietpi-icon.png G_THREAD_START wget https://raw.githubusercontent.com/MichaIng/DietPi/$G_GITBRANCH/.conf/desktop/icons/grey_16x16.png -O /var/lib/dietpi/dietpi-software/installed/desktop/icons/grey_16x16.png G_THREAD_START wget https://raw.githubusercontent.com/MichaIng/DietPi/$G_GITBRANCH/.conf/desktop/icons/kodi-icon.png -O /var/lib/dietpi/dietpi-software/installed/desktop/icons/kodi-icon.png G_THREAD_START wget https://raw.githubusercontent.com/MichaIng/DietPi/$G_GITBRANCH/.conf/desktop/icons/justboom.png -O /var/lib/dietpi/dietpi-software/installed/desktop/icons/justboom.png - # - Wallpapers + # Wallpapers G_THREAD_START wget https://raw.githubusercontent.com/MichaIng/DietPi/$G_GITBRANCH/.conf/desktop/wallpapers/dietpi-logo_inverted_1080p.png -O /var/lib/dietpi/dietpi-software/installed/desktop/wallpapers/dietpi-logo_inverted_1080p.png G_THREAD_START wget https://raw.githubusercontent.com/MichaIng/DietPi/$G_GITBRANCH/.conf/desktop/wallpapers/dietpi-logo_1080p.png -O /var/lib/dietpi/dietpi-software/installed/desktop/wallpapers/dietpi-logo_1080p.png G_THREAD_WAIT - # - Desktop app symlinks + # Desktop app symlinks ln -sf /usr/share/applications/htop.desktop /root/Desktop/htop.desktop ln -sf /usr/share/applications/dietpi-software.desktop /root/Desktop/dietpi-software.desktop ln -sf /usr/share/applications/dietpi-config.desktop /root/Desktop/dietpi-config.desktop ln -sf /usr/share/applications/dietpi-launcher.desktop /root/Desktop/dietpi-launcher.desktop + # Permissions + # - Set execute to prevent "untrusted" prompt in Mate, and possibily other desktops. + chmod +x /usr/share/applications/*.desktop + } Create_UserContent_Folders(){ - mkdir -p $G_FP_DIETPI_USERDATA/$FOLDER_MUSIC - mkdir -p $G_FP_DIETPI_USERDATA/$FOLDER_PICTURES - mkdir -p $G_FP_DIETPI_USERDATA/$FOLDER_VIDEO - mkdir -p $G_FP_DIETPI_USERDATA/$FOLDER_DOWNLOADS - + mkdir -p $G_FP_DIETPI_USERDATA/{$FOLDER_MUSIC,$FOLDER_PICTURES,$FOLDER_VIDEO,$FOLDER_DOWNLOADS} + chown dietpi:dietpi $G_FP_DIETPI_USERDATA/{$FOLDER_MUSIC,$FOLDER_PICTURES,$FOLDER_VIDEO,$FOLDER_DOWNLOADS} mkdir -p /var/www } @@ -3309,7 +3309,7 @@ _EOF_ if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then Banner_Installing - # - NB: RPi | Perl required, else 'lighttpd-enable-mod fastcgi' = Can't locate Term/ReadLine.pm + # perl is required for lighttpd-enable-mod, it has been added to recommends only with Buster. G_AGI lighttpd perl fi @@ -3327,25 +3327,22 @@ _EOF_ else # Otherwise use possibly existent /var/lib/mysql # - Remove possible dead symlinks/files: - rm $G_FP_DIETPI_USERDATA/mysql &> /dev/null - mkdir -p $G_FP_DIETPI_USERDATA/mysql + rm -f $G_FP_DIETPI_USERDATA/mysql + mkdir $G_FP_DIETPI_USERDATA/mysql if [[ -d '/var/lib/mysql' ]]; then G_DIETPI-NOTIFY 2 '/var/lib/mysql exists, will migrate containing databases' - G_RUN_CMD cp -a /var/lib/mysql/. $G_FP_DIETPI_USERDATA/mysql + # Failsafe: Move symlink target in case + G_RUN_CMD mv $(readlink -f '/var/lib/mysql') $G_FP_DIETPI_USERDATA/mysql fi fi G_DIETPI-NOTIFY 2 'Removing /var/lib/mysql, if existent' - [[ -L '/var/lib/mysql' && ! $(readlink /var/lib/mysql) =~ $G_FP_DIETPI_USERDATA/mysql ]] && - rm -R "$(readlink /var/lib/mysql)" &> /dev/null - rm -R /var/lib/mysql &> /dev/null + rm -Rf /var/lib/mysql l_message="Creating symlink: /var/lib/mysql -> $G_FP_DIETPI_USERDATA/mysql" G_RUN_CMD ln -sf $G_FP_DIETPI_USERDATA/mysql /var/lib/mysql - chown mysql:mysql -h /var/lib/mysql &> /dev/null - chown mysql:mysql -RL /var/lib/mysql &> /dev/null local package_list='mariadb-server' # Install php-mysql module, if PHP was already installed @@ -3531,8 +3528,8 @@ We work around this error by running APT a second time. Please do not worry and # Skip install, if already present if [[ -d '/var/www/phpBB3' ]]; then - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} install dir \"/var/www/phpBB3\" already exists. Download and install steps will be skipped. - - If you want to update ${aSOFTWARE_WHIP_NAME[$software_id]}, please follow the instructions from WebUI ACP. + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} install dir \"/var/www/phpBB3\" already exists. Download and install steps will be skipped. + - If you want to update ${aSOFTWARE_NAME[$software_id]}, please follow the instructions from WebUI ACP. - if you need to reinstall (e.g. broken instance), please manually backup your config files+data, remove the install dir and rerun \"dietpi-software (re)install $software_id\"." else @@ -3578,7 +3575,7 @@ _EOF_ . /etc/bashrc.d/go.sh # Install OpenBazaar - G_DIETPI-NOTIFY 2 "Installing ${aSOFTWARE_WHIP_NAME[$software_id]}, please wait, this will take some time (1-5 minutes)" + G_DIETPI-NOTIFY 2 "Installing ${aSOFTWARE_NAME[$software_id]}, please wait, this will take some time (1-5 minutes)" G_RUN_CMD go get github.com/OpenBazaar/openbazaar-go fi @@ -3634,7 +3631,7 @@ _EOF_ if [[ -f $datadir/dietpi-owncloud-installation-backup/occ ]]; then G_DIETPI-NOTIFY 2 'ownCloud installation backup found, starting recovery...' - G_RUN_CMD cp -a "$datadir"/dietpi-owncloud-installation-backup/. /var/www/owncloud + G_RUN_CMD cp -a "$datadir"/dietpi-owncloud-installation-backup/. /var/www/owncloud/ # Correct config.php data directory entry, in case it changed due to server migration: G_CONFIG_INJECT "'datadirectory'" "'datadirectory' => '$datadir'," /var/www/owncloud/config/config.php "'dbtype'" @@ -3669,7 +3666,7 @@ _EOF_ if [[ -f $datadir/dietpi-nextcloud-installation-backup/occ ]]; then G_DIETPI-NOTIFY 2 'Nextcloud installation backup found, starting recovery...' - G_RUN_CMD cp -a "$datadir"/dietpi-nextcloud-installation-backup/. /var/www/nextcloud + G_RUN_CMD cp -a "$datadir"/dietpi-nextcloud-installation-backup/. /var/www/nextcloud/ # Correct config.php data directory entry, in case it changed due to server migration: G_CONFIG_INJECT "'datadirectory'" "'datadirectory' => '$datadir'," /var/www/nextcloud/config/config.php "'dbtype'" @@ -3746,10 +3743,10 @@ _EOF_ Download_Install 'https://github.com/jcorporation/myMPD/archive/master.zip' - cd myMPD* + cd myMPD-master G_RUN_CMD ./mkrelease.sh cd /tmp/$G_PROGRAM_NAME - rm -R myMPD* + rm -R myMPD-master fi @@ -4016,7 +4013,7 @@ _EOF_ DEPS_LIST='ibsdl1.2debian libsdl-net1.2' Download_Install 'https://dietpi.com/downloads/binaries/rpi/opentyrian_armhf.zip' / - cp -R /usr/local/games/opentyrian /usr/games/ # cp 'just does it', mv will fail if already exists. + cp -a /usr/local/games/opentyrian /usr/games/ # cp 'just does it', mv will fail if already exists. rm -R /usr/local/games/opentyrian chmod +x /usr/games/opentyrian/opentyrian @@ -4043,7 +4040,7 @@ _EOF_ # Setup /var/www/rpicam mkdir -p /var/www/rpicam/media - cp -R www/* /var/www/rpicam/ + cp -a www/* /var/www/rpicam/ #chmod +x /var/www/rpicam/raspizip.sh mknod /var/www/rpicam/FIFO p mknod /var/www/rpicam/FIFO1 p @@ -4121,7 +4118,7 @@ _EOF_ Download_Install 'https://github.com/afaqurk/linux-dash/archive/master.zip' mkdir -p /var/www/linuxdash - cp -R linux-dash-master/* /var/www/linuxdash + cp -a linux-dash-master/* /var/www/linuxdash/ rm -R linux-dash-master fi @@ -4868,9 +4865,9 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior # Skip install, if already present if [[ -d /var/www/pydio ]]; then - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} install dir \"/var/www/pydio\" already exists. Download and install steps will be skipped. + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} install dir \"/var/www/pydio\" already exists. Download and install steps will be skipped. - Please manually backup your config files+data, remove the install dir and rerun \"dietpi-software (re)install $software_id\" if you need to reinstall. - - If you want to update the ${aSOFTWARE_WHIP_NAME[$software_id]} instance, please use the internal updater from WebUI." + - If you want to update the ${aSOFTWARE_NAME[$software_id]} instance, please use the internal updater from WebUI." G_AGI $DEPS_LIST unset DEPS_LIST @@ -4970,8 +4967,18 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior Banner_Installing - Download_Install 'https://github.com/fruux/Baikal/archive/master.zip' /var/www - mv /var/www/Baikal* /var/www/baikal + # Pre-reqs: https://github.com/sabre-io/Baikal/wiki/Baïkal-dependencies + DEPS_LIST="$PHP_NAME-xml $PHP_NAME-mbstring $PHP_NAME-mysql" + + Download_Install 'https://github.com/fruux/Baikal/archive/master.zip' + # Reinstall: http://sabre.io/baikal/upgrade/ + if [[ -d '/var/www/baikal' ]]; then + + cp -a /var/www/baikal/Specific/. Baikal-master/Specific/ + rm -R /var/www/baikal + + fi + mv Baikal-master /var/www/baikal fi @@ -5193,7 +5200,7 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior # Web interface Download_Install 'https://github.com/ziahamza/webui-aria2/archive/master.zip' - cp -R webui-aria2-master /var/www/aria2 + cp -a webui-aria2-master /var/www/aria2 rm -R webui-aria2-master fi @@ -5208,8 +5215,8 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior if [[ -d $G_FP_DIETPI_USERDATA/medusa ]]; then G_AGI $DEPS_LIST - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} install dir \"$G_FP_DIETPI_USERDATA/medusa\" already exists. Download and install steps will be skipped. - - If you want to update ${aSOFTWARE_WHIP_NAME[$software_id]}, please use the internal updater from WebUI. + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} install dir \"$G_FP_DIETPI_USERDATA/medusa\" already exists. Download and install steps will be skipped. + - If you want to update ${aSOFTWARE_NAME[$software_id]}, please use the internal updater from WebUI. - If you need to reinstall (e.g. broken instance), please manually backup your config files+data, remove the install dir and rerun \"dietpi-software (re)install $software_id\"." else @@ -5228,8 +5235,8 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior if [[ -d '/etc/syncthing' ]]; then - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} install dir \"/etc/syncthing\" already exists. Download and install steps will be skipped. - - If you want to update ${aSOFTWARE_WHIP_NAME[$software_id]}, please use the internal updater from WebUI. + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} install dir \"/etc/syncthing\" already exists. Download and install steps will be skipped. + - If you want to update ${aSOFTWARE_NAME[$software_id]}, please use the internal updater from WebUI. - if you need to reinstall (e.g. broken instance), please manually backup your config files+data, remove the install dir \"/etc/syncthing\" and rerun \"dietpi-software (re)install $software_id\"." else @@ -5510,11 +5517,11 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior Banner_Installing - if [[ -d /opt/plexpy ]]; then + if [[ -d '/opt/plexpy' ]]; then G_AGI python python-setuptools - G_DIETPI-NOTIFY 2 "${aSOFTWARE_WHIP_NAME[$software_id]} install dir \"/opt/plexpy\" already exists. Download and install steps will be skipped. - - If you want to update ${aSOFTWARE_WHIP_NAME[$software_id]}, please use the internal updater from WebUI. + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} install dir \"/opt/plexpy\" already exists. Download and install steps will be skipped. + - If you want to update ${aSOFTWARE_NAME[$software_id]}, please use the internal updater from WebUI. - if you need to reinstall (e.g. broken instance), please manually backup your config files+data, remove the install dir \"/opt/plexpy\" and rerun \"dietpi-software (re)install $software_id\"." else @@ -5631,7 +5638,7 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior # Move HTPC Manager to a 'better' location mkdir -p $G_FP_DIETPI_USERDATA/htpc-manager - cp -R HTPC-Manager/* $G_FP_DIETPI_USERDATA/htpc-manager/ + cp -a HTPC-Manager/* $G_FP_DIETPI_USERDATA/htpc-manager/ rm -R HTPC-Manager fi @@ -5675,9 +5682,9 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior else G_WHIP_MSG "[WARNING] Existing install found\n -The ${aSOFTWARE_WHIP_NAME[$software_id]} target install directory $G_FP_DIETPI_USERDATA/roonserver already exists. This will not be overwritten.\n +The ${aSOFTWARE_NAME[$software_id]} target install directory $G_FP_DIETPI_USERDATA/roonserver already exists. This will not be overwritten.\n If the existing instance is broken or obsolete, please manually backup config files and data, then remove this directory and rerun "dietpi-software".\n -If you want to update ${aSOFTWARE_WHIP_NAME[$software_id]}, please use it's internal updater." +If you want to update ${aSOFTWARE_NAME[$software_id]}, please use it's internal updater." fi @@ -5730,6 +5737,7 @@ If you want to update ${aSOFTWARE_WHIP_NAME[$software_id]}, please use it's inte # Create default data directory & grant minio-user proper access mkdir -p $G_FP_DIETPI_USERDATA/minio-data + chown -R minio-user:minio-user $G_FP_DIETPI_USERDATA/minio-data fi @@ -5973,7 +5981,7 @@ If you want to update ${aSOFTWARE_WHIP_NAME[$software_id]}, please use it's inte getent passwd mycroft &> /dev/null && usercmd='usermod -a' $usercmd -G audio -d $G_FP_DIETPI_USERDATA/mycroft-data -s $(command -v nologin) mycroft mkdir -p $G_FP_DIETPI_USERDATA/mycroft-data - chown -R mycroft:mycroft $G_FP_DIETPI_USERDATA/mycroft-core /etc/mycroft $G_FP_DIETPI_USERDATA/mycroft-data + chown -R mycroft:mycroft /etc/mycroft $G_FP_DIETPI_USERDATA/mycroft-{core,data} # Force skills to be placed directly into data dir rm -Rf /opt/mycroft @@ -7180,7 +7188,7 @@ _EOF_ G_CONFIG_INJECT '"Gateway": "' " \"Gateway\": \"/ip4/$(sed -n 4p /DietPi/dietpi/.network)/tcp/4002\"," $G_FP_DIETPI_USERDATA/openbazaar/config # - Client connection user/password - G_DIETPI-NOTIFY 2 "Please enter username and password for your ${aSOFTWARE_WHIP_NAME[$software_id]} client connection:" + G_DIETPI-NOTIFY 2 "Please enter username and password for your ${aSOFTWARE_NAME[$software_id]} client connection:" openbazaar-go setapicreds -d $G_FP_DIETPI_USERDATA/openbazaar # - Client IP needs to be added to allowed IP list @@ -7189,8 +7197,8 @@ _EOF_ while : do - G_WHIP_INPUTBOX "${invalid_entry}Please enter the IP address of your ${aSOFTWARE_WHIP_NAME[$software_id]} client machine -This is required, since the ${aSOFTWARE_WHIP_NAME[$software_id]} server node by default does not allow any remote connection." + G_WHIP_INPUTBOX "${invalid_entry}Please enter the IP address of your ${aSOFTWARE_NAME[$software_id]} client machine +This is required, since the ${aSOFTWARE_NAME[$software_id]} server node by default does not allow any remote connection." if (( ! $? )) && [[ $G_WHIP_RETURNED_VALUE =~ ^[0-9.]+$ ]]; then ob_client_ip=$G_WHIP_RETURNED_VALUE @@ -7207,7 +7215,7 @@ This is required, since the ${aSOFTWARE_WHIP_NAME[$software_id]} server node by else - G_DIETPI-NOTIFY 2 "Existing ${aSOFTWARE_WHIP_NAME[$software_id]} config found. Skipping pre-configuration..." + G_DIETPI-NOTIFY 2 "Existing ${aSOFTWARE_NAME[$software_id]} config found. Skipping pre-configuration..." fi @@ -7281,6 +7289,9 @@ ExecStart=$(command -v FAHClient) --allow='0/0' --web-allow='0/0' --daemon=false WantedBy=multi-user.target _EOF_ + # Permissions + chown -R fahclient:dietpi $G_FP_DIETPI_USERDATA/fahclient /var/log/fahclient.log + fi software_id=47 # ownCloud @@ -7651,7 +7662,7 @@ To remove the existing database (including e.g. contacts, calendar, file tags et # mysqladmin drop nextcloud Otherwise to copy an existing instance in place: # rm -R /var/www/nextcloud - # cp -a /path/to/existing/nextcloud/. /var/www/nextcloud + # cp -a /path/to/existing/nextcloud/. /var/www/nextcloud/ # chown -R www-data:www-data /var/www/nextcloud\n The install script will now exit. After applying one of the the above, rerun dietpi-software, e.g.: # dietpi-software install 114' @@ -7697,7 +7708,7 @@ The install script will now exit. After applying one of the the above, rerun die G_ERROR_HANDLER_RESET # Install with this error does not copy over skeleton - cp -a /var/www/nextcloud/core/skeleton/. "$datadir/$username/files" + cp -a /var/www/nextcloud/core/skeleton/. "$datadir/$username/files/" else @@ -8061,6 +8072,11 @@ _EOF_ # Grab our test music for the user. Download_Test_Media + # Permissions + chmod 0664 /var/log/mpd/mpd.log /etc/mpd.conf + chmod -R 775 $G_FP_DIETPI_USERDATA/.mpd_cache + chown -R mpd:dietpi /etc/mpd.conf /var/log/mpd $G_FP_DIETPI_USERDATA/.mpd_cache + fi software_id=94 # ProFTPD @@ -8175,6 +8191,9 @@ _EOF_ fi + # Permissions + chown -R mympd:dietpi /var/lib/mympd + fi software_id=121 # Roon Bridge @@ -8194,6 +8213,9 @@ _EOF_ ln -s /var/log/roon $G_FP_DIETPI_USERDATA/roon/RoonBridge/Logs ln -s /var/log/roon $G_FP_DIETPI_USERDATA/roon/RAATServer/Logs + # Permissions + chown -R roon:dietpi $G_FP_DIETPI_USERDATA/roon /var/log/roon + fi software_id=122 # Node-RED @@ -8215,7 +8237,7 @@ _EOF_ # - Allow sudo calls echo 'nodered ALL=NOPASSWD: ALL' > /etc/sudoers.d/nodered - # - Service + # Service cat << _EOF_ > /etc/systemd/system/node-red.service [Unit] Description=Node-RED (DietPi) @@ -8228,6 +8250,9 @@ ExecStart=$(command -v node-red) -u $G_FP_DIETPI_USERDATA/node-red WantedBy=multi-user.target _EOF_ + # Permissions + chown -R nodered:nodered $G_FP_DIETPI_USERDATA/node-red + fi software_id=125 # Tomcat8 @@ -8285,13 +8310,13 @@ _EOF_ G_CONFIG_INJECT 'data_dir[[:blank:]]*=' 'data_dir = /mnt/dietpi_userdata/mopidy/data' /etc/mopidy/mopidy.conf '\[core\]' G_CONFIG_INJECT 'cache_dir[[:blank:]]*=' 'cache_dir = /mnt/dietpi_userdata/mopidy/cache' /etc/mopidy/mopidy.conf '\[core\]' - # - Move existing home+data to dietpi_userdata, if not yet existent + # Move existing home+data to dietpi_userdata, if not yet existent if [[ -d '/var/lib/mopidy' && ! -d $G_FP_DIETPI_USERDATA/mopidy ]]; then mv /var/lib/mopidy $G_FP_DIETPI_USERDATA/mopidy - # - Workaround error about moving data dir into itself + # Workaround error about moving data dir into itself mkdir -p $G_FP_DIETPI_USERDATA/mopidy/.hidden_data - # - Non-hidden files/folders are data + # Non-hidden files/folders are data mv $G_FP_DIETPI_USERDATA/mopidy/* $G_FP_DIETPI_USERDATA/mopidy/.hidden_data mv $G_FP_DIETPI_USERDATA/mopidy/.hidden_data $G_FP_DIETPI_USERDATA/mopidy/data @@ -8302,7 +8327,7 @@ _EOF_ fi - # - Move existing cache to dietpi_userdata, if not yet existent + # Move existing cache to dietpi_userdata, if not yet existent if [[ -d '/var/cache/mopidy' && ! -d $G_FP_DIETPI_USERDATA/mopidy/cache ]]; then mv /var/cache/mopidy $G_FP_DIETPI_USERDATA/mopidy/cache @@ -8314,12 +8339,15 @@ _EOF_ fi - # - Adjust user group and home dir - usermod -a -G dietpi,audio -d $G_FP_DIETPI_USERDATA/mopidy mopidy + # Permissions + chown -R mopidy:root $G_FP_DIETPI_USERDATA/mopidy + + # Adjust user group and home dir + usermod -aG dietpi,audio -d $G_FP_DIETPI_USERDATA/mopidy mopidy # - Add to new "render" group on Buster - (( $G_DISTRO > 4 )) && usermod -a -G render mopidy + (( $G_DISTRO > 4 )) && usermod -aG render mopidy - # - Adjust systemd unit to match new group and do not pre-create obsolete cache dir + # Adjust systemd unit to match new group and do not pre-create obsolete cache dir mkdir -p /etc/systemd/system/mopidy.service.d echo -e '[Service]\nGroup=dietpi\nExecStartPre=' > /etc/systemd/system/mopidy.service.d/dietpi.conf @@ -8375,12 +8403,13 @@ ExecStart=$(command -v minidlnad) -SR -f /etc/minidlna.conf WantedBy=multi-user.target _EOF_ - # Copy Config + # Copy config G_BACKUP_FP /etc/minidlna.conf dps_index=$software_id Download_Install 'minidlna.conf' /etc/minidlna.conf - # Setup data directories + # Data dir mkdir -p $G_FP_DIETPI_USERDATA/.MiniDLNA_Cache + chown -R minidlna:dietpi $G_FP_DIETPI_USERDATA/.MiniDLNA_Cache Download_Test_Media @@ -8596,6 +8625,7 @@ _EOF_ mkdir -p $G_FP_DIETPI_USERDATA/rpicam rm -R /var/www/rpicam/media ln -s $G_FP_DIETPI_USERDATA/rpicam /var/www/rpicam/media + chown -R www-data:www-data $G_FP_DIETPI_USERDATA/rpicam # - Enable RPi camera /DietPi/dietpi/func/dietpi-set_hardware rpi-camera enable @@ -8611,10 +8641,7 @@ _EOF_ getent passwd debian-deluged &> /dev/null && usercmd='usermod -a' $usercmd -G dietpi -d $G_FP_DIETPI_USERDATA/deluge -s $(command -v nologin) debian-deluged - mkdir -p $G_FP_DIETPI_USERDATA/deluge/.config/deluge - chown -R debian-deluged:debian-deluged $G_FP_DIETPI_USERDATA/deluge - mkdir -p /var/log/deluged - chown -R debian-deluged /var/log/deluged + mkdir -p $G_FP_DIETPI_USERDATA/deluge/.config/deluge /var/log/deluged # https://git.deluge-torrent.org/deluge/tree/packaging/systemd/deluged.service cat << _EOF_ > /etc/systemd/system/deluged.service @@ -8683,6 +8710,10 @@ _EOF_ [[ -f '/etc/default/deluged' ]] && rm /etc/default/deluged [[ -d '/var/lib/deluged' ]] && rm -R /var/lib/deluged + # Permissions + chown -R debian-deluged:debian-deluged $G_FP_DIETPI_USERDATA/deluge + chown -R debian-deluged /var/log/deluged + fi software_id=115 # Webmin @@ -8751,6 +8782,9 @@ Do you want to enable the Pi-hole blocking page?'; then G_CONFIG_INJECT 'BLOCKINGMODE=' 'BLOCKINGMODE=NULL' /etc/pihole/pihole-FTL.conf fi + + # Failsafe: Reset permissions + cd /var/www/html/admin && git reset --hard HEAD cd /tmp/$G_PROGRAM_NAME # Fix service to disable syslog pre-req preventing start @@ -8780,7 +8814,6 @@ Do you want to enable the Pi-hole blocking page?'; then # Optimise memory limit local airsonic_memory_max=$(( $RAM_TOTAL / 5 )) (( $airsonic_memory_max < 200 )) && airsonic_memory_max=200 - airsonic_memory_max+='m' cat << _EOF_ > /etc/systemd/system/airsonic.service [Unit] @@ -8791,7 +8824,7 @@ After=remote-fs.target network.target User=airsonic Group=dietpi WorkingDirectory=$G_FP_DIETPI_USERDATA/airsonic -ExecStart=$(command -v java) -Xmx$airsonic_memory_max -Dairsonic.home=$G_FP_DIETPI_USERDATA/airsonic -Dserver.context-path=/airsonic -Dserver.port=8080 -jar $G_FP_DIETPI_USERDATA/airsonic/airsonic.war +ExecStart=$(command -v java) -Xmx${airsonic_memory_max}m -Dairsonic.home=$G_FP_DIETPI_USERDATA/airsonic -Dserver.context-path=/airsonic -Dserver.port=8080 -jar $G_FP_DIETPI_USERDATA/airsonic/airsonic.war [Install] WantedBy=multi-user.target @@ -8800,6 +8833,9 @@ _EOF_ # Symlink FFmpeg to Airsonic transcoder command -v ffmpeg &> /dev/null && ln -sf $(command -v ffmpeg) $G_FP_DIETPI_USERDATA/airsonic/transcode + # Permissions + chown -R airsonic:airsonic $G_FP_DIETPI_USERDATA/airsonic + # Grab our test media for user Download_Test_Media @@ -9210,9 +9246,13 @@ _EOF_ Banner_Configuration # Move DB/datadir to userdata location - mv /var/lib/influxdb $G_FP_DIETPI_USERDATA/ + [[ -d $G_FP_DIETPI_USERDATA/influxdb ]] || mv /var/lib/influxdb $G_FP_DIETPI_USERDATA/ + rm -Rf /var/lib/influxdb ln -sf $G_FP_DIETPI_USERDATA/influxdb /var/lib/influxdb + # Permissions + chown -R influxdb:influxdb $G_FP_DIETPI_USERDATA/influxdb + fi software_id=77 # Grafana @@ -9224,7 +9264,7 @@ _EOF_ if [[ -d $G_FP_DIETPI_USERDATA/grafana ]]; then G_DIETPI-NOTIFY 2 "Existing database/plugin directory $G_FP_DIETPI_USERDATA/grafana found. Will not overwrite..." - [[ -e '/var/lib/grafana' ]] && rm -R /var/lib/grafana + rm -Rf /var/lib/grafana else @@ -9233,6 +9273,9 @@ _EOF_ fi ln -sf $G_FP_DIETPI_USERDATA/grafana /var/lib/grafana + # Permissions + chown -R grafana:grafana $G_FP_DIETPI_USERDATA/grafana + # Set password, wrap into trippled double quotes in case of ; or # being contained, according to docs: http://docs.grafana.org/installation/configuration/#password GCI_PASSWORD=1 GCI_PRESERVE=1 G_CONFIG_INJECT 'admin_password[[:blank:]]*=' "admin_password = \"\"\"$GLOBAL_PW\"\"\"" /etc/grafana/grafana.ini G_CONFIG_INJECT 'http_port = ' 'http_port = 3001' /etc/grafana/grafana.ini @@ -9250,7 +9293,6 @@ _EOF_ mkdir -p $G_FP_DIETPI_USERDATA/{ebooks,comics} - chmod +x $G_FP_DIETPI_USERDATA/ubooquity/Ubooquity.jar cat << _EOF_ > /etc/systemd/system/ubooquity.service [Unit] Description=Ubooquity (DietPi) @@ -9265,6 +9307,10 @@ ExecStart=$(command -v java) -jar $G_FP_DIETPI_USERDATA/ubooquity/Ubooquity.jar WantedBy=multi-user.target _EOF_ + # Permissions + chmod +x $G_FP_DIETPI_USERDATA/ubooquity/Ubooquity.jar + chown -R ubooquity:dietpi $G_FP_DIETPI_USERDATA/ubooquity + fi software_id=64 # phpSysInfo @@ -9872,6 +9918,7 @@ _EOF_ # Create symlink ln -sf $target_data_dir /var/www/pydio/data + chown -R www-data:www-data $target_data_dir fi @@ -10018,24 +10065,27 @@ _EOF_ Banner_Configuration - /DietPi/dietpi/func/dietpi-set_software setpermissions &> /dev/null + # Permissions: http://sabre.io/baikal/install/ + chown -R www-data:www-data /var/www/baikal/Specific + + # Enable required PHP modules: https://github.com/sabre-io/Baikal/wiki/Baïkal-dependencies + phpenmod xml mbstring pdo_mysql - # - install/run composer | Also run for ampache. Move this to a global function.... + # Install/run composer | Also run for ampache. Move this to a global function.... php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php php composer-setup.php php -r "unlink('composer-setup.php');" - mv composer.phar /usr/local/bin/composer cd /var/www/baikal composer install --no-interaction cd /tmp/$G_PROGRAM_NAME - # - Mysql DB + # Database /DietPi/dietpi/func/create_mysql_db baikal baikal "$GLOBAL_PW" - # - Cal/CardDAV request redirection: http://sabre.io/baikal/install/, https://github.com/bambocher/docker-baikal/blob/master/lighttpd.conf - # - Apache + # Cal/CardDAV request redirection: http://sabre.io/baikal/install/, https://github.com/bambocher/docker-baikal/blob/master/lighttpd.conf + # - Apache if (( ${aSOFTWARE_INSTALL_STATE[83]} > 0 )); then echo '# Redirect Cal/CardDAV requests to Baikal endpoint: @@ -10043,7 +10093,7 @@ Redirect permanent /.well-known/carddav /baikal/html/dav.php Redirect permanent /.well-known/caldav /baikal/html/dav.php' > /etc/apache2/conf-available/dietpi-dav_redirect.conf a2enconf dietpi-dav_redirect - # - Lighttpd + # - Lighttpd elif (( ${aSOFTWARE_INSTALL_STATE[84]} > 0 )); then echo '# Redirect Cal/CardDAV requests to Baikal endpoint: @@ -10053,7 +10103,7 @@ url.redirect += ( )' > /etc/lighttpd/conf-available/99-dietpi-dav_redirect.conf lighttpd-enable-mod dietpi-dav_redirect - # - Nginx + # - Nginx elif (( ${aSOFTWARE_INSTALL_STATE[85]} > 0 )); then echo '# Redirect Cal/CardDAV requests to Baikal endpoint: @@ -10152,6 +10202,9 @@ Ports=1339 Enabled=1 _EOF_ + # Permissions + chown -R cuberite:dietpi $G_FP_DIETPI_USERDATA/cubrite + fi software_id=53 # MineOS @@ -10168,7 +10221,7 @@ _EOF_ killall -w node &> /dev/null killall -w nodejs &> /dev/null - # - Create symlinks to userdata dir + # Create symlinks to userdata dir mkdir -p $G_FP_DIETPI_USERDATA/mineos/minecraft ln -sf $G_FP_DIETPI_USERDATA/mineos/minecraft/mineos_console.js /usr/local/bin/mineos @@ -10179,12 +10232,12 @@ _EOF_ mkdir -p /var/games $G_FP_DIETPI_USERDATA/mineos/serverdata ln -s $G_FP_DIETPI_USERDATA/mineos/serverdata /var/games/minecraft - # - setup SSL cert + # Setup SSL cert cd $G_FP_DIETPI_USERDATA/mineos/minecraft ./generate-sslcert.sh cd /tmp/$G_PROGRAM_NAME - # - Supervisor service + # Supervisor service cat << _EOF_ > /etc/supervisor/conf.d/mineos.conf [program:mineos] command=/usr/local/bin/node webui.js @@ -10197,6 +10250,9 @@ redirect_stderr=true _EOF_ supervisorctl reload + # Permissions + chown -R mineos:dietpi $G_FP_DIETPI_USERDATA/mineos /var/games/minecraft /etc/ssl/certs/mineos* + fi software_id=49 # Gogs @@ -10209,9 +10265,9 @@ _EOF_ getent passwd gogs &> /dev/null && usercmd='usermod' $usercmd -d /etc/gogs -s $(command -v nologin) gogs - # Directories + # Directories + permissions mkdir -p $G_FP_DIETPI_USERDATA/gogs-repo /var/log/gogs - chown -R gogs:gogs $G_FP_DIETPI_USERDATA/gogs-repo /var/log/gogs + chown -R gogs:gogs /etc/gogs $G_FP_DIETPI_USERDATA/gogs-repo /var/log/gogs # Database if [[ ! -d '/var/lib/mysql/gogs' ]]; then @@ -10346,6 +10402,9 @@ ExecStart=/usr/bin/qbittorrent-nox --webui-port=1340 WantedBy=multi-user.target _EOF_ + # Permissions + chown -R qbittorrent:dietpi /home/qbittorrent + fi software_id=107 # rTorrent @@ -10617,7 +10676,7 @@ scgi_port = 127.0.0.1:5000 _EOF_ # On Buster use new daemon mode (( $G_DISTRO > 4 )) && G_CONFIG_INJECT 'system.daemon.set[[:blank:]=]' 'system.daemon.set = true' $G_FP_DIETPI_USERDATA/rtorrent/.rtorrent.rc - chown -R rtorrent:rtorrent $G_FP_DIETPI_USERDATA/rtorrent + chown -R rtorrent:rtorrent $G_FP_DIETPI_USERDATA/rtorrent $G_FP_DIETPI_USERDATA/downloads/.session fi @@ -10770,6 +10829,9 @@ _EOF_ G_CONFIG_INJECT 'Group=' 'Group=dietpi' /etc/systemd/system/medusa.service '\[Service\]' G_CONFIG_INJECT 'ExecStart=' "ExecStart=$(command -v python3) $G_FP_DIETPI_USERDATA/medusa/start.py -q --nolaunch --datadir=$G_FP_DIETPI_USERDATA/medusa" /etc/systemd/system/medusa.service + # Permissions + chown -R medusa:dietpi $G_FP_DIETPI_USERDATA/medusa + fi software_id=134 # Tonido @@ -10799,7 +10861,7 @@ _EOF_ # User dirs mkdir -p /home/tonido $G_FP_DIETPI_USERDATA/tonido/sync{,data} # - Symlink - cp -R /home/tonido/tonido $G_FP_DIETPI_USERDATA/ &> /dev/null + [[ -d '/home/tonido/tonido' ]] && cp -a /home/tonido/tonido $G_FP_DIETPI_USERDATA/ &> /dev/null rm -Rf /home/tonido/{tonido,TonidoSync{,Data}} ln -s $G_FP_DIETPI_USERDATA/tonido /home/tonido/tonido ln -s $G_FP_DIETPI_USERDATA/tonido/sync /home/tonido/TonidoSync @@ -10950,6 +11012,9 @@ _EOF_ fi + # Permissions: http://ompd.pl/configuration + chown -R www-data:www-data /var/www/ompd/{tmp,stream,cache} + fi software_id=135 # IceCast + DarkIce @@ -11073,6 +11138,9 @@ ExecStart=$(command -v java) -jar $G_FP_DIETPI_USERDATA/blynk/blynkserver.jar WantedBy=multi-user.target _EOF_ + # Permissions + chown -R blynk:dietpi $G_FP_DIETPI_USERDATA/blynk /var/log/blynk + fi software_id=136 # MotionEye @@ -11293,6 +11361,9 @@ ExecStart=$(command -v php) $G_FP_DIETPI_USERDATA/koel/artisan serve --host 0.0. WantedBy=multi-user.target _EOF_ + # Permissions + chown -R koel:dietpi $G_FP_DIETPI_USERDATA/koel + fi software_id=144 # Sonarr @@ -11320,7 +11391,7 @@ ExecStart=/usr/bin/mono -O=-aot /opt/NzbDrone/NzbDrone.exe -nobrowser -data=$G_F WantedBy=multi-user.target _EOF_ - # - logs to RAM + # Logs to RAM rm -R $G_FP_DIETPI_USERDATA/sonarr/logs* &> /dev/null mkdir -p /var/log/sonarr ln -sf /var/log/sonarr $G_FP_DIETPI_USERDATA/sonarr/logs @@ -11328,6 +11399,9 @@ _EOF_ ln -sf /var/log/sonarr/logs.db-shm $G_FP_DIETPI_USERDATA/sonarr/logs.db-shm ln -sf /var/log/sonarr/logs.db-wal $G_FP_DIETPI_USERDATA/sonarr/logs.db-wal + # Permissions + chown -R sonarr:dietpi $G_FP_DIETPI_USERDATA/sonarr /opt/NzbDrone /var/log/sonarr + fi software_id=145 # Radarr @@ -11355,7 +11429,7 @@ ExecStart=/usr/bin/mono -O=-aot /opt/Radarr/Radarr.exe -nobrowser -data=$G_FP_DI WantedBy=multi-user.target _EOF_ - # - logs to RAM + # Logs to RAM rm -R $G_FP_DIETPI_USERDATA/radarr/logs* &> /dev/null mkdir -p /var/log/radarr ln -sf /var/log/radarr $G_FP_DIETPI_USERDATA/radarr/logs @@ -11363,6 +11437,9 @@ _EOF_ ln -sf /var/log/radarr/logs.db-shm $G_FP_DIETPI_USERDATA/radarr/logs.db-shm ln -sf /var/log/radarr/logs.db-wal $G_FP_DIETPI_USERDATA/radarr/logs.db-wal + # Permissions + chown -R radarr:dietpi $G_FP_DIETPI_USERDATA/radarr /opt/Radarr /var/log/radarr + fi software_id=106 # Lidarr @@ -11398,6 +11475,9 @@ _EOF_ ln -sf /var/log/lidarr/logs.db-shm $G_FP_DIETPI_USERDATA/lidarr/logs.db-shm ln -sf /var/log/lidarr/logs.db-wal $G_FP_DIETPI_USERDATA/lidarr/logs.db-wal + # Permissions + chown -R lidarr:dietpi $G_FP_DIETPI_USERDATA/lidarr /opt/Lidarr /var/log/lidarr + fi software_id=146 # PlexPy @@ -11412,7 +11492,6 @@ _EOF_ # Directory mkdir -p $G_FP_DIETPI_USERDATA/plexpy - chown plexpy:dietpi /opt/plexpy $G_FP_DIETPI_USERDATA/plexpy # Service cat << _EOF_ > /etc/systemd/system/plexpy.service @@ -11430,6 +11509,10 @@ ExecStart=/opt/plexpy/PlexPy.py --quiet --daemon --nolaunch --config /opt/plexpy WantedBy=multi-user.target _EOF_ + # Permissions + chown -R plexpy:plexpy /opt/plexpy + chown -R plexpy:dietpi $G_FP_DIETPI_USERDATA/plexpy + fi software_id=147 # Jackett @@ -11469,7 +11552,6 @@ ReadWritePaths=/opt/jackett [Install] WantedBy=multi-user.target _EOF_ - # - Non-ARMv6 devices run the standalone version: https://github.com/Jackett/Jackett#install-on-linux-amdx64 (( $G_HW_ARCH != 1 )) && G_CONFIG_INJECT 'ExecStart=' 'ExecStart=/opt/jackett/jackett --NoRestart' /etc/systemd/system/jackett.service @@ -11496,7 +11578,7 @@ _EOF_ # - Umask: https://github.com/MichaIng/DietPi/issues/1999 sed -i "/UMask=/c\UMask=0002" $G_FP_DIETPI_USERDATA/nzbget/nzbget.conf - # Optimizations + # - Optimizations sed -i "/Server1.Cipher=/c\Server1.Cipher=RC4-MD5" $G_FP_DIETPI_USERDATA/nzbget/nzbget.conf sed -i "/CrcCheck=/c\CrcCheck=no" $G_FP_DIETPI_USERDATA/nzbget/nzbget.conf sed -i "/ParScan=/c\ParScan=limited" $G_FP_DIETPI_USERDATA/nzbget/nzbget.conf @@ -11525,6 +11607,9 @@ ExecStart=$G_FP_DIETPI_USERDATA/nzbget/nzbget -D WantedBy=multi-user.target _EOF_ + # Permissions + chown -R nzbget:dietpi $G_FP_DIETPI_USERDATA/nzbget + fi software_id=155 # HTPC Manager @@ -11582,6 +11667,9 @@ ExecStart=$G_FP_DIETPI_USERDATA/roonserver/start.sh WantedBy=multi-user.target _EOF_ + # Permissions + chown -R roon:dietpi $G_FP_DIETPI_USERDATA/roonserver + fi software_id=156 # Steam @@ -11677,27 +11765,22 @@ _EOF_ # Setup Filestore DietPi appropriate # IF already present just create symlink - if [[ ! -f $G_FP_DIETPI_USERDATA/fuguhub-data/ ]]; then - - # Move installed filestore to dietpi folder - mkdir $G_FP_DIETPI_USERDATA/fuguhub-data/ - mv /home/bd/disk/* $G_FP_DIETPI_USERDATA/fuguhub-data/ - # Removed 'actual' folder to make way for symlink - rm -r /home/bd/disk - # Create symlink - ln -s $G_FP_DIETPI_USERDATA/fuguhub-data /home/bd/disk - # Set permissions - # setfacl -R -m u:bd:rwx $G_FP_DIETPI_USERDATA/fuguhub-data/ - - else + if [[ ! -d $G_FP_DIETPI_USERDATA/fuguhub-data/ ]]; then - # Removed 'actual' folder to make way for symlink - rm -r /home/bd/disk - # Create symlink - ln -s $G_FP_DIETPI_USERDATA/fuguhub-data /home/bd/disk + # Move installed filestore to dietpi userdata + mkdir $G_FP_DIETPI_USERDATA/fuguhub-data + mv /home/bd/disk/* $G_FP_DIETPI_USERDATA/fuguhub-data/ + # Set permissions + chown -R bd:bd $G_FP_DIETPI_USERDATA/fuguhub-data/ + #setfacl -R -m u:bd:rwx $G_FP_DIETPI_USERDATA/fuguhub-data/ fi + # Removed 'actual' folder to make way for symlink + rm -Rf /home/bd/disk + # Create symlink + ln -s $G_FP_DIETPI_USERDATA/fuguhub-data /home/bd/disk + fi software_id=164 # Nukkit @@ -12278,7 +12361,7 @@ _EOF_ [[ -d $G_FP_DIETPI_USERDATA/mysql/owncloud ]] && mysqldump owncloud > $datadir/dietpi-owncloud-database-backup.sql mysqladmin drop owncloud -f # Backup ownCloud installation folder - cp -a /var/www/owncloud/. $datadir/dietpi-owncloud-installation-backup + cp -a /var/www/owncloud/. $datadir/dietpi-owncloud-installation-backup/ # Remove ownCloud installation folder rm -R /var/www/owncloud # Remove redirect configs @@ -12343,7 +12426,7 @@ _EOF_ [[ -d $G_FP_DIETPI_USERDATA/mysql/nextcloud ]] && mysqldump nextcloud > $datadir/dietpi-nextcloud-database-backup.sql mysqladmin drop nextcloud -f # Backup Nextcloud installation folder - cp -a /var/www/nextcloud/. $datadir/dietpi-nextcloud-installation-backup + cp -a /var/www/nextcloud/. $datadir/dietpi-nextcloud-installation-backup/ # Remove Nextcloud installation folder rm -R /var/www/nextcloud # Remove redirect configs @@ -12654,11 +12737,15 @@ _EOF_ Banner_Uninstalling #apt-mark auto libjpeg8 libpng12-0 libfontconfig1 libssl1.0.0 &> /dev/null - rm /etc/systemd/system/tonido.service - rm -R $G_FP_DIETPI_USERDATA/tonido + if [[ -f '/etc/systemd/system/tonido.service' ]]; then - userdel -rf tonido - rm -R /home/tonido + systemctl disable --now tonido + rm /etc/systemd/system/tonido.service + + fi + getent passwd tonido &> /dev/null && userdel -rf tonido + [[ -d $G_FP_DIETPI_USERDATA/tonido ]] && rm -R $G_FP_DIETPI_USERDATA/tonido + [[ -d '/home/tonido' ]] && rm -R /home/tonido fi @@ -12748,16 +12835,20 @@ _EOF_ Banner_Uninstalling - userdel -rf koel + if [[ -f '/etc/systemd/system/koel.service' ]]; then + + systemctl disable --now koel + rm /etc/systemd/system/koel.service + + fi + + getent passwd koel &> /dev/null && userdel -rf koel systemctl start mariadb mysqladmin drop koel -f mysql -e 'drop user koel@localhost' - rm -R $G_FP_DIETPI_USERDATA/koel - - systemctl disable koel - rm /etc/systemd/system/koel.service + [[ -d $G_FP_DIETPI_USERDATA/koel ]] && rm -R $G_FP_DIETPI_USERDATA/koel fi @@ -12909,7 +13000,12 @@ _EOF_ Banner_Uninstalling [[ -d $G_FP_DIETPI_USERDATA/roonserver ]] && rm -R $G_FP_DIETPI_USERDATA/roonserver - [[ -f '/etc/systemd/system/roonserver.service' ]] && rm /etc/systemd/system/roonserver.service + if [[ -f '/etc/systemd/system/roonserver.service' ]]; then + + systemctl disable --now roonserver + rm /etc/systemd/system/roonserver.service + + fi fi @@ -13570,11 +13666,15 @@ _EOF_ if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then Banner_Uninstalling - rm -R /etc/cuberite &> /dev/null # pre v6.11 - rm -R $G_FP_DIETPI_USERDATA/cubrite - rm /etc/systemd/system/cuberite.service + if [[ -f '/etc/systemd/system/cuberite.service' ]]; then - userdel -rf cuberite + systemctl disable --now cuberite + rm /etc/systemd/system/cuberite.service + + fi + getent passwd cuberite &> /dev/null && userdel -rf cuberite + [[ -f '/etc/cuberite' ]] && rm -R /etc/cuberite # pre v6.11 + [[ -d $G_FP_DIETPI_USERDATA/cubrite ]] && rm -R $G_FP_DIETPI_USERDATA/cubrite fi @@ -13965,12 +14065,18 @@ _EOF_ Banner_Uninstalling G_AGP influxdb - rm /etc/apt/sources.list.d/influxdb.list - rm -R /var/lib/influxdb - rm -R $G_FP_DIETPI_USERDATA/influxdb + if [[ -f '/lib/systemd/system/influxdb.service' ]]; then + + systemctl unmask influxdb + systemctl disable --now influxdb + rm /lib/systemd/system/influxdb.service - rm /lib/systemd/system/influxdb.service &> /dev/null # still exists after G_AGP + fi + + [[ -f '/etc/apt/sources.list.d/influxdb.list' ]] && rm /etc/apt/sources.list.d/influxdb.list + rm -Rf /var/lib/influxdb # Symlink + [[ -d $G_FP_DIETPI_USERDATA/influxdb ]] && rm -R $G_FP_DIETPI_USERDATA/influxdb fi @@ -13992,10 +14098,14 @@ _EOF_ Banner_Uninstalling - rm /etc/systemd/system/ubooquity.service - rm -R $G_FP_DIETPI_USERDATA/ubooquity + if [[ -f '/etc/systemd/system/ubooquity.service' ]]; then + + systemctl disable --now ubooquity + rm /etc/systemd/system/ubooquity.service + fi userdel -rf ubooquity + [[ -d $G_FP_DIETPI_USERDATA/ubooquity ]] && rm -R $G_FP_DIETPI_USERDATA/ubooquity fi @@ -14458,8 +14568,6 @@ _EOF_ Banner_Configs Install_Apply_Configs - /DietPi/dietpi/func/dietpi-set_software setpermissions &> /dev/null - # Apply autostart index local autostart_current=0 [[ -f '/DietPi/dietpi/.dietpi-autostart_index' ]] && autostart_current=$( 0 )); then @@ -14847,7 +14955,7 @@ _EOF_ fi - G_WHIP_CHECKLIST_ARRAY+=($i "${aSOFTWARE_WHIP_NAME[$i]}: ${aSOFTWARE_WHIP_DESC[$i]}" "$selected") + G_WHIP_CHECKLIST_ARRAY+=($i "${aSOFTWARE_NAME[$i]}: ${aSOFTWARE_DESC[$i]}" "$selected") display_software_menu=1 fi @@ -14933,7 +15041,7 @@ _EOF_ fi # Add this option to whiptail list - G_WHIP_CHECKLIST_ARRAY+=($j "${aSOFTWARE_WHIP_NAME[$j]}: ${aSOFTWARE_WHIP_DESC[$j]}" $selected) + G_WHIP_CHECKLIST_ARRAY+=($j "${aSOFTWARE_NAME[$j]}: ${aSOFTWARE_DESC[$j]}" $selected) fi @@ -15688,7 +15796,7 @@ List of installed software and their URL links for online docs: if (( ${aSOFTWARE_INSTALL_STATE[i]} > 0 )) && [[ ${aSOFTWARE_ONLINEDOC_URL[$i]} ]]; then - string+="\n${aSOFTWARE_WHIP_NAME[$i]}: ${aSOFTWARE_WHIP_DESC[$i]}" + string+="\n${aSOFTWARE_NAME[$i]}: ${aSOFTWARE_DESC[$i]}" string+="\n$FP_ONLINEDOC_URL${aSOFTWARE_ONLINEDOC_URL[$i]}\n" fi @@ -15750,7 +15858,7 @@ List of installed software and their URL links for online docs: if (( ${aSOFTWARE_INSTALL_STATE[$i]} == 1 )); then - string_output+="\n - ${aSOFTWARE_WHIP_NAME[$i]}: ${aSOFTWARE_WHIP_DESC[$i]}" + string_output+="\n - ${aSOFTWARE_NAME[$i]}: ${aSOFTWARE_DESC[$i]}" fi @@ -15815,7 +15923,7 @@ Do you wish to continue with DietPi as a pure minimal image?'; then if (( ${aSOFTWARE_INSTALL_STATE[$i]} == 2 && ${aSOFTWARE_TYPE[$i]:=-2} > -2 )); then - G_WHIP_CHECKLIST_ARRAY+=($i "${aSOFTWARE_WHIP_NAME[$i]}: ${aSOFTWARE_WHIP_DESC[$i]}" 'off') + G_WHIP_CHECKLIST_ARRAY+=($i "${aSOFTWARE_NAME[$i]}: ${aSOFTWARE_DESC[$i]}" 'off') software_available_for_uninstall=1 fi @@ -15838,7 +15946,7 @@ Do you wish to continue with DietPi as a pure minimal image?'; then for i in $G_WHIP_RETURNED_VALUE do - output_string+=" - ${aSOFTWARE_WHIP_NAME[$i]}: ${aSOFTWARE_WHIP_DESC[$i]}\n" + output_string+=" - ${aSOFTWARE_NAME[$i]}: ${aSOFTWARE_DESC[$i]}\n" UNINSTALL_REQUIRED=1 done @@ -15890,19 +15998,19 @@ Do you wish to continue with DietPi as a pure minimal image?'; then Banner_Installing(){ - G_DIETPI-NOTIFY 3 "$G_PROGRAM_NAME" "Installing ${aSOFTWARE_WHIP_NAME[$software_id]}: ${aSOFTWARE_WHIP_DESC[$software_id]}" + G_DIETPI-NOTIFY 3 "$G_PROGRAM_NAME" "Installing ${aSOFTWARE_NAME[$software_id]}: ${aSOFTWARE_DESC[$software_id]}" } Banner_Configuration(){ - G_DIETPI-NOTIFY 3 "$G_PROGRAM_NAME" "Configuring ${aSOFTWARE_WHIP_NAME[$software_id]}: ${aSOFTWARE_WHIP_DESC[$software_id]}" + G_DIETPI-NOTIFY 3 "$G_PROGRAM_NAME" "Configuring ${aSOFTWARE_NAME[$software_id]}: ${aSOFTWARE_DESC[$software_id]}" } Banner_Uninstalling(){ - G_DIETPI-NOTIFY 3 "$G_PROGRAM_NAME" "Uninstalling ${aSOFTWARE_WHIP_NAME[$software_id]}: ${aSOFTWARE_WHIP_DESC[$software_id]}" + G_DIETPI-NOTIFY 3 "$G_PROGRAM_NAME" "Uninstalling ${aSOFTWARE_NAME[$software_id]}: ${aSOFTWARE_DESC[$software_id]}" } diff --git a/dietpi/dietpi-sync b/dietpi/dietpi-sync index 138477a1c2..73f8c8d383 100644 --- a/dietpi/dietpi-sync +++ b/dietpi/dietpi-sync @@ -17,19 +17,19 @@ # - /DietPi/dietpi/dietpi-sync 1 = Sync #//////////////////////////////////// - #Import DietPi-Globals --------------------------------------------------------------- + # Import DietPi-Globals -------------------------------------------------------------- . /DietPi/dietpi/func/dietpi-globals G_PROGRAM_NAME='DietPi-Sync' G_CHECK_ROOT_USER G_CHECK_ROOTFS_RW G_INIT - #Import DietPi-Globals --------------------------------------------------------------- + # Import DietPi-Globals -------------------------------------------------------------- - #Restart rsync service, if stopped during DietPi-Sync run: https://github.com/MichaIng/DietPi/issues/1869 + # Restart rsync service, if stopped during DietPi-Sync run: https://github.com/MichaIng/DietPi/issues/1869 SERVICE_CONTROL=0 G_EXIT_CUSTOM(){ (( $SERVICE_CONTROL )) && G_RUN_CMD systemctl start rsync; } - #Grab Input (valid interger) + # Grab Input (valid interger) INPUT=0 disable_error=1 G_CHECK_VALIDINT "$1" && INPUT=$1 @@ -38,7 +38,7 @@ #///////////////////////////////////////////////////////////////////////////////////// EXIT_CODE=0 - #File paths + # File paths FP_SETTINGS='/DietPi/dietpi/.dietpi-sync_settings' FP_FILTER_INCLUDE_EXCLUDE='.dietpi-sync_include_exclude' FP_USER_FILTER_INCLUDE_EXCLUDE='/DietPi/dietpi/.dietpi-sync_inc_exc' @@ -47,13 +47,13 @@ FP_SOURCE='/mnt/source' FP_TARGET='/mnt/target' - #Extra settings + # Extra settings SYNC_DELETE_MODE=0 SYNC_CRONDAILY=0 Create_Filter_Include_Exclude(){ - #Exclude files by name + # Exclude files by name cat << _EOF_ > $FP_FILTER_INCLUDE_EXCLUDE - $FP_LOG - $FP_FILTER_INCLUDE_EXCLUDE @@ -66,7 +66,7 @@ - System Volume Information # causes error code 23 (permission denied) _EOF_ - #Exclude specific files/dirs by path + # Exclude specific files/dirs by path local aexclude=( "$FP_TARGET" @@ -87,7 +87,7 @@ _EOF_ unset aexclude - #Add users additional list + # Add users additional list [[ -f $FP_USER_FILTER_INCLUDE_EXCLUDE ]] && cat $FP_USER_FILTER_INCLUDE_EXCLUDE >> $FP_FILTER_INCLUDE_EXCLUDE } @@ -117,7 +117,7 @@ _EOF_ #Error: Empty source dir elif [[ ! $(ls -A "$FP_SOURCE") ]]; then - + G_WHIP_MSG "[FAILED] The chosen source directory is empty: $FP_SOURCE\n\nPlease check it's path and in case verify that it's mount is active." # Log to target dir directly, preserve previous rsync log echo "$(date +"%d-%m-%Y_%T") [FAILED] The chosen source directory is empty: $FP_SOURCE" >> "$FP_TARGET/$FP_LOG" diff --git a/dietpi/func/dietpi-benchmark b/dietpi/func/dietpi-benchmark index fd91163324..e9e4aa07e4 100644 --- a/dietpi/func/dietpi-benchmark +++ b/dietpi/func/dietpi-benchmark @@ -132,7 +132,6 @@ do done - Run_Bench(){ while (( \${aStart_Int[\$1]} < \${aEnd_Int[\$1]} )) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index dc196b711c..553d137f15 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -2042,7 +2042,7 @@ $logfile_content #----------------------------------------------------------------------------------- # Not yet compatible with dietpi global commands. single bash commands only with no error handling. G_THREADING_ENABLED=${G_THREADING_ENABLED:-1} - + G_THREAD_START(){ # - Launch as BG process diff --git a/dietpi/func/dietpi-led_control b/dietpi/func/dietpi-led_control index 46229ad2db..043125fd54 100644 --- a/dietpi/func/dietpi-led_control +++ b/dietpi/func/dietpi-led_control @@ -64,7 +64,6 @@ for ((i=0; i<${#aLED_NAME[@]}; i++)) do - echo "${aLED_SETTING_CURRENT[$i]}" > "/sys/class/leds/${aLED_NAME[$i]}/trigger" if (( $? == 0 )); then diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 4f7b10b0d4..1c189109fb 100644 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -22,7 +22,6 @@ $FP_SCRIPT apt-cache clean|reset|cache|lists|archives [disable|ram|disk] $FP_SCRIPT ntpd-mode [0-4] Time sync modes: 0=custom|1=boot|2=boot+daily|3=boot+hourly|4=daemon+drift $FP_SCRIPT verify_dietpi.txt Verifies dietpi.txt entries, adds missing entries if required $FP_SCRIPT passwords NULL=Prompt user to change DietPi related passwords | X=optional set X as global password for future dietpi-software installations and \"root\" + \"dietpi\" login passwords. -$FP_SCRIPT setpermissions Applies required filesystem permissions to DietPi specific content, and, DietPi userdata directory for software installs " #//////////////////////////////////// # Grab inputs @@ -365,181 +364,6 @@ _EOF_ } - #///////////////////////////////////////////////////////////////////////////////////// - # Setpermissions_Main - #///////////////////////////////////////////////////////////////////////////////////// - Setpermissions_Main(){ - - # Failsafe, assure /var/tmp 1777 permissions: https://github.com/MichaIng/DietPi/issues/1144#issuecomment-425758727 - chmod 1777 /var/tmp - - # DietPi-Software secure global_pw encrypted - chown root:root /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin - chmod 600 /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin - - # Webserver - chown -R www-data:www-data /var/www - chmod -R 775 /var/www - - # Apply non-root permissions for files and folders in G_FP_DIETPI_USERDATA - # - dietpi user - # Include symlinked locations via $G_FP_DIETPI_USERDATA/* - chown -R dietpi:dietpi /home/dietpi $G_FP_DIETPI_USERDATA $G_FP_DIETPI_USERDATA/* - chmod -R 775 $G_FP_DIETPI_USERDATA $G_FP_DIETPI_USERDATA/* - - # Apply program specific permissions - # - NB: Following should be ordered ascending by index to prevent dupes. - # - Desktops - chown -R 775 /var/lib/dietpi/dietpi-software/installed/desktop - # Set execute to prevent "untrusted" prompt in Mate, and possibily other desktops. - chmod +x /usr/share/applications/* - chmod +x /root/Desktop/* - - # - O!MPD, requires write permissions for database, streaming and downloading - chmod -R 777 /var/www/ompd/{tmp,stream,cache} - - # - MPD - chmod 0664 /var/log/mpd/mpd.log /etc/mpd.conf - chmod -R 775 /var/lib/mpd $G_FP_DIETPI_USERDATA/.mpd_cache - chown -R mpd:dietpi /etc/mpd.conf /var/log/mpd $G_FP_DIETPI_USERDATA/.mpd_cache /var/lib/mpd - - # - myMPD - chown -R mympd:dietpi /var/lib/mympd - - # - Mopidy - chown -R mopidy:root $G_FP_DIETPI_USERDATA/mopidy - - # - Minidlna - chown -R minidlna:dietpi $G_FP_DIETPI_USERDATA/.MiniDLNA_Cache - - # - AirSonic - chown -R airsonic:dietpi $G_FP_DIETPI_USERDATA/airsonic - - # - MySQL data store - chown -R mysql:mysql $G_FP_DIETPI_USERDATA/mysql - chmod -R 770 $G_FP_DIETPI_USERDATA/mysql - - # - UrBackup - chown -R urbackup:urbackup $G_FP_DIETPI_USERDATA/urbackup - - # - www-data - chown -R www-data:www-data $G_FP_DIETPI_USERDATA/rpicam - chown -R www-data:www-data $G_FP_DIETPI_USERDATA/pydio_data - - local datadir=$(grep -m1 '^[[:blank:]]*SOFTWARE_OWNCLOUD_DATADIR=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') - [[ $datadir ]] || datadir="$G_FP_DIETPI_USERDATA/owncloud_data" - chown -R www-data:www-data "$datadir" - - datadir=$(grep -m1 '^[[:blank:]]*SOFTWARE_NEXTCLOUD_DATADIR=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') - [[ $datadir ]] || datadir="$G_FP_DIETPI_USERDATA/nextcloud_data" - chown -R www-data:www-data "$datadir" - - # - Home Assistant Permissions - #chown -R homeassistant:dietpi /home/homeassistant/.homeassistant - #chown -R dietpi:dietpi $G_FP_DIETPI_USERDATA/homeassistant - - # - Minio - chown -R minio-user:minio-user $G_FP_DIETPI_USERDATA/minio-data - - # - FuguHub - chown -R bd:bd $G_FP_DIETPI_USERDATA/fuguhub-data/ - - # - Nodered - chown -R nodered:nodered $G_FP_DIETPI_USERDATA/node-red - - # - grafana - chown -R grafana:grafana $G_FP_DIETPI_USERDATA/grafana /var/lib/grafana - - # - influxDB - chown -R influxdb:influxdb $G_FP_DIETPI_USERDATA/influxdb - - # - gogs - chown -R gogs:gogs /etc/gogs $G_FP_DIETPI_USERDATA/gogs-repo /var/log/gogs - - # - ubooquity - chown -R ubooquity:dietpi $G_FP_DIETPI_USERDATA/ubooquity - - # - Mineos - chown -R mineos:dietpi $G_FP_DIETPI_USERDATA/mineos /var/games/minecraft /etc/ssl/certs/mineos* - - # - cubrite - chown -R cuberite:dietpi $G_FP_DIETPI_USERDATA/cubrite - - # - sickrage # pre-v6.20 compatibility - [[ -d $G_FP_DIETPI_USERDATA/sickrage ]] && chown -R sickrage:dietpi $G_FP_DIETPI_USERDATA/sickrage - [[ -f '/var/log/sickrage.log' ]] && chown sickrage:dietpi /var/log/sickrage.log - - # - Medusa - chown -R medusa:dietpi $G_FP_DIETPI_USERDATA/medusa - - # - Sonarr - chown -R sonarr:dietpi $G_FP_DIETPI_USERDATA/sonarr /opt/NzbDrone /var/log/sonarr - - # - Radarr - chown -R radarr:dietpi $G_FP_DIETPI_USERDATA/radarr /opt/Radarr /var/log/radarr - - # - Lidarr - chown -R lidarr:dietpi $G_FP_DIETPI_USERDATA/lidarr /opt/Lidarr /var/log/lidarr - - # - Tonido - chown -R tonido:dietpi $G_FP_DIETPI_USERDATA/tonido /home/tonido - - # - NZBget - chown -R nzbget:dietpi $G_FP_DIETPI_USERDATA/nzbget - - # - Roon Bridge - chown -R roon:dietpi $G_FP_DIETPI_USERDATA/roon $G_FP_DIETPI_USERDATA/roonserver /var/log/roon - - # - GMrender - chown gmrender:dietpi /var/log/gmrender.log - - # - PlexPy - chown -R plexpy:plexpy /opt/plexpy - chown -R plexpy:dietpi $G_FP_DIETPI_USERDATA/plexpy - - # - Deluge - chown -R debian-deluged:debian-deluged $G_FP_DIETPI_USERDATA/deluge - chown -R debian-deluged /var/log/deluged - - # - Jackett - chown -R jackett:jackett /opt/jackett - - # - Koel - chown -R koel:dietpi $G_FP_DIETPI_USERDATA/koel - - # - qBitTorrent - chown -R qbittorrent:dietpi /home/qbittorrent - - # - rTorrent - chown -R rtorrent:rtorrent $G_FP_DIETPI_USERDATA/rtorrent $G_FP_DIETPI_USERDATA/downloads/.session - # ruTorrent web access - chown www-data:www-data /etc/.rutorrent-htaccess - chmod 400 /etc/.rutorrent-htaccess - - # - FAHClient (Folding@Home) - chown -R fahclient:dietpi $G_FP_DIETPI_USERDATA/fahclient /var/log/fahclient.log - - # - Sabnzbd - chown -R sabnzbd:sabnzbd /etc/sabnzbd /var/log/sabnzbd $G_FP_DIETPI_USERDATA/downloads/sabnzbd* - chown -R sabnzbd:dietpi $G_FP_DIETPI_USERDATA/downloads/{,in}complete - - # - Blynk - chown -R blynk:dietpi $G_FP_DIETPI_USERDATA/blynk /var/log/blynk - - # - Mycroft AI - chown -R mycroft:mycroft $G_FP_DIETPI_USERDATA/mycroft-core /etc/mycroft $G_FP_DIETPI_USERDATA/mycroft-data /var/log/mycroft - - # - Pi-hole - # - NB: Git requies special permissions to allow "pihole -up". - if [[ -d '/var/www/html/pihole' ]]; then - - cd /var/www/html/admin && git reset --hard HEAD - cd /tmp/$G_PROGRAM_NAME - - fi - - } - #///////////////////////////////////////////////////////////////////////////////////// # Users #///////////////////////////////////////////////////////////////////////////////////// @@ -697,7 +521,8 @@ It is highly recommended to change this password, ideally, it should be differen (( $G_DISTRO > 4 )) && pbkdf2='-iter 10000' openssl enc -e -a -md sha256 -aes-256-cbc $pbkdf2 -salt -pass pass:'DietPiRocks!' -out /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin <<< $pw_dietpi_software - Setpermissions_Main &> /dev/null + chown root:root /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin + chmod 600 /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin G_DIETPI-NOTIFY 2 'Global software password successfully changed' @@ -757,10 +582,6 @@ It is highly recommended to change this password, ideally, it should be differen Passwords_Main - elif [[ $INPUT_MODE_NAME == 'setpermissions' ]]; then - - Setpermissions_Main &> /dev/null # As no file existence checks are done, hide output - else Unknown_Input_Name diff --git a/dietpi/func/dietpi-set_userdata b/dietpi/func/dietpi-set_userdata index 5467269b97..bb3a58fdc4 100644 --- a/dietpi/func/dietpi-set_userdata +++ b/dietpi/func/dietpi-set_userdata @@ -36,26 +36,26 @@ Run_Move_Data(){ - # - Stop all running services + # Stop all running services /DietPi/dietpi/dietpi-services stop - # - Copy source to target, if it contains any files/folders + # Copy source to target, if it contains any files/folders if [[ -z $(find $SOURCE_DIRECTORY -maxdepth 0 -empty) ]]; then G_DIETPI-NOTIFY 0 "Moving your existing data from $SOURCE_DIRECTORY to $TARGET_DIRECTORY" G_DIETPI-NOTIFY 2 'Please wait...\n' - # - Begin transfer + # Begin transfer if cp -a "$SOURCE_DIRECTORY"/. "$TARGET_DIRECTORY"/; then - # - Remove source + # Remove source rm -R "$SOURCE_DIRECTORY" - # - Create symlink to G_FP_DIETPI_USERDATA if required + # Create symlink to G_FP_DIETPI_USERDATA if required if [[ $TARGET_DIRECTORY != $G_FP_DIETPI_USERDATA ]]; then - rm -R $G_FP_DIETPI_USERDATA &> /dev/null - ln -sf "$TARGET_DIRECTORY" $G_FP_DIETPI_USERDATA + rm -Rf $G_FP_DIETPI_USERDATA + ln -s "$TARGET_DIRECTORY" $G_FP_DIETPI_USERDATA fi @@ -63,17 +63,14 @@ else - LOGFILE_OUTPUT_TEXT="ERROR: Failed to copy $SOURCE_DIRECTORY/* to $TARGET_DIRECTORY." + LOGFILE_OUTPUT_TEXT="ERROR: Failed to copy $SOURCE_DIRECTORY/ to $TARGET_DIRECTORY." EXIT_CODE=1 fi fi - # - Set permissions - /DietPi/dietpi/func/dietpi-set_software setpermissions - - # - Start services back up again + # Start services back up again /DietPi/dietpi/dietpi-services start } @@ -120,7 +117,7 @@ else # - Remove $G_FP_DIETPI_USERDATA symlink, if chosen as target - [[ $TARGET_DIRECTORY == $G_FP_DIETPI_USERDATA ]] && rm $G_FP_DIETPI_USERDATA &> /dev/null + [[ $TARGET_DIRECTORY == $G_FP_DIETPI_USERDATA && -L $G_FP_DIETPI_USERDATA ]] && rm $G_FP_DIETPI_USERDATA mkdir -p "$TARGET_DIRECTORY" # - Ensure we can create, write and set permissions to target directory @@ -156,19 +153,19 @@ [[ -f $FP_LOGFILE ]] && rm $FP_LOGFILE if [[ $LOGFILE_OUTPUT_TEXT ]]; then - # - Error + # Error if (( $EXIT_CODE )); then G_DIETPI-NOTIFY 1 "$LOGFILE_OUTPUT_TEXT" - # - Info + # Info else G_DIETPI-NOTIFY 2 "$LOGFILE_OUTPUT_TEXT" fi - # + Send to logfile + # Send to logfile echo -e "$LOGFILE_OUTPUT_TEXT" > $FP_LOGFILE fi diff --git a/dietpi/misc/dietpi-justboom b/dietpi/misc/dietpi-justboom index 4827f4c2ed..a0a4b84062 100644 --- a/dietpi/misc/dietpi-justboom +++ b/dietpi/misc/dietpi-justboom @@ -66,7 +66,6 @@ Please select a soundcard via 'dietpi-config' or install ALSA, or ideally an aud Reset_Globals(){ - # ALSA EQ levels [[ -f '/root/.alsaequal.bin' ]] && rm /root/.alsaequal.bin diff --git a/dietpi/patch_file b/dietpi/patch_file index 380efd038a..f5b39b4c00 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -854,7 +854,8 @@ _EOF_ unset pw_dietpi_software fi - /DietPi/dietpi/func/dietpi-set_software setpermissions + chown root:root /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin + chmod 600 /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin #------------------------------------------------------------------------------- #BruteFIR removal sed -i '/^aSOFTWARE_INSTALL_STATE\[38\]=/c\aSOFTWARE_INSTALL_STATE\[38\]=0' /DietPi/dietpi/.installed &> /dev/null diff --git a/dietpi/pre-patch_file b/dietpi/pre-patch_file index 650e2b6794..cfaa21e1ec 100644 --- a/dietpi/pre-patch_file +++ b/dietpi/pre-patch_file @@ -59,7 +59,7 @@ sed -i '/innodb_large_prefix/d' /etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf || { EXIT_CODE=2; break; } sed -i '/innodb_file_format/d' /etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf || { EXIT_CODE=2; break; } - fi + fi #------------------------------------------------------------------------------- # Pre-patch 3: https://github.com/MichaIng/DietPi/issues/2213 if (( $G_DIETPI_VERSION_SUB < 22 )) && diff --git a/rootfs/etc/bashrc.d/dietpi.bash b/rootfs/etc/bashrc.d/dietpi.bash index 2e1dba629b..4d1289e2a1 100644 --- a/rootfs/etc/bashrc.d/dietpi.bash +++ b/rootfs/etc/bashrc.d/dietpi.bash @@ -33,7 +33,7 @@ fi - # Workaround if SSH client sets an unsupported $TERM string: https://github.com/MichaIng/DietPi/issues/2034 + # Workaround if SSH client sets an unsupported $TERM string: https://github.com/MichaIng/DietPi/issues/2034 if [[ $SSH_TTY ]] && ! toe -a | grep -q "^$TERM[[:blank:]]"; then TERM_old=$TERM diff --git a/rootfs/var/lib/dietpi/dietpi-software/conf/cava.conf b/rootfs/var/lib/dietpi/dietpi-software/conf/cava.conf index 90974c4d5f..85e3ab284b 100644 --- a/rootfs/var/lib/dietpi/dietpi-software/conf/cava.conf +++ b/rootfs/var/lib/dietpi/dietpi-software/conf/cava.conf @@ -1,11 +1,10 @@ ## Configuration file for CAVA. Default values are commented out. Use either ';' or '#' for commenting. - [general] # Smoothing mode. Can be 'normal', 'scientific' or 'waves'. DEPRECATED as of 0.6.0 ; mode = normal - + # Accepts only non-negative values. ; framerate = 60 @@ -25,7 +24,6 @@ ; bar_width = 2 ; bar_spacing = 1 - # Lower and higher cutoff frequencies for lowest and highest bars # the bandwidth of the visualizer. # Note: there is a minimum total bandwidth of 43Mhz x number of bars. @@ -33,8 +31,6 @@ ; lower_cutoff_freq = 50 ; higher_cutoff_freq = 10000 - - [input] # Audio capturing method. Possible methods are: 'pulse', 'alsa' or 'fifo'. @@ -45,7 +41,7 @@ # # For pulseaudio 'source' will be the source. Default: 'auto', which uses the monitor source of the default sink # (all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them). -# +# # For alsa 'source' will be the capture device. # For fifo 'source' will be the path to fifo-file. ; method = pulse @@ -57,12 +53,10 @@ method = fifo source = /tmp/mpd.fifo - - [output] -# Ouput method. Can be 'ncurses', 'noncurses' or 'raw'. -# 'noncurses' is for systems that does not suport ncurses. +# Output method. Can be 'ncurses', 'noncurses' or 'raw'. +# 'noncurses' is for systems that do not support ncurses. # 'raw' is a 16 bit data stream of the bar heights that can be used to send to other applications. # 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above. ; method = ncurses @@ -89,8 +83,6 @@ source = /tmp/mpd.fifo ; bar_delimiter = 59 ; frame_delimiter = 10 - - [color] # Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow. @@ -106,15 +98,13 @@ source = /tmp/mpd.fifo ; gradient_color_1 = '#0099ff' ; gradient_color_2 = '#ff3399' - - [smoothing] # Percentage value for integral smoothing. Takes values from 0 - 100. # Higher values means smoother, but less precise. 0 to disable. ; integral = 70 -# Disables or enables the so-called "Monstercat smoothing" with or without "waves". Set to 0 to disable. +# Disables or enables the so-called "Monstercat smoothing" with or without "waves". Set to 0 to disable. ; monstercat = 1 ; waves = 0; @@ -126,7 +116,6 @@ source = /tmp/mpd.fifo # In bar height, bars that would have been lower that this will not be drawn. ; ignore = 0 - [eq] # This one is tricky. You can have as much keys as you want. diff --git a/rootfs/var/lib/dietpi/services/dietpi-wifi-monitor.sh b/rootfs/var/lib/dietpi/services/dietpi-wifi-monitor.sh index 63c321c49e..e14adcbf8e 100644 --- a/rootfs/var/lib/dietpi/services/dietpi-wifi-monitor.sh +++ b/rootfs/var/lib/dietpi/services/dietpi-wifi-monitor.sh @@ -20,7 +20,7 @@ # Check for valid WiFi adapter [[ -e /sys/class/net/$ADAPTER ]] || { echo "ERROR: No valid WiFi adapter found on interface: $ADAPTER. Exiting..."; exit 1; } - echo "Checking connnection for: $ADAPTER via ping to default gateway every $TICKRATE seconds" + echo "Checking connection for: $ADAPTER via ping to default gateway every $TICKRATE seconds" while : do @@ -28,7 +28,7 @@ # - Get current gateway for ping URL_PING=$(ip r s 0.0.0.0/0 dev $ADAPTER | mawk '{print $3}') - [[ $G_DEBUG == 1 ]] && echo "Checking connnection for: $ADAPTER via ping to $URL_PING" + [[ $G_DEBUG == 1 ]] && echo "Checking connection for: $ADAPTER via ping to $URL_PING" if ping -qI $ADAPTER -c 1 $URL_PING &> /dev/null; then [[ $G_DEBUG == 1 ]] && echo "Connection valid for: $ADAPTER" From 7c30557e0bd68d8394542d84c2e9de77f70e3a26 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sat, 10 Aug 2019 17:35:37 +0200 Subject: [PATCH 084/184] v6.26 + DietPi-Software | Apply 775 permissions to userdata content dirs as well, since software titles in dietpi group must have permissions to create new downloads or media files. --- dietpi/dietpi-software | 1 + 1 file changed, 1 insertion(+) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 5f9b657b81..b88b7f57dc 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -2917,6 +2917,7 @@ Package: *php7.3*\nPin: release *\nPin-Priority: -1' > /etc/apt/preferences.d/di mkdir -p $G_FP_DIETPI_USERDATA/{$FOLDER_MUSIC,$FOLDER_PICTURES,$FOLDER_VIDEO,$FOLDER_DOWNLOADS} chown dietpi:dietpi $G_FP_DIETPI_USERDATA/{$FOLDER_MUSIC,$FOLDER_PICTURES,$FOLDER_VIDEO,$FOLDER_DOWNLOADS} + chmod 775 $G_FP_DIETPI_USERDATA/{$FOLDER_MUSIC,$FOLDER_PICTURES,$FOLDER_VIDEO,$FOLDER_DOWNLOADS} mkdir -p /var/www } From e0c240ed85f17f86eb0dc530d1f1c42eecd3c7c7 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 11 Aug 2019 22:20:50 +0200 Subject: [PATCH 085/184] v6.26 (#3050) + DietPi-Software | Plex Media Server: Remove the obsolete dev2day repo, which is offline now, via pre-patches, to avoid running into G_AGUP errors on DietPi versions prior to v6.23, e.g. during dietpi-update or dietpi-software installs. --- CHANGELOG.txt | 1 + dietpi/patch_file | 1 - dietpi/pre-patch_file | 7 +++++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index c8e53f7d20..5d1a448853 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -25,6 +25,7 @@ Bug Fixes: - DietPi-Software | OpenVPN: Resolved an issue where install failed on Debian Buster due to a new easy-rsa version with changed commands and options. Now the most recent easy-rsa is manually downloaded on all systems to generate server and client key + cert with modern methods and the client config is slightly updated to match modern settings. - DietPi-Software | XRDP: On Stretch, new the version from backports is installed. This resolves a critical issue where /etc/profile was not loaded to the session and, due to incomplete $PATH variable, important system binaries were not available on terminal emulators which broke many install and upgrade tasks. Furthermore this resolves an issue where install and connection of XRDP failed if IPv6 was disabled. Many thanks to @aspinks for the debug session which allowed us to track the issue down to its root: https://github.com/MichaIng/DietPi/issues/3017 - DietPi-Software | Sonarr: Resolved an issue where install failed due to an outdated APT repository key. Many thanks to @GregoryDosh and @GulyFMG for reporting this issue: https://github.com/MichaIng/DietPi/issues/3029 +- DietPi-Software | Plex Media Server: Resolved an issue where DietPi-Update failed for versions prior to v6.23, due to the obsolete Plex Media Server dev2day repository being offline now. This repo is now removed via pre-patches, prior to G_AGUP being called. During regular patches PMS is reinstalled, applying the new official APT repo. Many thanks to @p-roman for reporting this issue: https://github.com/MichaIng/DietPi/issues/3038 As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/XXXX diff --git a/dietpi/patch_file b/dietpi/patch_file index f5b39b4c00..4fb4e80864 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -1854,7 +1854,6 @@ Your Nextcloud data are not touched.' [[ -L '/var/subsonic/transcode' ]] && rm /var/subsonic/transcode # Plex Media Server: https://github.com/MichaIng/DietPi/pull/2722 dpkg-query -s plexmediaserver-installer &> /dev/null && dpkg -r plexmediaserver-installer - [[ -f '/etc/apt/sources.list.d/plex.list' ]] && rm /etc/apt/sources.list.d/plex.list # Logitech Media Server: https://github.com/MichaIng/DietPi/commit/eccef6700381c3f044ec4d435beb167736db0bb4 if [[ -f '/etc/systemd/system/squeezeboxserver.service' ]]; then diff --git a/dietpi/pre-patch_file b/dietpi/pre-patch_file index cfaa21e1ec..b572c14d65 100644 --- a/dietpi/pre-patch_file +++ b/dietpi/pre-patch_file @@ -155,6 +155,13 @@ _EOF_ echo -e '\e[90m[\e[0m INFO \e[90m]\e[0m Pre-patch 11 | Updating Sonarr APT repository key' apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493 || { EXIT_CODE=11; break; } + fi + # Pre-patch 12: https://github.com/MichaIng/DietPi/issues/3038 + if (( $G_DIETPI_VERSION_SUB < 23 )) && [[ -f '/etc/apt/sources.list.d/plex.list' ]] && grep -q 'dev2day' /etc/apt/sources.list.d/plex.list; then + + echo -e '\e[90m[\e[0m INFO \e[90m]\e[0m Pre-patch 12 | Removing obsolete dev2day repo for Plex Media Server, replaced by the new official APT repo' + rm /etc/apt/sources.list.d/plex.list || { EXIT_CODE=12; break; } + fi #------------------------------------------------------------------------------- # Finished From 2443d5a8ce8136d0df39062aaf04ed2b1b7af5c0 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Tue, 13 Aug 2019 02:33:22 +0200 Subject: [PATCH 086/184] v6.26 + DietPi-Login | Apply whiptail/tput dimension override for dietpi-software call, since due to STDOUT + STDERR stream redirection, tput cannot estimate correct dimensions on Debian below Buster. Compare with Run_Update call within dietpi-update. + DietPi-Login | Apply PID file removing EXIT trap only and right after creating the PID file. This is important since otherwise a second concurrent login would remove the PID file from the first login, if user interrupts. Due to EXIT trap, the file does not need to be removed anywhere else. This further assures that only the initial instance of the script can and will remove it. + DietPi-Login | Interpret non-assigned or invalid G_INTERACTIVE as interactive. Only explicit value "0" should be interpreted as non-interactive. + DietPi-Login | Minor coding --- dietpi/dietpi-login | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/dietpi/dietpi-login b/dietpi/dietpi-login index b93e5958aa..ed52175716 100644 --- a/dietpi/dietpi-login +++ b/dietpi/dietpi-login @@ -9,14 +9,10 @@ #//////////////////////////////////// # # Info: - # - Filename: /DietPi/dietpi/dietpi-login + # - Filename: /{DietPi,boot}/dietpi/dietpi-login # - Called in interactive bash shells from: /etc/bashrc.d/dietpi.bash #//////////////////////////////////// - # Import DietPi-Globals -------------------------------------------------------------- - # In main loop - # Import DietPi-Globals -------------------------------------------------------------- - #///////////////////////////////////////////////////////////////////////////////////// # Globals #///////////////////////////////////////////////////////////////////////////////////// @@ -112,17 +108,17 @@ # First Run Setup Run_DietPi_First_Run_Setup(){ - # - Set non-interactive shell if automated install chosen, as .bashrc run via STDIN check is interactive + # - Set non-interactive if automated firstrun setup has been chosen grep -qi '^[[:blank:]]*AUTO_SETUP_AUTOMATED=1' /DietPi/dietpi.txt && export G_INTERACTIVE=0 # - Prompt and wait if this script runs in other session already - local pid_firstrunsetup='' + local pid_firstrunsetup [[ -f $FP_DIETPI_FIRSTRUNSETUP_PID ]] && pid_firstrunsetup=$(<$FP_DIETPI_FIRSTRUNSETUP_PID) if [[ $pid_firstrunsetup && $pid_firstrunsetup != $$ ]]; then # - First run setup running in other session local additional_text='Please resume setup on the active screen.' - (( $G_INTERACTIVE )) || additional_text='Automated setup is in progress. When completed, the system will be rebooted.' + [[ $G_INTERACTIVE == 0 ]] && additional_text='Automated setup is in progress. When completed, the system will be rebooted.' G_WHIP_MSG "[INFO] DietPi first run setup: Currently running on another screen (PID=$pid_firstrunsetup).\n\n$additional_text" @@ -143,6 +139,8 @@ Please login again as user "root" with password "dietpi", respectively the one y # Prevent re-run from another session. echo $$ > $FP_DIETPI_FIRSTRUNSETUP_PID + # - Always remove PID file when script is killed + trap '[[ -f $FP_DIETPI_FIRSTRUNSETUP_PID ]] && rm $FP_DIETPI_FIRSTRUNSETUP_PID' EXIT Show_License @@ -162,10 +160,10 @@ Please login again as user "root" with password "dietpi", respectively the one y elif (( $G_DIETPI_INSTALL_STAGE == 1 )); then # - Start DietPi-Software + export G_WHIP_SIZE_X_OVERRIDE=$(tput cols) + export G_WHIP_SIZE_Y_OVERRIDE=$(tput lines) /DietPi/dietpi/dietpi-software 2>&1 | tee $FP_DIETPI_FIRSTRUNSETUP_LOG # Sets G_DIETPI_INSTALL_STAGE=2 - - # - Done - [[ -f $FP_DIETPI_FIRSTRUNSETUP_PID ]] && rm $FP_DIETPI_FIRSTRUNSETUP_PID + unset G_WHIP_SIZE_X_OVERRIDE G_WHIP_SIZE_Y_OVERRIDE fi @@ -192,8 +190,6 @@ Please login again as user "root" with password "dietpi", respectively the one y . /DietPi/dietpi/func/dietpi-globals G_PROGRAM_NAME='DietPi-Login' #G_INIT # To allow concurrent logins - # - Always remove PID file when script is killed - trap '[[ -f $FP_DIETPI_FIRSTRUNSETUP_PID ]] && rm $FP_DIETPI_FIRSTRUNSETUP_PID' EXIT # Import DietPi-Globals -------------------------------------------------------------- /DietPi/dietpi/func/obtain_network_details @@ -214,7 +210,7 @@ Please login again as user "root" with password "dietpi", respectively the one y #---------------------------------------------------------------- # Run DietPi-Update/DietPi-Software (1st run setup) (G_DIETPI_INSTALL_STAGE=0/1) - elif (( $G_DIETPI_INSTALL_STAGE == 0 || $G_DIETPI_INSTALL_STAGE == 1 )); then + elif [[ $G_DIETPI_INSTALL_STAGE == [01] ]]; then /DietPi/dietpi/func/dietpi-banner 0 @@ -240,7 +236,6 @@ Would you like to restart the first run setup and installation?"; then # - Reset and force re-run of first run killall -qw dietpi-software dietpi-update echo 0 > /DietPi/dietpi/.install_stage - [[ -f $FP_DIETPI_FIRSTRUNSETUP_PID ]] && rm $FP_DIETPI_FIRSTRUNSETUP_PID else From 5bd537d1d5ba6db85ce6113c48c18944ebbf914c Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Tue, 13 Aug 2019 02:46:36 +0200 Subject: [PATCH 087/184] v6.26 + CHANGELOG | DietPi-Login: Resolved an issue during first run setup, where DietPi-Software was called with mostly wrong whiptail menu dimensions --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 5d1a448853..29d74ab2b5 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -18,6 +18,7 @@ Changes / Improvements / Optimisations: Bug Fixes: - General | Removed an obsolete OpenMediaVault cron job and binary that was leftover on at least one of our images (NanoPi NEO2) and is not part of the current OMV packages, thus save to remove in every case. Many thanks to @kt1024 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2994 - General | Resolved an issue where install of required APT packages for certain scripts could fail in the rare case that APT lists are outdated and old packages are not available in the repo anymore. Many thanks to @Paulisper for reporting this issue: https://github.com/MichaIng/DietPi/issues/2996 +- DietPi-Login | Resolved an issue during first run setup, where DietPi-Software was called with mostly wrong whiptail menu dimensions. This lead to info prompts and menus being quite small, in particular the "Install" menu entry, that one needs to select, being only visible when navigating to the bottom. Many thanks to @pbecks1963 for reporting this issue: https://github.com/MichaIng/DietPi/issues/3053 - DietPi-Config | Resolved an issue on RPi where I2C baudrate was not applied correctly, thus selection was ineffective. Many thanks to @flashspys for reporting this issue: https://github.com/MichaIng/DietPi/issues/2966 - DietPi-Software | Gitea: Resolved an issue where install fails on ARMv7 systems. Many thanks to @maschiw for reporting this issue: https://github.com/MichaIng/DietPi/issues/2959 - DietPi-Software | Node-RED: Resolved an issue where install fails due to missing data dir creation. Many thanks to @Orfait for reporting this issue: https://github.com/MichaIng/DietPi/issues/2975 From 585f586a7cf60ec6a790ac38cd2e1b43d81d4892 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Wed, 14 Aug 2019 02:48:14 +0200 Subject: [PATCH 088/184] v6.26 + DietPi-Patch | Remove old scripts that have been removed from code source long time ago but never from updated systems --- dietpi/patch_file | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dietpi/patch_file b/dietpi/patch_file index 4fb4e80864..1f2eabf3c5 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2138,6 +2138,9 @@ A backup will be created to "/etc/mympd/mympd.conf.bak_DDMMYYY_N" from where you done #------------------------------------------------------------------------------- + # Remove old scripts that have been removed from code source long time ago but never from updated systems + rm -f /{DietPi,boot}/dietpi/func/dietpi-set_{curlftpfs,nfsclient,smbclient} + #------------------------------------------------------------------------------- # On RPi, replace haveged with rng-tools, which is proven to work on RPi, is default on Raspbian and uses less RAM on idle. if (( $G_HW_MODEL < 9 )); then From 1383b0a6aedd4ed8bb6641773311a4e343ef5b04 Mon Sep 17 00:00:00 2001 From: svh1985 Date: Wed, 14 Aug 2019 22:15:25 +0200 Subject: [PATCH 089/184] v6.26 (#3047) + DietPi-NordVPN | Only loop through .ovpn files to create the server list, in case foreign files have been added to the dir + DietPi-NordVPN | Add optional up/down script creation/edit, e.g. to implement killswitches, answer inbound connections from outside local network correctly, safe and track connection uptime, and similar things --- dietpi/misc/dietpi-nordvpn | 69 ++++++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 26 deletions(-) diff --git a/dietpi/misc/dietpi-nordvpn b/dietpi/misc/dietpi-nordvpn index 87ea008833..bf0b485def 100644 --- a/dietpi/misc/dietpi-nordvpn +++ b/dietpi/misc/dietpi-nordvpn @@ -25,6 +25,8 @@ FP_SETTINGS_DIETPI='/var/lib/dietpi/dietpi-software/installed/dietpi-nordvpn/settings_dietpi.conf' FP_SETTINGS_OVPN='/var/lib/dietpi/dietpi-software/installed/dietpi-nordvpn/settings_ovpn.conf' + FP_SETTINGS_UP='/var/lib/dietpi/dietpi-software/installed/dietpi-nordvpn/up.sh' + FP_SETTINGS_DOWN='/var/lib/dietpi/dietpi-software/installed/dietpi-nordvpn/down.sh' NORDVPN_USERNAME='' NORDVPN_PASSWORD='' NORDVPN_SERVER='' @@ -36,11 +38,7 @@ MAX_WAIT_FOR_CONNECTION=5 WAN_IP='' - Update_Wan_Ip(){ - - WAN_IP=$(curl -sLm 2 https://dietpi.com/myip.php 2>&1) - - } + Update_Wan_Ip(){ WAN_IP=$(curl -sLm 2 https://dietpi.com/myip.php 2>&1); } Init(){ @@ -71,7 +69,7 @@ Check_Connected(){ NORDVPN_CONNECTED=0 - #if systemctl status dietpi-nordvpn | grep -qi 'initialization sequence completed'; then + #systemctl status dietpi-nordvpn | grep -qi 'initialization sequence completed' ip r s dev $NET_DEV &>/dev/null && NORDVPN_CONNECTED=1 return $(( ! $NORDVPN_CONNECTED )) @@ -82,6 +80,13 @@ Save_Settings(){ + if [[ ! $NORDVPN_SERVER || ! $NORDVPN_USERNAME || ! $NORDVPN_PASSWORD ]]; then + + G_WHIP_MSG '[FAILED] You need to enter your NordVPN username + password and select a server, before settings can be applied.' + return 1 + + fi + (( $NORDVPN_SERVICE )) && systemctl stop dietpi-nordvpn cat << _EOF_ > $FP_SETTINGS_OVPN @@ -95,10 +100,15 @@ NORDVPN_PASSWORD='${NORDVPN_PASSWORD//\'/\'\\\'\'}' NORDVPN_SERVER='$NORDVPN_SERVER' PROTOCOL='$PROTOCOL' _EOF_ - G_CONFIG_INJECT 'auth-user-pass' "auth-user-pass $FP_SETTINGS_OVPN" /etc/openvpn/ovpn_$PROTOCOL/$NORDVPN_SERVER - chmod 600 $FP_SETTINGS_OVPN $FP_SETTINGS_DIETPI /etc/openvpn/ovpn_$PROTOCOL/$NORDVPN_SERVER - chown root:root $FP_SETTINGS_OVPN $FP_SETTINGS_DIETPI /etc/openvpn/ovpn_$PROTOCOL/$NORDVPN_SERVER + local fp_ovpn="/etc/openvpn/ovpn_$PROTOCOL/$NORDVPN_SERVER" + G_CONFIG_INJECT 'auth-user-pass([[:blank:]]|$)' "auth-user-pass $FP_SETTINGS_OVPN" $fp_ovpn + [[ -f $FP_SETTINGS_UP || -f $FP_SETTINGS_DOWN ]] && G_CONFIG_INJECT 'script-security[[:blank:]]' 'script-security 2' $fp_ovpn 'auth[[:blank:]]' || sed -i '/^[[:blank:]]*script-security[[:blank:]]/d' $fp_ovpn + [[ -f $FP_SETTINGS_UP ]] && G_CONFIG_INJECT 'up[[:blank:]]' "up $FP_SETTINGS_UP" $fp_ovpn 'auth[[:blank:]]' || sed -i '/^[[:blank:]]*up[[:blank:]]/d' $fp_ovpn + [[ -f $FP_SETTINGS_DOWN ]] && G_CONFIG_INJECT 'down[[:blank:]]' "down $FP_SETTINGS_DOWN" $fp_ovpn 'auth[[:blank:]]' || sed -i '/^[[:blank:]]*down[[:blank:]]/d' $fp_ovpn + + chmod 600 $FP_SETTINGS_OVPN $FP_SETTINGS_DIETPI $fp_ovpn + chown root:root $FP_SETTINGS_OVPN $FP_SETTINGS_DIETPI $fp_ovpn cat << _EOF_ > /lib/systemd/system/dietpi-nordvpn.service [Unit] @@ -106,7 +116,7 @@ Description=NordVPN (DietPi) After=network.target dietpi-boot.service [Service] -ExecStart=$(command -v openvpn) /etc/openvpn/ovpn_$PROTOCOL/$NORDVPN_SERVER +ExecStart=$(command -v openvpn) $fp_ovpn [Install] WantedBy=multi-user.target @@ -118,16 +128,10 @@ _EOF_ for (( i=1; i<=$MAX_WAIT_FOR_CONNECTION; i++ )) do - if Check_Connected; then - - break - - else + Check_Connected && break - G_DIETPI-NOTIFY 2 "Waiting for connection ($i/$MAX_WAIT_FOR_CONNECTION)" - sleep 1 - - fi + G_DIETPI-NOTIFY 2 "Waiting for connection ($i/$MAX_WAIT_FOR_CONNECTION)" + sleep 1 done @@ -166,12 +170,10 @@ _EOF_ if [[ -f /sys/class/net/$NET_DEV/statistics/rx_bytes && -f /sys/class/net/$NET_DEV/statistics/tx_bytes ]]; then net_rx_byte=$( $FP_SETTINGS_UP + nano $FP_SETTINGS_UP + (( $(stat -c %s $FP_SETTINGS_UP) )) && chmod 700 $FP_SETTINGS_UP || rm $FP_SETTINGS_UP + + elif [[ $G_WHIP_RETURNED_VALUE == 'Edit Down' ]]; then + + [[ -f $FP_SETTINGS_DOWN ]] || echo -e '#!/bin/bash\n# Clear this file completely, including line breaks, to have it removed.' > $FP_SETTINGS_DOWN + nano $FP_SETTINGS_DOWN + (( $(stat -c %s $FP_SETTINGS_DOWN) )) && chmod 700 $FP_SETTINGS_DOWN || rm $FP_SETTINGS_DOWN + elif [[ $G_WHIP_RETURNED_VALUE == 'Auto start' ]]; then if (( $autostart_enabled )); then @@ -255,7 +272,7 @@ _EOF_ G_DIETPI-NOTIFY 2 'Populating NordVPN server list, please wait...' cd /etc/openvpn/ovpn_$PROTOCOL G_WHIP_MENU_ARRAY=() - for i in * + for i in *.ovpn do G_WHIP_MENU_ARRAY+=("$i" '') @@ -264,7 +281,7 @@ _EOF_ cd /tmp/$G_PROGRAM_NAME G_WHIP_DEFAULT_ITEM=$NORDVPN_SERVER - G_WHIP_MENU 'Please select a NordVPN server to use' && NORDVPN_SERVER=$G_WHIP_RETURNED_VALUE + G_WHIP_MENU 'Please select a NordVPN server to use:' && NORDVPN_SERVER=$G_WHIP_RETURNED_VALUE fi @@ -285,7 +302,7 @@ _EOF_ while (( $TARGETMENUID >= 0 )) do - (( $TARGETMENUID == 0 )) && Menu_Main + Menu_Main done #----------------------------------------------------------------------------------- From 2209d6665c49cc43de9eb977e39667bb2d4ff6a0 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Wed, 14 Aug 2019 22:21:04 +0200 Subject: [PATCH 090/184] v6.26 + CHANGELOG | DietPi-NordVPN: Added options for connection up/down scripts + CHANGELOG | DietPi-NordVPN: Resolved an issue where the server menu could have wrong entries or even fail --- CHANGELOG.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 29d74ab2b5..4934e1dd8e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -7,6 +7,7 @@ Changes / Improvements / Optimisations: - General | DietPi scripts, i.e. dietpi-software, will not overwrite you custom permissions in /mnt/dietpi_userdata anymore. Instead required permissions are now only applied for individual software titles that are being installed. Besides saving you time to re-apply custom permission, this as well enhances security in some cases where software installers/archives apply/contain stricter per-file/dir permissions. Many thanks to @JJGO and @johnvick for suggesting this enhancement: https://github.com/MichaIng/DietPi/issues/2641 - RPi | The haveged daemon has been replaced with rng-tools, an alternative which does not work on all devices, but has been proven to work on RPi, is default on Raspbian and uses less RAM on idle. - DietPi-Globals | The environment variable $G_USER_INPUTS has been renamed to $G_INTERACTIVE, which describes better what it does. When setting this to "0", DietPi scripts will run non-interactively, i.e. all whiptail dialog prompts and other tasks that require manual user input are skipped. Note that this is not required when running scripts from cron jobs or systemd units, since those have no STDIN attached which makes DietPi scripts run non-interactively automatically. Scripts will stay backwards-compatible, thus respect $G_USER_INPUTS for a while, but please adjust your scripts or docs where you make use of it. Many thanks to @AtkLordOverAll for contributing this change: https://github.com/MichaIng/DietPi/pull/3041 +- DietPi-NordVPN | Added options for connection up/down scripts, e.g. to implement killswitches, answer inbound connections from outside local network correctly, safe and track connection uptime, and similar tasks. Many thanks to @svh1985 for implementing this feature: https://github.com/MichaIng/DietPi/pull/3047 - DietPi-Config | Audio Options: Menu has been reworked. Audio capabilities (ALSA) can be enabled and disabled as a separate option. If enabled, generic sound card auto-detection has been added to the bottom of the list for all devices. This allows the selection of generic sound devices on all SBCs, e.g. if unknown to DietPi or if our hard-coded card/device IDs are wrong due to additional attached audio hardware. - DietPi-Config | RPi: Update certain config.txt settings to match new firmware version. WiFi and Bluetooth is now disabled via related dtoverlays, which should further reduce hardware and firmware loads. - DietPi-Config | Some /etc/modprobe.d/ configs are merged to less files and mostly prefixed with "dietpi-", to allow easier differentiation between Debian/pre-image and DietPi files. @@ -19,6 +20,7 @@ Bug Fixes: - General | Removed an obsolete OpenMediaVault cron job and binary that was leftover on at least one of our images (NanoPi NEO2) and is not part of the current OMV packages, thus save to remove in every case. Many thanks to @kt1024 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2994 - General | Resolved an issue where install of required APT packages for certain scripts could fail in the rare case that APT lists are outdated and old packages are not available in the repo anymore. Many thanks to @Paulisper for reporting this issue: https://github.com/MichaIng/DietPi/issues/2996 - DietPi-Login | Resolved an issue during first run setup, where DietPi-Software was called with mostly wrong whiptail menu dimensions. This lead to info prompts and menus being quite small, in particular the "Install" menu entry, that one needs to select, being only visible when navigating to the bottom. Many thanks to @pbecks1963 for reporting this issue: https://github.com/MichaIng/DietPi/issues/3053 +- DietPi-NordVPN | Resolved an issue where the server menu could have wrong entries or even fail, if foreign files were placed inside the config directory. Many thanks to @svh1985 for reporting this issue and implementing a fix: https://github.com/MichaIng/DietPi/pull/3047 - DietPi-Config | Resolved an issue on RPi where I2C baudrate was not applied correctly, thus selection was ineffective. Many thanks to @flashspys for reporting this issue: https://github.com/MichaIng/DietPi/issues/2966 - DietPi-Software | Gitea: Resolved an issue where install fails on ARMv7 systems. Many thanks to @maschiw for reporting this issue: https://github.com/MichaIng/DietPi/issues/2959 - DietPi-Software | Node-RED: Resolved an issue where install fails due to missing data dir creation. Many thanks to @Orfait for reporting this issue: https://github.com/MichaIng/DietPi/issues/2975 From 8aaf74b299473d728eec4f7772daa9920091ee89 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 18 Aug 2019 19:27:54 +0200 Subject: [PATCH 091/184] v6.26 + DietPi-Config | Minor menu consistency --- dietpi/dietpi-config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 4c62514c90..55679a7c6a 100644 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1385,8 +1385,8 @@ NB: You now need to run "apt update" or "G_AGUP" once after each reboot, before G_WHIP_MENU_ARRAY=( - 'Emulated' 'Use "fake-hwclock" to apply system clock on early boot' - 'Hardware' 'Device has an active hardware RTC, purge "fake-hwclock"' + 'Emulated' ': Use "fake-hwclock" to apply system clock on early boot' + 'Hardware' ': Device has an active hardware RTC, purge "fake-hwclock"' ) @@ -2000,8 +2000,8 @@ Current setting: $user_frequency_min_text" && G_CONFIG_INJECT 'CONFIG_CPU_MIN_FR G_WHIP_MENU_ARRAY=( - 'Headless' 'HDMI: Disabled | VPU: Disabled | +300MB RAM' - 'Default' 'HDMI: Enabled | VPU: Enabled | -300MB RAM' + 'Headless' ': HDMI: Disabled | VPU: Disabled | +300MB RAM' + 'Default' ': HDMI: Enabled | VPU: Enabled | -300MB RAM' ) From ea8be1ff4bf6f27128a7000da3c60949f602ccde Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sun, 18 Aug 2019 19:37:57 +0200 Subject: [PATCH 092/184] v6.26 + DietPi-FirstBoot | Since Bullseye dropbear-run is transitional meta package for dropbear, which we thus install directly instead --- rootfs/var/lib/dietpi/services/dietpi-firstboot.bash | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash b/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash index dfbf036b5e..276af5942f 100755 --- a/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash +++ b/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash @@ -188,7 +188,15 @@ # Regenerate unique Dropbear host keys: rm -f /etc/dropbear/*_host_key - dpkg-reconfigure -f noninteractive dropbear-run + if (( $G_DISTRO < 6 )); then + + dpkg-reconfigure -f noninteractive dropbear-run + + else + + dpkg-reconfigure -f noninteractive dropbear + + fi # Recreate machine-id: https://github.com/MichaIng/DietPi/issues/2015 [[ -f '/etc/machine-id' ]] && rm /etc/machine-id From b4cb3512b02e516af02620add81503523242b39a Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Mon, 19 Aug 2019 22:23:24 +0200 Subject: [PATCH 093/184] v6.26 + DietPi-Services | Replace $INPUT_SERVICE with "0", if set, when adding to Apply_Service_State(), since it expects an index and not a name. Load_Service_Array() applies any given $INPUT_SERVICE as only array entry (index 0). This passed testing, since any non-integer array index is interpreted as "0" automatically. Only when special characters, like a dot, are contained, the array call throws an error. + DietPi-Services | Explain function input arguments a tiny bit more --- dietpi/dietpi-services | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dietpi/dietpi-services b/dietpi/dietpi-services index d7bd68c4b4..5b66dd25f0 100644 --- a/dietpi/dietpi-services +++ b/dietpi/dietpi-services @@ -354,12 +354,12 @@ _EOF_ } # $1 = command - # $2 = service + # $2 = service name # $3 = exit code Print_Status(){ G_DIETPI-NOTIFY ${3/[^0]*/1} "$1 : $2"; } # $1 = command (start/stop/restart) - # $2 = index (optional) + # $2 = service index (optional) Set_Running_State(){ local command=${1,,} @@ -419,7 +419,7 @@ _EOF_ } # $1 = command - # $2 = index (optional) + # $2 = service index (optional) Apply_Service_State(){ local command=${1,,} @@ -509,7 +509,7 @@ _EOF_ #///////////////////////////////////////////////////////////////////////////////////// # Process Tool #///////////////////////////////////////////////////////////////////////////////////// - # $1=index + # $1 = service index Prepare_Service_Dropin(){ local index=$1 @@ -540,9 +540,9 @@ If you experience any issues with the wrapper, remove the file, reload and resta } - # $1=index - # $2=setting (reset=reset ALL settings, 0=CPUAffinity, 1=CPUSchedulingPolicy, 2=Nice, 3=CPUSchedulingPriority, 4=IOSchedulingClass, 5=IOSchedulingPriority) - # $3=value (reset=reset $2 setting) + # $1 = service index + # $2 = setting (reset=reset ALL settings, 0=CPUAffinity, 1=CPUSchedulingPolicy, 2=Nice, 3=CPUSchedulingPriority, 4=IOSchedulingClass, 5=IOSchedulingPriority) + # $3 = value (reset=reset $2 setting) FP_PROCESS_TOOL_CONF='dietpi-process_tool.conf' Apply_Process_Tool(){ @@ -598,7 +598,7 @@ If you experience any issues with the wrapper, remove the file, reload and resta } - # $1=index + # $1 = service index Load_Process_Tool(){ local index=$1 @@ -1278,7 +1278,7 @@ NB: This only has an effect on drives handled by the CFQ scheduler."; then [[ $INPUT_SERVICE && ! ${aSERVICE_NAME[0]} ]] && { G_DIETPI-NOTIFY 1 "Service ($INPUT_SERVICE) could not be found."; exit 1; } G_DIETPI-NOTIFY 3 "$G_PROGRAM_NAME" "$INPUT_CMD $INPUT_SERVICE" - Apply_Service_State $INPUT_CMD $INPUT_SERVICE + Apply_Service_State $INPUT_CMD ${INPUT_SERVICE+0} # Load_Service_Array will add INPUT_SERVICE as index 0, if given #----------------------------------------------------------------------------------- # Men You! From 52bb2a659928f8aec0e9e2058fb84e7132f5de3e Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Mon, 19 Aug 2019 22:27:14 +0200 Subject: [PATCH 094/184] v6.26 + CHANGELOG | DietPi-Services: Resolved an issue where single service calls failed if their names contain certain special characters, like dots --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4934e1dd8e..932f8542b8 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -21,6 +21,7 @@ Bug Fixes: - General | Resolved an issue where install of required APT packages for certain scripts could fail in the rare case that APT lists are outdated and old packages are not available in the repo anymore. Many thanks to @Paulisper for reporting this issue: https://github.com/MichaIng/DietPi/issues/2996 - DietPi-Login | Resolved an issue during first run setup, where DietPi-Software was called with mostly wrong whiptail menu dimensions. This lead to info prompts and menus being quite small, in particular the "Install" menu entry, that one needs to select, being only visible when navigating to the bottom. Many thanks to @pbecks1963 for reporting this issue: https://github.com/MichaIng/DietPi/issues/3053 - DietPi-NordVPN | Resolved an issue where the server menu could have wrong entries or even fail, if foreign files were placed inside the config directory. Many thanks to @svh1985 for reporting this issue and implementing a fix: https://github.com/MichaIng/DietPi/pull/3047 +- DietPi-Services | Resolved an issue where single service calls failed if their names contain certain special characters, like dots. Many thanks to @maartenlangeveld for reporting this issue: https://github.com/MichaIng/DietPi/issues/3059 - DietPi-Config | Resolved an issue on RPi where I2C baudrate was not applied correctly, thus selection was ineffective. Many thanks to @flashspys for reporting this issue: https://github.com/MichaIng/DietPi/issues/2966 - DietPi-Software | Gitea: Resolved an issue where install fails on ARMv7 systems. Many thanks to @maschiw for reporting this issue: https://github.com/MichaIng/DietPi/issues/2959 - DietPi-Software | Node-RED: Resolved an issue where install fails due to missing data dir creation. Many thanks to @Orfait for reporting this issue: https://github.com/MichaIng/DietPi/issues/2975 From 9193d7834c7b3793600c322462b41ed0f9b4544e Mon Sep 17 00:00:00 2001 From: Atk Date: Mon, 19 Aug 2019 22:11:16 +0100 Subject: [PATCH 095/184] v6.26 (#3054) + DietPi-Software | Pi-hole: Block access to blocking page from web by default and offer to do the same for admin panel during install --- .conf/dps_93/lighttpd.block_nonlocal_admin.conf | 6 ++++++ .conf/dps_93/lighttpd.pihole.conf | 9 +++++++++ dietpi/dietpi-software | 11 +++++++++++ 3 files changed, 26 insertions(+) create mode 100644 .conf/dps_93/lighttpd.block_nonlocal_admin.conf diff --git a/.conf/dps_93/lighttpd.block_nonlocal_admin.conf b/.conf/dps_93/lighttpd.block_nonlocal_admin.conf new file mode 100644 index 0000000000..d00f5722d2 --- /dev/null +++ b/.conf/dps_93/lighttpd.block_nonlocal_admin.conf @@ -0,0 +1,6 @@ +# Block non-LAN access to Pi-hole admin panel +$HTTP["url"] =~ "^(/html)?/admin(/|$)" { + $HTTP["remoteip"] !~ "^1(27|92.168|0|72.(1[6-9]|2[0-9]|3[0-1]))\." { + url.access-deny = ("") + } +} diff --git a/.conf/dps_93/lighttpd.pihole.conf b/.conf/dps_93/lighttpd.pihole.conf index a30db3bb32..134bd81579 100644 --- a/.conf/dps_93/lighttpd.pihole.conf +++ b/.conf/dps_93/lighttpd.pihole.conf @@ -18,3 +18,12 @@ $HTTP["url"] =~ "^/admin/" { $HTTP["url"] =~ "^/admin/\.(.*)" { url.access-deny = ("") } + +# If it's a request to Pi-hole blocking page... +$HTTP["url"] =~ "^(/html)?/pihole(/|$)" { + # ... and the request isn't local + $HTTP["remoteip"] !~ "^1(27|92.168|0|72.(1[6-9]|2[0-9]|3[0-1]))\." { + # block! + url.access-deny = ("") + } +} diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index b88b7f57dc..ea41fbd23f 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8756,6 +8756,17 @@ _EOF_ dps_index=$software_id Download_Install 'lighttpd.pihole.conf' /etc/lighttpd/conf-available/99-dietpi-pihole.conf lighttpd-enable-mod dietpi-pihole + # Ask user if they want to block report access to the admin page + dps_index=$software_id Download_Install 'lighttpd.block_nonlocal_admin.conf' /etc/lighttpd/conf-available/99-dietpi-pihole-block_nonlocal_admin.conf + + G_WHIP_BUTTON_OK_TEXT='YES' + G_WHIP_BUTTON_CANCEL_TEXT='NO' + G_WHIP_YESNO "In order to increase security, it is recommended that you block remote access to the Pi-hole admin panel, so that unless you're on a local network, the Pi-hole admin panel isn't accessible.\n +You can always enable/disable this at a later point using the commands: + - lighttpd-enable-mod dietpi-pihole-block_nonlocal_admin + - lighttpd-disable-mod dietpi-pihole-block_nonlocal_admin\n +Do you want to block remote access to the admin panel now?" && lighttpd-enable-mod dietpi-pihole-block_nonlocal_admin + fi # Create symlinks to align Pi-hole admin and blocking page relative to webroot From 26681c3d91dc158736da8397bbba98bfa2a72786 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Mon, 19 Aug 2019 23:18:55 +0200 Subject: [PATCH 096/184] v6.26 + DietPi-Software | Certbot: Avoid installing the transitional dummy packages for Nginx and Apache modules, instead use the python3 packages directly. --- dietpi/dietpi-software | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index ea41fbd23f..880ead4cbe 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3290,7 +3290,7 @@ _EOF_ Banner_Installing local package_list='apache2' # - Install certbot module on Stretch+, if certbot was already installed - (( ${aSOFTWARE_INSTALL_STATE[92]} == 2 )) && package_list+=' python-certbot-apache' + (( ${aSOFTWARE_INSTALL_STATE[92]} == 2 )) && package_list+=' python3-certbot-apache' G_AGI $package_list fi @@ -3301,7 +3301,7 @@ _EOF_ Banner_Installing local package_list='nginx-light' # - Install certbot module on Stretch+, if certbot was already installed - (( ${aSOFTWARE_INSTALL_STATE[92]} == 2 )) && package_list+=' python-certbot-nginx' + (( ${aSOFTWARE_INSTALL_STATE[92]} == 2 )) && package_list+=' python3-certbot-nginx' G_AGI $package_list fi @@ -4764,11 +4764,11 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior if (( ${aSOFTWARE_INSTALL_STATE[83]} > 0 )); then - G_AGI certbot python-certbot-apache + G_AGI certbot python3-certbot-apache elif (( ${aSOFTWARE_INSTALL_STATE[85]} > 0 )); then - G_AGI certbot python-certbot-nginx + G_AGI certbot python3-certbot-nginx else @@ -13433,7 +13433,7 @@ _EOF_ if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then Banner_Uninstalling - G_AGP python-certbot-apache python-certbot-nginx certbot + G_AGP python3-certbot-apache python3-certbot-nginx certbot [[ -f '/etc/systemd/system/certbot.service' ]] && rm /etc/systemd/system/certbot.service [[ -d '/etc/systemd/system/certbot.service.d' ]] && rm -R /etc/systemd/system/certbot.service.d From 90a4563a29652a3f4f1575b7ee4144ffc849b4c3 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Tue, 20 Aug 2019 02:47:19 +0200 Subject: [PATCH 097/184] v6.26 + DietPi-Config | RPi audio: Add new HifiBerry DAC+ADC Pro dtoverlay to sound card selection: https://github.com/raspberrypi/linux/pull/3098 --- dietpi/dietpi-config | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 55679a7c6a..0382bec8c7 100644 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -3910,8 +3910,9 @@ The following will now be applied:\n - CPU gov = Powersave\n - HDMI output = Dis G_WHIP_MENU_ARRAY+=('hifiberry-dac' ': HifiBerry DAC / MiniAMP') G_WHIP_MENU_ARRAY+=('hifiberry-dacplus' ': HifiBerry DAC+ / DAC+ Pro / AMP2') G_WHIP_MENU_ARRAY+=('hifiberry-dacplusadc' ': HifiBerry DAC+ADC') - G_WHIP_MENU_ARRAY+=('hifiberry-digi' ': HifiBerry DIGI / DIGI+') - G_WHIP_MENU_ARRAY+=('hifiberry-digi-pro' ': HifiBerry DIGI Pro') + G_WHIP_MENU_ARRAY+=('hifiberry-dacplusadcpro' ': HifiBerry DAC+ADC Pro') + G_WHIP_MENU_ARRAY+=('hifiberry-digi' ': HifiBerry Digi / Digi+') + G_WHIP_MENU_ARRAY+=('hifiberry-digi-pro' ': HifiBerry Digi+ Pro') G_WHIP_MENU_ARRAY+=('i-sabre-q2m' ': AudioPhonics I-Sabre ES9028Q2M / ES9038Q2M') G_WHIP_MENU_ARRAY+=('iqaudio-dac' ': IQaudio DAC audio card') G_WHIP_MENU_ARRAY+=('iqaudio-dacplus' ': Pi-DAC+, Pi-DACZero, Pi-DAC Pro, Pi-DigiAMP+') From a4abf7ea317b9f46d3a6301b58e85126b3cff2a3 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Wed, 21 Aug 2019 20:18:22 +0200 Subject: [PATCH 098/184] v6.26 dietpi.txt | Lower default ondemand down factor to 40, so CPU will be throttled down after max 1s idle, lets save the world dietpi.txt | Slight reorder and comment extension for CPU governor related settings --- dietpi.txt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/dietpi.txt b/dietpi.txt index 1a5c261bb9..f001a83c18 100644 --- a/dietpi.txt +++ b/dietpi.txt @@ -120,8 +120,13 @@ SURVEY_OPTED_IN=-1 # D I E T - P I # DietPi-Config settings #------------------------------------------------------------------------------------------------------ -# CPU Governor: ondemand | powersave | performance | conservative +# CPU Governor: powersave | conservative | ondemand | performance CONFIG_CPU_GOVERNOR=ondemand +# Ondemand Sampling Rate | Min value: 10000 microseconds (10ms) +CONFIG_CPU_ONDEMAND_SAMPLE_RATE=25000 +# Ondemand Sampling Down Factor: Samling Rate * Down Factor / 1000 = ms (40 = 1000ms when sampling rate is 25000) +CONFIG_CPU_ONDEMAND_SAMPLE_DOWNFACTOR=40 +# Throttle Up Percentage: Percentage of average CPU usage during samling rate at which CPU will be throttled up/down CONFIG_CPU_USAGE_THROTTLE_UP=50 # CPU Frequency Limits: Disabled=disabled @@ -133,12 +138,6 @@ CONFIG_CPU_MIN_FREQ=Disabled # Disable Intel-based turbo/boost stepping. This flag should not be required, setting <100% MAX frequency should disable Turbo on Intel CPUs. CONFIG_CPU_DISABLE_TURBO=0 -# Sampling Rate: Min value 10000 microseconds (10ms) -CONFIG_CPU_ONDEMAND_SAMPLE_RATE=25000 - -# Sampling Down Factor: Samling rate * down factor / 1000 = Milliseconds (40 = 1000ms when sampling rate is 25000) -CONFIG_CPU_ONDEMAND_SAMPLE_DOWNFACTOR=80 - # System-wide proxy settings # - Do not modify, you must use dietpi-config > "Network Options: Adapters" to apply CONFIG_PROXY_ADDRESS=MyProxyServer.com From 08e4b717b8519e138d75d6d47a30e9e12a79f93e Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Thu, 22 Aug 2019 18:09:46 +0200 Subject: [PATCH 099/184] v6.26 + DietPi-Set_hardware | USB boot programming is only supported/required on RPi3 nonplus --- dietpi/func/dietpi-set_hardware | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 41cd006db5..ce0c3a1339 100644 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -153,7 +153,7 @@ $FP_SCRIPT rpi3_usb_boot enable #///////////////////////////////////////////////////////////////////////////////////// RPi_USB_Boot_Main(){ - (( $G_HW_MODEL > 9 )) && { Unsupported_Input_Name; return 1; } # Exit path for non-RPi + [[ $G_HW_MODEL == 3 && $G_HW_MODEL_DESCRIPTION != *'+'* ]] || { Unsupported_Input_Name; return 1; } # Exit path for non-RPi3 nonplus if [[ $INPUT_DEVICE_VALUE == 'enable' ]]; then From 0044438a98ed823d2dc10e473b410922e5b6a2a0 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sat, 24 Aug 2019 13:57:19 +0200 Subject: [PATCH 100/184] v6.26 + DietPi-Software | Nextcloud: Add X-Frame-Options header to Nginx config, which is now required webserver-config wise. Switch to "always" send headers and update some regex to match official docs: https://github.com/nextcloud/server/pull/16179, https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html + DietPi-Software | Nextcloud: Remove HSTS header completely from the config, since this is simply the wrong place. It is and should be added to the vhost configs when HTTPS is enabled. --- .conf/dps_114/nginx.nextcloud.conf | 34 +++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.conf/dps_114/nginx.nextcloud.conf b/.conf/dps_114/nginx.nextcloud.conf index 4b435f12f8..114d7f898e 100644 --- a/.conf/dps_114/nginx.nextcloud.conf +++ b/.conf/dps_114/nginx.nextcloud.conf @@ -8,13 +8,13 @@ location ~ ^\/(?:ocm-provider|ocs-provider).* { location ^~ /nextcloud { # Add headers to serve security related headers - #add_header Strict-Transport-Security "max-age=15768000; includeSubDomains;"; - add_header X-Content-Type-Options nosniff; - add_header X-XSS-Protection "1; mode=block"; - add_header X-Robots-Tag none; - add_header X-Download-Options noopen; - add_header X-Permitted-Cross-Domain-Policies none; - add_header Referrer-Policy no-referrer; + add_header Referrer-Policy "no-referrer" always; + add_header X-Content-Type-Options "nosniff" always; + add_header X-Download-Options "noopen" always; + add_header X-Frame-Options "SAMEORIGIN" always; + add_header X-Permitted-Cross-Domain-Policies "none" always; + add_header X-Robots-Tag "none" always; + add_header X-XSS-Protection "1; mode=block" always; # Remove X-Powered-By, which is an information leak fastcgi_hide_header X-Powered-By; @@ -46,7 +46,7 @@ location ^~ /nextcloud { deny all; } - location ~ ^\/nextcloud\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|ocm-provider\/.+)\.php(?:$|\/) { + location ~ ^\/nextcloud\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) { fastcgi_split_path_info ^(.+?\.php)(\/.*|)$; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; @@ -61,25 +61,25 @@ location ^~ /nextcloud { fastcgi_request_buffering off; } - location ~ ^\/nextcloud\/(?:updater|ocs-provider|ocm-provider)(?:$|\/) { + location ~ ^\/nextcloud\/(?:updater|oc[ms]-provider)(?:$|\/) { try_files $uri/ =404; index index.php; } # Adding the cache control header for js and css files # Make sure it is BELOW the PHP block - location ~ ^\/nextcloud\/.+[^\/]\.(?:css|js|woff2?|svg|gif)$ { + location ~ ^\/nextcloud\/.+[^\/]\.(?:css|js|woff2?|svg|gif|map)$ { try_files $uri /nextcloud/index.php$request_uri; add_header Cache-Control "public, max-age=15778463"; # Add headers to serve security related headers (It is intended # to have those duplicated to the ones above) - #add_header Strict-Transport-Security "max-age=15768000; includeSubDomains;"; - add_header X-Content-Type-Options nosniff; - add_header X-XSS-Protection "1; mode=block"; - add_header X-Robots-Tag none; - add_header X-Download-Options noopen; - add_header X-Permitted-Cross-Domain-Policies none; - add_header Referrer-Policy no-referrer; + add_header Referrer-Policy "no-referrer" always; + add_header X-Content-Type-Options "nosniff" always; + add_header X-Download-Options "noopen" always; + add_header X-Frame-Options "SAMEORIGIN" always; + add_header X-Permitted-Cross-Domain-Policies "none" always; + add_header X-Robots-Tag "none" always; + add_header X-XSS-Protection "1; mode=block" always; # Optional: Don't log access to assets access_log off; From d3551fff20d25e1d93c8db17fe9f58ae54442d07 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Sat, 24 Aug 2019 14:17:56 +0200 Subject: [PATCH 101/184] v6.26 + DietPi-Software | Nextcloud: Update Lighttpd config as of: https://github.com/MichaIng/DietPi/commit/0044438a98ed823d2dc10e473b410922e5b6a2a0 --- .conf/dps_114/lighttpd.nextcloud.conf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.conf/dps_114/lighttpd.nextcloud.conf b/.conf/dps_114/lighttpd.nextcloud.conf index d7337c9267..4010b05ffc 100644 --- a/.conf/dps_114/lighttpd.nextcloud.conf +++ b/.conf/dps_114/lighttpd.nextcloud.conf @@ -18,15 +18,16 @@ $HTTP["url"] =~ "^/nextcloud($|/)" { # - Directory listing dir-listing.activate = "disable" # - Cache control and security headers for static resources - $HTTP["url"] =~ "^/nextcloud/.*\.(css|js|woff2?|svg|gif)$" { + $HTTP["url"] =~ "^/nextcloud/.+[^/]\.(css|js|woff2?|svg|gif|map)$" { setenv.add-response-header += ( "Cache-Control" => "public, max-age=15778463", + "Referrer-Policy" => "no-referrer", "X-Content-Type-Options" => "nosniff", - "X-XSS-Protection" => "1; mode=block", - "X-Robots-Tag" => "none", "X-Download-Options" => "noopen", + "X-Frame-Options" => "SAMEORIGIN", "X-Permitted-Cross-Domain-Policies" => "none", - "Referrer-Policy" => "no-referrer", + "X-Robots-Tag" => "none", + "X-XSS-Protection" => "1; mode=block", ) } From 2738685269c4e33b55dfb0af2da569a89fbfe30b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 25 Aug 2019 17:47:34 +0200 Subject: [PATCH 102/184] v6.26 + DietPi-Services | Fix non-INPUT_SERVICE regression, since ${var+0} == "0" even if an empty string is assigned to $var --- dietpi/dietpi-services | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dietpi/dietpi-services b/dietpi/dietpi-services index 5b66dd25f0..d762fd4cbb 100644 --- a/dietpi/dietpi-services +++ b/dietpi/dietpi-services @@ -33,9 +33,8 @@ Available services: # Grab Inputs INPUT_CMD=$1 - INPUT_SERVICE=$2 - # - pre-v6.25 compatibility - [[ $INPUT_SERVICE == 'all' ]] && unset INPUT_SERVICE + # - pre-v6.25 compatibility: all => + [[ $2 && $2 != 'all' ]] && INPUT_SERVICE=$2 # - Optional env vars to prevent service control [[ $G_DIETPI_SERVICES_DISABLE == 1 ]] && exit 0 From 31617e2f1a34cb0973502f0298699f567c731431 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 25 Aug 2019 18:17:34 +0200 Subject: [PATCH 103/184] v6.26 + DietPi-Patch | Remove old DietPi-Backup include/exclude files, replaced with ".dietpi-backup_inc_exc" on v6.10 --- dietpi/patch_file | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dietpi/patch_file b/dietpi/patch_file index 1f2eabf3c5..48bd5b5d33 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2138,8 +2138,9 @@ A backup will be created to "/etc/mympd/mympd.conf.bak_DDMMYYY_N" from where you done #------------------------------------------------------------------------------- - # Remove old scripts that have been removed from code source long time ago but never from updated systems + # Remove old scripts/files that have been removed from code source long time ago but never from updated systems rm -f /{DietPi,boot}/dietpi/func/dietpi-set_{curlftpfs,nfsclient,smbclient} + rm -f /{DietPi,boot}/dietpi/.dietpi-backup_{include,exclude} #------------------------------------------------------------------------------- # On RPi, replace haveged with rng-tools, which is proven to work on RPi, is default on Raspbian and uses less RAM on idle. if (( $G_HW_MODEL < 9 )); then From d6cb97216ab8953209f0a602217eafd99c64381e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 26 Aug 2019 22:42:53 +0200 Subject: [PATCH 104/184] v6.26 + DietPi-Globals | Fix syntax error since $G_ERROR_HANDLER_EXITCODE by default is unset (== no error) --- dietpi/func/dietpi-globals | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 553d137f15..2b9a47a323 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -1051,7 +1051,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then # Ok (( $G_ERROR_HANDLER_NO_FAIL )) && G_ERROR_HANDLER_EXITCODE=0 - if (( ! $G_ERROR_HANDLER_EXITCODE )); then + if ! (( $G_ERROR_HANDLER_EXITCODE )); then G_DIETPI-NOTIFY 0 "$l_message" G_ERROR_HANDLER_RESET From 2fd7e238c326e98373b70ea07d40f8bfefddecff Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 26 Aug 2019 22:45:51 +0200 Subject: [PATCH 105/184] v6.26 + DietPi-Config | Minor coding --- dietpi/dietpi-config | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 0382bec8c7..0f5460f06c 100644 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -2043,7 +2043,7 @@ Current setting: $user_frequency_min_text" && G_CONFIG_INJECT 'CONFIG_CPU_MIN_FR TARGETMENUID=0 - local locale_current=$(grep -m1 '^[[:blank:]]*AUTO_SETUP_LOCALE=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') + local locale_current=$(sed -n '/^[[:blank:]]*AUTO_SETUP_LOCALE=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) G_WHIP_MENU_ARRAY=( @@ -2065,7 +2065,6 @@ Current setting: $user_frequency_min_text" && G_CONFIG_INJECT 'CONFIG_CPU_MIN_FR G_FILE_EXISTS /usr/share/i18n/SUPPORTED - mawk '/UTF-8/ {print $1}' /usr/share/i18n/SUPPORTED | sed 's/#//g' > /tmp/available_locale G_WHIP_MENU_ARRAY=() local index=0 # convert for whiptail 0-1=1st option 2-3=2nd @@ -2077,8 +2076,7 @@ Current setting: $user_frequency_min_text" && G_CONFIG_INJECT 'CONFIG_CPU_MIN_FR G_WHIP_MENU_ARRAY[$index]='' ((index++)) - done < /tmp/available_locale - rm /tmp/available_locale + done <<< "$(mawk '/UTF-8/{print $1}' /usr/share/i18n/SUPPORTED)" G_WHIP_DEFAULT_ITEM=$locale_current if G_WHIP_MENU 'Please select a system locale. DietPi will automatically apply this as the default locale:'; then From db47a9466ff452bf20c48bf0bd474aa85f3fd6e4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 26 Aug 2019 23:27:19 +0200 Subject: [PATCH 106/184] v6.26 + DietPi-Banner | Print date/time in chosen locale format: https://github.com/MichaIng/DietPi/issues/3075 + DietPi-Banner | Print LAN IP as well in `INPUT == 1` banner only, if chosen, and update network info + DietPi-Banner | Do no print curl output, if the server answers with error response `-f`, since the error page can be very large. Instead print curl one line error output `-S`, e.g.: `curl: (22) The requested URL returned error: 404`: https://github.com/MichaIng/DietPi/issues/3060 --- dietpi/func/dietpi-banner | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/dietpi/func/dietpi-banner b/dietpi/func/dietpi-banner index 88478c7993..c557151494 100644 --- a/dietpi/func/dietpi-banner +++ b/dietpi/func/dietpi-banner @@ -13,12 +13,12 @@ # - Checks /DietPi/dietpi/.update_available # # Usage: - # - dietpi-banner 0 = top section only - # - dietpi-banner 1 = top section and credits + clear + # - dietpi-banner 0 = top section + LAN IP + # - dietpi-banner 1 = top section + chosen entries + credits + clear # - dietpi-banner 2 = banner customisation menu #//////////////////////////////////// - [[ $1 == [012] ]] && INPUT=$1 || INPUT=0 + [[ $1 == [12] ]] && INPUT=$1 || INPUT=0 #///////////////////////////////////////////////////////////////////////////////////// # Globals @@ -121,7 +121,8 @@ else - text_update_available_date=$(date +"%R - %a %x") + local locale_current=$(sed -n '/^[[:blank:]]*AUTO_SETUP_LOCALE=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) + text_update_available_date=$(LC_ALL=${locale_current:-en_GB.UTF-8} date +"%R - %a %x") fi @@ -133,6 +134,8 @@ $GREEN_LINE" Print_Local_Ip(){ + [[ ${aENABLED[5]} == 1 ]] || return + [[ -f '/DietPi/dietpi/.network' ]] && /DietPi/dietpi/func/obtain_network_details echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[5]} $GREEN_SEPARATOR $(mawk 'NR==3 {dev=$0} NR==4 {print $0" ("dev")"}' /DietPi/dietpi/.network 2>&1)" # 5: LAN IP (adapter) } @@ -184,9 +187,6 @@ $GREEN_LINE" # - Source DietPi-Globals if not yet sourced from main menu and CPU temp chosen [[ ${aENABLED[2]} != 1 && ${aENABLED[12]} != 1 || $G_PROGRAM_NAME ]] || . /DietPi/dietpi/func/dietpi-globals - # - Re-obtain network details if missing and LAN IP chosen - [[ ${aENABLED[5]} != 1 || -f '/DietPi/dietpi/.network' ]] || /DietPi/dietpi/func/obtain_network_details - printf '\ec' # clear current terminal screen Print_Header @@ -195,16 +195,16 @@ $GREEN_LINE" (( ${aENABLED[2]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[2]} $GREEN_SEPARATOR $(print_full_info=1 G_OBTAIN_CPU_TEMP 2>&1)" # 2: CPU temp (( ${aENABLED[3]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[3]} $GREEN_SEPARATOR $(hostname -f 2>&1)" # 3: Hostname (( ${aENABLED[4]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[4]} $GREEN_SEPARATOR $(hostname -y 2>&1)" # 4: Domain name - (( ${aENABLED[5]} == 1 )) && Print_Local_Ip - (( ${aENABLED[6]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[6]} $GREEN_SEPARATOR $(curl -sLm 2 https://dietpi.com/myip.php 2>&1)" # 6: WAN IP # Move this to /DietPi/dietpi/.network? + Print_Local_Ip + (( ${aENABLED[6]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[6]} $GREEN_SEPARATOR $(curl -sSfLm 2 https://dietpi.com/myip.php 2>&1)" # 6: WAN IP # Move this to /DietPi/dietpi/.network? (( ${aENABLED[7]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[7]} $GREEN_SEPARATOR $(df -h --output=avail / | mawk 'NR==2 {print $1}' 2>&1)" # 7: Freespace (RootFS) (( ${aENABLED[8]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[8]} $GREEN_SEPARATOR $(df -h --output=avail /mnt/dietpi_userdata | mawk 'NR==2 {print $1}' 2>&1)" # 8: Freespace (DietPi userdata) - (( ${aENABLED[9]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[9]} $GREEN_SEPARATOR $(curl -sLm 2 https://wttr.in/?format=4 2>&1)" # 9: Weather + (( ${aENABLED[9]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[9]} $GREEN_SEPARATOR $(curl -sSfLm 2 https://wttr.in/?format=4 2>&1)" # 9: Weather (( ${aENABLED[10]} == 1 )) && [[ -x $FP_CUSTOM ]] && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[10]} $GREEN_SEPARATOR $(bash $FP_CUSTOM 2>&1)" # 10: Custom if (( ${aENABLED[12]} == 1 )); then local fp_motd='/tmp/.dietpi_motd' - [[ -f $fp_motd ]] || curl -sLm 2 https://dietpi.com/motd > $fp_motd + [[ -f $fp_motd ]] || curl -sSfLm 2 https://dietpi.com/motd 2>&1 > $fp_motd if [[ -f $fp_motd ]]; then if . $fp_motd &> /dev/null && [[ $motd ]]; then From ae8b2490859e3be9c42a57b6e91d86a46b6993c1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 27 Aug 2019 01:27:05 +0200 Subject: [PATCH 107/184] v6.22 (#3072) + DietPi-Software | Pi-hole: Fix blocking page implementation which needs to be done via 404 handler. Otherwise only requests without path will show the blocking page. Add configs for each webserver to enable blocking page 404 handler and apply access permissions. + DietPi-Software | Pi-hole: Public access (all IPs that are not officially reserved for LANs) to blocking page is now blocked by default. + DietPi-Software | Pi-hole: Public access to admin panel can be blocked now optionally via additional config file. Choice can be made on install. + DietPi-Software | Pi-hole: Disable obsolete dhcpcd service. It is installed by Pi-hole installer, to disable DHCP, but on DietPi we use regular way via /etc/network/interfaces by setting the "static" option for interfaces. + DietPi-Software | Nginx: Our default vhost/config now includes IPv6 support and has gone through further tuning. + DietPi-Software | Minor coding and wording --- .conf/dps_85/nginx.default | 13 +- .conf/dps_93/apache.block_public_admin.conf | 4 + .conf/dps_93/apache.pihole.conf | 20 +++ ....conf => lighttpd.block_public_admin.conf} | 2 +- .conf/dps_93/lighttpd.pihole.conf | 13 +- .conf/dps_93/nginx.block_public_admin.conf | 9 ++ .conf/dps_93/nginx.pihole.conf | 39 +++++ CHANGELOG.txt | 4 +- dietpi/dietpi-software | 137 +++++++++++++----- dietpi/patch_file | 48 ++++++ 10 files changed, 234 insertions(+), 55 deletions(-) create mode 100644 .conf/dps_93/apache.block_public_admin.conf create mode 100644 .conf/dps_93/apache.pihole.conf rename .conf/dps_93/{lighttpd.block_nonlocal_admin.conf => lighttpd.block_public_admin.conf} (61%) create mode 100644 .conf/dps_93/nginx.block_public_admin.conf create mode 100644 .conf/dps_93/nginx.pihole.conf diff --git a/.conf/dps_85/nginx.default b/.conf/dps_85/nginx.default index eb57a2b192..8b95e72904 100644 --- a/.conf/dps_85/nginx.default +++ b/.conf/dps_85/nginx.default @@ -4,25 +4,22 @@ server { listen 80 default_server; + listen [::]:80 default_server; root /var/www; - index index.php index.html index.htm; + index index.php index.html index.htm index.nginx-debian.html; server_name "$hostname"; + include /etc/nginx/sites-dietpi/*.conf; + location / { try_files $uri $uri/ =404; } location ~ \.php(?:$|/) { - fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_param PATH_INFO $fastcgi_path_info; + include snippets/fastcgi-php.conf; fastcgi_pass php; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include fastcgi_params; } - include /etc/nginx/sites-dietpi/*.conf; - } diff --git a/.conf/dps_93/apache.block_public_admin.conf b/.conf/dps_93/apache.block_public_admin.conf new file mode 100644 index 0000000000..fbe2e8e40d --- /dev/null +++ b/.conf/dps_93/apache.block_public_admin.conf @@ -0,0 +1,4 @@ +# Block public access to admin panel + + Require ip 127 192.168 10 172.16.0.0/12 + diff --git a/.conf/dps_93/apache.pihole.conf b/.conf/dps_93/apache.pihole.conf new file mode 100644 index 0000000000..c91c176b1b --- /dev/null +++ b/.conf/dps_93/apache.pihole.conf @@ -0,0 +1,20 @@ +# If the URL starts with /admin, it is the Web interface + + # Create a response header for debugging using curl -I + Header set X-Pi-hole "The Pi-hole Web interface is working!" + Header set X-Frame-Options "deny" + + # Block . files from being served, such as .git, .github, .gitignore + + Require all denied + + + + +# Block public access to blocking page + + Require ip 127 192.168 10 172.16.0.0/12 + + +# Enable blocking page via 404 handler +#ErrorDocument 404 /html/pihole/index.php diff --git a/.conf/dps_93/lighttpd.block_nonlocal_admin.conf b/.conf/dps_93/lighttpd.block_public_admin.conf similarity index 61% rename from .conf/dps_93/lighttpd.block_nonlocal_admin.conf rename to .conf/dps_93/lighttpd.block_public_admin.conf index d00f5722d2..1eb50d14ff 100644 --- a/.conf/dps_93/lighttpd.block_nonlocal_admin.conf +++ b/.conf/dps_93/lighttpd.block_public_admin.conf @@ -1,6 +1,6 @@ # Block non-LAN access to Pi-hole admin panel $HTTP["url"] =~ "^(/html)?/admin(/|$)" { - $HTTP["remoteip"] !~ "^1(27|92.168|0|72.(1[6-9]|2[0-9]|3[0-1]))\." { + $HTTP["remoteip"] !~ "^1(27|92\.168|0|72\.(1[6-9]|2[0-9]|3[0-1]))\." { url.access-deny = ("") } } diff --git a/.conf/dps_93/lighttpd.pihole.conf b/.conf/dps_93/lighttpd.pihole.conf index 134bd81579..4fe8db481a 100644 --- a/.conf/dps_93/lighttpd.pihole.conf +++ b/.conf/dps_93/lighttpd.pihole.conf @@ -1,29 +1,32 @@ # Based on: https://github.com/pi-hole/pi-hole/blob/master/advanced/lighttpd.conf.debian # If the URL starts with /admin, it is the Web interface -$HTTP["url"] =~ "^/admin/" { +$HTTP["url"] =~ "^(/html)?/admin/" { # Create a response header for debugging using curl -I setenv.add-response-header = ( "X-Pi-hole" => "The Pi-hole Web interface is working!", "X-Frame-Options" => "DENY" ) - $HTTP["url"] =~ ".ttf$" { + $HTTP["url"] =~ "\.ttf$" { # Allow Block Page access to local fonts setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" ) } } # Block . files from being served, such as .git, .github, .gitignore -$HTTP["url"] =~ "^/admin/\.(.*)" { +$HTTP["url"] =~ "^(/html)?/admin/\." { url.access-deny = ("") } # If it's a request to Pi-hole blocking page... -$HTTP["url"] =~ "^(/html)?/pihole(/|$)" { +$HTTP["url"] =~ "^(/html)?/pihole/" { # ... and the request isn't local - $HTTP["remoteip"] !~ "^1(27|92.168|0|72.(1[6-9]|2[0-9]|3[0-1]))\." { + $HTTP["remoteip"] !~ "^1(27|92\.168|0|72\.(1[6-9]|2[0-9]|3[0-1]))\." { # block! url.access-deny = ("") } } + +# Enable blocking page via 404 handler +#server.error-handler-404 = "/html/pihole/index.php" diff --git a/.conf/dps_93/nginx.block_public_admin.conf b/.conf/dps_93/nginx.block_public_admin.conf new file mode 100644 index 0000000000..389dabae25 --- /dev/null +++ b/.conf/dps_93/nginx.block_public_admin.conf @@ -0,0 +1,9 @@ +# Block public access to Pi-hole admin panel +# Location: /etc/nginx/sites-dietpi/dietpi-pihole-block_public_admin.{on,off} +# - Enable with file ending .on +# - Disable with file ending .off +allow 127.0.0.0/8; +allow 192.168.0.0/16; +allow 10.0.0.0/8; +allow 172.16.0.0/12; +deny all; diff --git a/.conf/dps_93/nginx.pihole.conf b/.conf/dps_93/nginx.pihole.conf new file mode 100644 index 0000000000..501bec18e1 --- /dev/null +++ b/.conf/dps_93/nginx.pihole.conf @@ -0,0 +1,39 @@ +# Admin panel +location ~ ^(?:/html|)/admin(?:$|/) { + # Block public access to admin page, if enabled + # - To enable: cd /etc/nginx/sites-dietpi; mv dietpi-pihole-block_public_admin.off dietpi-pihole-block_public_admin.on + # - To disable: cd /etc/nginx/sites-dietpi; mv dietpi-pihole-block_public_admin.on dietpi-pihole-block_public_admin.off + include sites-dietpi/dietpi-pihole-block_public_admin.*on; + # Block . files from being served, such as .git, .github, .gitignore + location ~ ^(?:/html|)/admin/\. { + deny all; + } + # Create a response header for debugging using curl -I + add_header X-Pi-hole "The Pi-hole Web interface is working!"; + add_header X-Frame-Options "DENY"; + # Standard PHP handler block + try_files $uri $uri/ =404; + location ~ ^(?:/html|)/admin/.+\.php(?:$|/) { + fastcgi_pass php; + include snippets/fastcgi-php.conf; + } +} + +# Blocking page +location ~ ^(?:/html|)/pihole(?:$|/) { + # Block public access to blocking page by default + allow 127.0.0.0/8; + allow 192.168.0.0/16; + allow 10.0.0.0/8; + allow 172.16.0.0/12; + deny all; + # Standard PHP handler block + try_files $uri $uri/ =404; + location ~ ^(?:/html|)/pihole/.+\.php(?:$|/) { + fastcgi_pass php; + include snippets/fastcgi-php.conf; + } +} + +# Enable blocking page via 404 handler +#error_page 404 /html/pihole/index.php; diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 932f8542b8..19885d2eaa 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -12,7 +12,8 @@ Changes / Improvements / Optimisations: - DietPi-Config | RPi: Update certain config.txt settings to match new firmware version. WiFi and Bluetooth is now disabled via related dtoverlays, which should further reduce hardware and firmware loads. - DietPi-Config | Some /etc/modprobe.d/ configs are merged to less files and mostly prefixed with "dietpi-", to allow easier differentiation between Debian/pre-image and DietPi files. - DietPi-Software | Pi-hole: Logging to /var/log/pihole.log is now disabled by default, since it is not required in usual cases. Query logs, shown in web UI, are stored in database. This might also resolve possible pihole-FTL crashes in combination with DietPi-RAMlog and DietPi-Logclear. Many thanks to @kuerious for reporting and @Mcat12 for providing helpful information on this topic: https://github.com/pi-hole/FTL/issues/614 -- DietPi-Software | Pi-hole: Lighttpd config has been added to block access to .dot dirs (.git*) and enable local fonts for web UI, based on: https://github.com/pi-hole/pi-hole/blob/master/advanced/lighttpd.conf.debian +- DietPi-Software | Pi-hole: Webserver configs have been added to block public access to the blocking page, optionally as well to the admin panel and generally block access to dot files/dirs (.git*) inside the admin panel directory. Parts are inspired by the official Lighttpd config, provided by Pi-hole: https://github.com/pi-hole/pi-hole/blob/master/advanced/lighttpd.conf.debian + Many thanks to @AtkLordOverAll for his effort to implement this for Lighttpd initially + the choice during install to block public admin panel access as well: https://github.com/MichaIng/DietPi/pull/3054 - DietPi-Software | OpenVPN: Rsyslog is not installed anymore together with OpenVPN server. Logs are available via "journalctl -u openvpn", all system logs via "journalctl". If you require persistent logs, uninstall DietPi-RAMlog via dietpi-software and make the journal boot persistent via: mkdir /var/log/journal - DietPi-Software | Gogs: On ARMv7 and x86_64 now the latest version from GitHub is installed. Reinstalls will upgrade the version while preserving existing settings. Many thanks to @LazyLama for doing this suggestion: https://github.com/MichaIng/DietPi/issues/2999 @@ -30,6 +31,7 @@ Bug Fixes: - DietPi-Software | XRDP: On Stretch, new the version from backports is installed. This resolves a critical issue where /etc/profile was not loaded to the session and, due to incomplete $PATH variable, important system binaries were not available on terminal emulators which broke many install and upgrade tasks. Furthermore this resolves an issue where install and connection of XRDP failed if IPv6 was disabled. Many thanks to @aspinks for the debug session which allowed us to track the issue down to its root: https://github.com/MichaIng/DietPi/issues/3017 - DietPi-Software | Sonarr: Resolved an issue where install failed due to an outdated APT repository key. Many thanks to @GregoryDosh and @GulyFMG for reporting this issue: https://github.com/MichaIng/DietPi/issues/3029 - DietPi-Software | Plex Media Server: Resolved an issue where DietPi-Update failed for versions prior to v6.23, due to the obsolete Plex Media Server dev2day repository being offline now. This repo is now removed via pre-patches, prior to G_AGUP being called. During regular patches PMS is reinstalled, applying the new official APT repo. Many thanks to @p-roman for reporting this issue: https://github.com/MichaIng/DietPi/issues/3038 +- DietPi-Software | Pi-hole: Resolved an issue, where the blocking page was only shown, if the blocked URL contained the domain only, without any appending path: https://github.com/MichaIng/DietPi/pull/3072 As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/XXXX diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 880ead4cbe..82d84a67c9 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9,7 +9,7 @@ #//////////////////////////////////// # # Info: - # - Location: /DietPi/dietpi/dietpi-software + # - Location: /{DietPi,boot}/dietpi/dietpi-software # - Installs "ready to run" software with optimisations unique to the device. # - Generates and uses /DietPi/dietpi/.installed (software list) # -1=selected for uninstall, 0=not installed, 1=selected for install, 2=installed # @@ -3289,7 +3289,7 @@ _EOF_ Banner_Installing local package_list='apache2' - # - Install certbot module on Stretch+, if certbot was already installed + # Install certbot module on Stretch+, if certbot was already installed (( ${aSOFTWARE_INSTALL_STATE[92]} == 2 )) && package_list+=' python3-certbot-apache' G_AGI $package_list @@ -3300,7 +3300,7 @@ _EOF_ Banner_Installing local package_list='nginx-light' - # - Install certbot module on Stretch+, if certbot was already installed + # Install certbot module on Stretch+, if certbot was already installed (( ${aSOFTWARE_INSTALL_STATE[92]} == 2 )) && package_list+=' python3-certbot-nginx' G_AGI $package_list @@ -3320,7 +3320,7 @@ _EOF_ Banner_Installing - G_DIETPI-NOTIFY 2 'Preparing database folder' + G_DIETPI-NOTIFY 2 "Preparing database directory at: $G_FP_DIETPI_USERDATA/mysql" if [[ -d $G_FP_DIETPI_USERDATA/mysql ]]; then G_DIETPI-NOTIFY 2 "$G_FP_DIETPI_USERDATA/mysql exists, will migrate containing databases" @@ -3328,22 +3328,23 @@ _EOF_ else # Otherwise use possibly existent /var/lib/mysql # - Remove possible dead symlinks/files: - rm -f $G_FP_DIETPI_USERDATA/mysql - mkdir $G_FP_DIETPI_USERDATA/mysql + G_RUN_CMD rm -f $G_FP_DIETPI_USERDATA/mysql if [[ -d '/var/lib/mysql' ]]; then G_DIETPI-NOTIFY 2 '/var/lib/mysql exists, will migrate containing databases' - # Failsafe: Move symlink target in case + # Failsafe: Move symlink target in case, otherwise readlink will resolve to dir G_RUN_CMD mv $(readlink -f '/var/lib/mysql') $G_FP_DIETPI_USERDATA/mysql + else + + G_RUN_CMD mkdir $G_FP_DIETPI_USERDATA/mysql + fi fi - G_DIETPI-NOTIFY 2 'Removing /var/lib/mysql, if existent' - rm -Rf /var/lib/mysql - - l_message="Creating symlink: /var/lib/mysql -> $G_FP_DIETPI_USERDATA/mysql" G_RUN_CMD ln -sf $G_FP_DIETPI_USERDATA/mysql /var/lib/mysql + G_RUN_CMD rm -Rf /var/lib/mysql + G_RUN_CMD ln -s $G_FP_DIETPI_USERDATA/mysql /var/lib/mysql local package_list='mariadb-server' # Install php-mysql module, if PHP was already installed @@ -3417,7 +3418,7 @@ Package: *\nPin: release n=buster\nPin-Priority: 100' > /etc/apt/preferences.d/d curl -sSL "$INSTALL_URL_ADDRESS" | apt-key add - # - APT source echo "deb https://packages.sury.org/php/ $G_DISTRO_NAME main" > /etc/apt/sources.list.d/dietpi-php.list - # - Pin down libssl1.1 version from this repo on Jessie and Stretch: https://github.com/MichaIng/DietPi/issues/2734 + # - Pin down libssl1.1 version from this repo on Stretch: https://github.com/MichaIng/DietPi/issues/2734 echo -e '# libssl1.1 from sury.org breaks Lighttpd install Package: openssl libssl*\nPin: origin packages.sury.org\nPin-Priority: -1' > /etc/apt/preferences.d/dietpi-openssl @@ -3485,7 +3486,7 @@ Package: openssl libssl*\nPin: origin packages.sury.org\nPin-Priority: -1' > /et # Workaround an APT error, when installing lighttpd and phpmyadmin in the same session: https://github.com/MichaIng/DietPi/issues/316 G_ERROR_HANDLER_NO_FAIL=1 G_AGI phpmyadmin G_WHIP_MSG 'Working around Lighttpd + phpMyAdmin APT errors:\n\nYou may have seen an error during the phpMyAdmin APT installation. This occurs, when Lighttpd webserver was installed within the same session.\n -We work around this error by running APT a second time. Please do not worry and ignore any error or failure message within this install steps. After DietPi-Software finished, Lighttpd should start up and phpMyAdmin web UI should be available as expected.' +We work around this error by running APT a second time. Please do not worry and ignore any error or failure message within these install steps. After DietPi-Software finished, Lighttpd should start up and phpMyAdmin web UI should be available as expected.' else @@ -4133,8 +4134,8 @@ _EOF_ G_CHECK_URL "$INSTALL_URL_ADDRESS" # Check free available memory. Increase swapfile size to prevent gravity running out of mem. - if (( $(free -m | mawk '/Mem:/ {print $4;exit}') < 512 && - $(grep -m1 '^[[:blank:]]*AUTO_SETUP_SWAPFILE_SIZE=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') < 512 )); then + if (( $(free -m | mawk '/^Mem:/{print $4;exit}') < 512 && + $(sed -n '/^[[:blank:]]*AUTO_SETUP_SWAPFILE_SIZE=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) < 512 )); then G_DIETPI-NOTIFY 2 'Increasing swapfile size to 512 MiB before running gravity.sh, please wait...\n' /DietPi/dietpi/func/dietpi-set_swapfile 512 @@ -6933,9 +6934,9 @@ _EOF_ _EOF_ - # Use /var/www as default webfolder - mv /var/www/html/index.html /var/www/index.html &> /dev/null - [[ $(ls -A /var/www/html 2>&1) ]] || rm -R /var/www/html + # Use /var/www as default webroot + [[ -f '/var/www/html/index.html' ]] && mv /var/www/html/index.html /var/www/ + rmdir --ignore-fail-on-non-empty /var/www/html # Change error log level sed -i '/LogLevel[[:blank:]]/c\ LogLevel error' /etc/apache2/sites-available/* @@ -6962,7 +6963,7 @@ _EOF_ dps_index=$software_id Download_Install 'nginx.default' /etc/nginx/sites-available/default # Nginx index page - cp /usr/share/nginx/html/index.html /var/www/index.html + [[ -f '/var/www/html/index.nginx-debian.html' ]] && mv /var/www/html/index.nginx-debian.html /var/www/ rmdir --ignore-fail-on-non-empty /var/www/html fi @@ -6975,7 +6976,7 @@ _EOF_ # Webroot sed -i '/^server.document-root/c\server.document-root = "/var/www"' /etc/lighttpd/lighttpd.conf # - Move default page - mv /var/www/html/index.lighttpd.html /var/www/ + [[ -f '/var/www/html/index.lighttpd.html' ]] && mv /var/www/html/index.lighttpd.html /var/www/ rmdir --ignore-fail-on-non-empty /var/www/html # Fix in case Lighttpd got updated to Buster version (on ARMv6 due to PHP7.3 libssl1.1 depedency) @@ -8744,37 +8745,65 @@ _EOF_ Banner_Configuration - # Generate web interface PW: https://github.com/MichaIng/DietPi/issues/662 - pihole -a -p "$GLOBAL_PW" - - # Add Lighttpd config + # Webserver configs + # - Lighttpd if (( ${aSOFTWARE_INSTALL_STATE[84]} > 0 )); then - # Enable setenv module + # Enable required modules G_CONFIG_INJECT '"mod_setenv",' ' "mod_setenv",' /etc/lighttpd/lighttpd.conf '"mod_.+",' + # Add and enable Pi-hole config dps_index=$software_id Download_Install 'lighttpd.pihole.conf' /etc/lighttpd/conf-available/99-dietpi-pihole.conf lighttpd-enable-mod dietpi-pihole - # Ask user if they want to block report access to the admin page - dps_index=$software_id Download_Install 'lighttpd.block_nonlocal_admin.conf' /etc/lighttpd/conf-available/99-dietpi-pihole-block_nonlocal_admin.conf + # Optional config to block public access to admin panel + dps_index=$software_id Download_Install 'lighttpd.block_public_admin.conf' /etc/lighttpd/conf-available/99-dietpi-pihole-block_public_admin.conf + local enable_cmd='lighttpd-enable-mod dietpi-pihole-block_public_admin' + local disable_cmd='lighttpd-disable-mod dietpi-pihole-block_public_admin' - G_WHIP_BUTTON_OK_TEXT='YES' - G_WHIP_BUTTON_CANCEL_TEXT='NO' - G_WHIP_YESNO "In order to increase security, it is recommended that you block remote access to the Pi-hole admin panel, so that unless you're on a local network, the Pi-hole admin panel isn't accessible.\n -You can always enable/disable this at a later point using the commands: - - lighttpd-enable-mod dietpi-pihole-block_nonlocal_admin - - lighttpd-disable-mod dietpi-pihole-block_nonlocal_admin\n -Do you want to block remote access to the admin panel now?" && lighttpd-enable-mod dietpi-pihole-block_nonlocal_admin + # - Apache + elif (( ${aSOFTWARE_INSTALL_STATE[83]} > 0 )); then + + # Enable required modules + a2enmod headers + + # Add and enable Pi-hole config + dps_index=$software_id Download_Install 'apache.pihole.conf' /etc/apache2/sites-available/dietpi-pihole.conf + a2ensite dietpi-pihole + + # Optional config to block public access to admin panel + dps_index=$software_id Download_Install 'apache.block_public_admin.conf' /etc/apache2/sites-available/dietpi-pihole-block_public_admin.conf + local enable_cmd='a2ensite dietpi-pihole-block_public_admin' + local disable_cmd='a2dissite dietpi-pihole-block_public_admin' + + # - Nginx + elif (( ${aSOFTWARE_INSTALL_STATE[85]} > 0 )); then + + # Add Pi-hole config + dps_index=$software_id Download_Install 'nginx.pihole.conf' /etc/nginx/sites-dietpi/dietpi-pihole.conf + + # Optional config to block public access to admin panel + dps_index=$software_id Download_Install 'nginx.block_public_admin.conf' /etc/nginx/sites-dietpi/dietpi-pihole-block_public_admin.off + local enable_cmd='cd /etc/nginx/sites-dietpi; mv dietpi-pihole-block_public_admin.off dietpi-pihole-block_public_admin.on' + local disable_cmd='cd /etc/nginx/sites-dietpi; mv dietpi-pihole-block_public_admin.on dietpi-pihole-block_public_admin.off' fi + # Ask user if they want to block report access to the admin panel + G_WHIP_BUTTON_OK_TEXT='YES' + G_WHIP_BUTTON_CANCEL_TEXT='NO' + G_WHIP_YESNO "In order to increase security, it is recommended that you block public access to the Pi-hole admin panel, so that unless you're on a local network, or connected via VPN, the Pi-hole admin panel isn't accessible.\n +You can always enable/disable this at a later point using the commands: + - $enable_cmd + - $disable_cmd\n +Do you want to block public access to the admin panel now?" && $enable_cmd + # Create symlinks to align Pi-hole admin and blocking page relative to webroot cd /var/www # - Move existing files/dirs out of the way - [[ -L 'admin' ]] || { [[ -e 'admin' ]] && mv -v admin admin.bak; } + [[ ! -L 'admin' && -e 'admin' ]] && mv -v admin admin.bak ln -vsf html/admin admin - [[ -L 'pihole' ]] || { [[ -e 'pihole' ]] && mv -v pihole pihole.bak; } + [[ ! -L 'pihole' && -e 'pihole' ]] && mv -v pihole pihole.bak ln -vsf html/pihole pihole # Ask user whether to show blocking page @@ -8785,9 +8814,14 @@ The downside is additional traffic and less performance compared to a silent req Do you want to enable the Pi-hole blocking page?'; then G_CONFIG_INJECT 'BLOCKINGMODE=' 'BLOCKINGMODE=IP-NODATA-AAAA' /etc/pihole/pihole-FTL.conf - # - Link blocking page to webroot, where it is required - [[ -L 'index.php' ]] || { [[ -e 'index.php' ]] && mv -v index.php index.php.bak; } - ln -vsf pihole/index.php index.php + # Enable 404 handler to rewrite all non-existent ad URL paths to blocking page + [[ -f '/etc/apache2/sites-available/dietpi-pihole.conf' ]] && G_CONFIG_INJECT 'ErrorDocument 404' 'ErrorDocument 404 /html/pihole/index.php' /etc/apache2/sites-available/dietpi-pihole.conf + [[ -f '/etc/nginx/sites-dietpi/dietpi-pihole.conf' ]] && G_CONFIG_INJECT 'error_page 404' 'error_page 404 /html/pihole/index.php;' /etc/nginx/sites-dietpi/dietpi-pihole.conf + [[ -f '/etc/lighttpd/conf-available/99-dietpi-pihole.conf' ]] && G_CONFIG_INJECT 'server.error-handler-404' 'server.error-handler-404 = "/html/pihole/index.php"' /etc/lighttpd/conf-available/99-dietpi-pihole.conf + # Backup default index page to rewrite webroot ad URL paths to blocking page + [[ -f 'index.html' ]] && mv index.html index.html.bak + [[ -f 'index.lighttpd.html' ]] && mv index.lighttpd.html index.lighttpd.html.bak + [[ -f 'index.nginx-debian.html' ]] && mv index.nginx-debian.html index.nginx-debian.html.bak else @@ -8804,12 +8838,18 @@ Do you want to enable the Pi-hole blocking page?'; then G_CONFIG_INJECT '# Required-Start:' '# Required-Start: $network $remote_fs' /etc/init.d/pihole-FTL systemctl enable pihole-FTL + # Disable non-required dhcpcd, which is installed by Pi-hole installer + systemctl disable dhcpcd + # Disable pihole.log query logging: https://github.com/pi-hole/FTL/issues/614#issuecomment-510564476 pihole -l off # Run Gravity pihole -g + # Generate web interface PW: https://github.com/MichaIng/DietPi/issues/662 + pihole -a -p "$GLOBAL_PW" + fi software_id=33 # Airsonic @@ -13204,12 +13244,29 @@ _EOF_ # Symlinks [[ -L '/var/www/pihole' ]] && rm /var/www/pihole [[ -L '/var/www/admin' ]] && rm /var/www/admin - [[ $(readlink /var/www/index.php) == 'pihole/index.php' ]] && rm /var/www/index.php # Pre Pi-hole v4 G_AGP dnsmasq rm -Rf /etc/dnsmasq* + # Disable and remove webserver configs + # - Apache + if [[ -d '/etc/apache2/sites-available' ]]; then + + a2dissite dietpi-pihole* 2> /dev/null + rm -f /etc/apache2/sites-available/dietpi-pihole* + + fi + # - Lighttpd + if [[ -d '/etc/lighttpd/mods-available' ]]; then + + lighttpd-disable-mod dietpi-pihole* 2> /dev/null + rm -f /etc/lighttpd/mods-available/dietpi-pihole* + + fi + # - Nginx + [[ -d '/etc/nginx/sites-dietpi' ]] && rm -f /etc/nginx/sites-dietpi/dietpi-pihole* + fi software_id=33 # Airsonic diff --git a/dietpi/patch_file b/dietpi/patch_file index 48bd5b5d33..666af629cd 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2160,6 +2160,54 @@ A backup will be created to "/etc/mympd/mympd.conf.bak_DDMMYYY_N" from where you [[ $G_HW_ARCH == 1 && -d '/etc/__MACOSX' ]] && rm -R /etc/__MACOSX fi + # Pi-hole: Update blocking page implementation and webserver configs: https://github.com/MichaIng/DietPi/pull/3072 + if [[ -f '/etc/pihole/pihole-FTL.conf' ]] && grep -q '^aSOFTWARE_INSTALL_STATE\[93\]=2' /DietPi/dietpi/.installed; then + + [[ -L '/var/www/index.php' && $(readlink -f '/var/www/index.php') == '/var/www/html/pihole/index.php' ]] && rm /var/www/index.php + if command -v a2ensite &> /dev/null && grep -q '^aSOFTWARE_INSTALL_STATE\[83\]=2' /DietPi/dietpi/.installed; then + + G_RUN_CMD wget "https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/.conf/dps_93/apache.block_public_admin.conf" -O /etc/apache/sites-available/dietpi-pihole-block_public_admin.conf + G_RUN_CMD wget "https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/.conf/dps_93/apache.pihole.conf" -O /etc/apache2/sites-available/dietpi-pihole.conf + a2ensite dietpi-pihole + if grep -q 'BLOCKINGMODE=IP-NODATA-AAAA' /etc/pihole/pihole-FTL.conf; then + + [[ -f '/var/www/index.html' ]] && mv /var/www/index.html /var/www/index.html.bak + G_CONFIG_INJECT 'ErrorDocument 404' 'ErrorDocument 404 /html/pihole/index.php' /etc/apache2/sites-available/dietpi-pihole.conf + + fi + + fi + if command -v lighttpd-enable-mod &> /dev/null && grep -q '^aSOFTWARE_INSTALL_STATE\[84\]=2' /DietPi/dietpi/.installed; then + + G_RUN_CMD wget "https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/.conf/dps_93/lighttpd.block_public_admin.conf" -O /etc/lighttpd/conf-available/99-dietpi-pihole-block_public_admin.conf + G_RUN_CMD wget "https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/.conf/dps_93/lighttpd.pihole.conf" -O /etc/lighttpd/conf-available/99-dietpi-pihole.conf + lighttpd-enable-mod dietpi-pihole + if grep -q 'BLOCKINGMODE=IP-NODATA-AAAA' /etc/pihole/pihole-FTL.conf; then + + [[ -f '/var/www/index.lighttpd.html' ]] && mv /var/www/index.lighttpd.html /var/www/index.lighttpd.html.bak + G_CONFIG_INJECT 'server.error-handler-404' 'server.error-handler-404 = "/html/pihole/index.php"' /etc/lighttpd/conf-available/99-dietpi-pihole.conf + + fi + + fi + if [[ -d '/etc/nginx/sites-dietpi' ]] && grep -q '^aSOFTWARE_INSTALL_STATE\[85\]=2' /DietPi/dietpi/.installed; then + + # Update Nginx default vhost, which is required to assure access restrictions for Pi-hole + G_BACKUP_FP /etc/nginx/sites-available/default + G_RUN_CMD wget "https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/.conf/dps_85/nginx.default" -O /etc/nginx/sites-available/default + G_RUN_CMD wget "https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/.conf/dps_93/nginx.block_public_admin.conf" -O /etc/nginx/sites-dietpi/dietpi-pihole-block_public_admin.off + G_RUN_CMD wget "https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/.conf/dps_93/nginx.pihole.conf" -O /etc/nginx/sites-dietpi/dietpi-pihole.conf + if grep -q 'BLOCKINGMODE=IP-NODATA-AAAA' /etc/pihole/pihole-FTL.conf; then + + [[ -f '/var/www/index.html' ]] && mv /var/www/index.html /var/www/index.html.bak + G_CONFIG_INJECT 'error_page 404' 'error_page 404 /html/pihole/index.php;' /etc/nginx/sites-dietpi/dietpi-pihole.conf + + fi + + fi + systemctl is-enabled dhcpcd &> /dev/null && ! pgrep dhcpcd &> /dev/null &> /dev/null && systemctl disable dhcpcd + + fi fi #------------------------------------------------------------------------------- From 5aeea73886db969d459e594ca7b980b7e6a81273 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 27 Aug 2019 03:33:29 +0200 Subject: [PATCH 108/184] v6.26 + DietPi-Drive_Manager | Autoinstall "exfat-fuse" if exfat file system is detected, which is required to mount it --- dietpi/dietpi-drive_manager | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dietpi/dietpi-drive_manager b/dietpi/dietpi-drive_manager index 946c57feb6..de0d6a7091 100644 --- a/dietpi/dietpi-drive_manager +++ b/dietpi/dietpi-drive_manager @@ -378,6 +378,10 @@ $swap_mount local need_hfs='hfsplus' + elif [[ ${aDRIVE_FSTYPE[$i]} == 'exfat' ]]; then + + local need_exfat='exfat-fuse' + fi done @@ -427,7 +431,7 @@ aDRIVE_ISPARTITIONTABLE ${aDRIVE_ISPARTITIONTABLE[$i]} rm $fp_fstab_tmp # - Install required APT packages for FS R/W access - (( ! $APT_CHECK )) && [[ $need_ntfs || $need_hfs ]] && G_AG_CHECK_INSTALL_PREREQ $need_ntfs $need_hfs && APT_CHECK=1 + [[ $APT_CHECK == 0 && $need_ntfs$need_hfs$need_exfat ]] && G_AG_CHECK_INSTALL_PREREQ $need_ntfs $need_hfs $need_exfat && APT_CHECK=1 sync mount -a From 21de04667072a0e2bbc650a2face958b8f900657 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 28 Aug 2019 13:20:48 +0200 Subject: [PATCH 109/184] META | Contributors update + Add @sal666 to active contributors reflect his regular work on the Clonezilla UEFI images + Move @k-plan and @ZombieVirus to inactive contributors for now, due to stopped activity since March 2019. Many thanks for your great valuable work until then guys! We wish you all the best and joy in other projects, and of course you are always welcome to drop by. --- README.md | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 631e9e625c..7bbe587908 100644 --- a/README.md +++ b/README.md @@ -7,22 +7,18 @@

optimised • simplified • for everyone

- find out more - • - download image + find out moredownload image


- Optional "ready to run" optimised software choices with dietpi-software. -
+ Optional "ready to run" optimised software choices with dietpi-software.
Feature rich configuration tool for your device with dietpi-config.


myVirtualServer

- DietPi's web hosting is powered by - myVirtualServer. + DietPi's web hosting is powered by myVirtualServer.

A wide range of SBCs and VMs are supported. Click here for the full list.

@@ -59,17 +55,11 @@ _Joined 2016-06-08_ DietPi forum co-administrator, management, support, testing and valuable feedback. -#### K-Plan - -_Joined 2016-01-01_ +#### sal666 -Contributions to the DietPi in general, in-depth testing, bug finding and valuable feedback, forum moderator. +_Joined 2017-07-26_ -#### ZombieVirus - -_Joined 2016-03-20_ - -DietPi forum moderator and version history maintainer on forums. +Creator and maintainer of the Clonezilla based installer images for x86_64 UEFI systems. --- @@ -86,6 +76,18 @@ https://github.com/MichaIng/DietPi/issues/474 ### Previous/Inactive Contributors +#### K-Plan + +_Joined 2016-01-01_ + +Contributions to the DietPi in general, in-depth testing, bug finding and valuable feedback, forum moderator. + +#### ZombieVirus + +_Joined 2016-03-20_ + +DietPi forum moderator and version history maintainer on forums. + #### Rhkean _Joined 2018-03-01_ From 30c8389117118c559faa75b054aa8b392384da22 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 1 Sep 2019 02:20:22 +0200 Subject: [PATCH 110/184] v6.26 (#3086) + DietPi-Software | Fix wrong shown pre-req software name being installed, when desktop is auto-selected. $software_id is set to "SQLite" before, which is shown instead of correct "LXDE". + DietPi-Software | TigerVNC: Install the netbase package, which is required to solve a failing perl function due to missing dependency: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=939055 + DietPi-Software | TigerVNC: Resolve "'No session for PID '" error message on login. This is due to 'PAMName=login' being ignored in systemd units as long as 'User=' is not set. Setting it to "root" solves the issue, even that it is the default value. + DietPi-Software | TigerVNC: Specify desktop environment for LXDE explicitly, to avoid message about fallback to default: "'DE is (null); No desktop environnement set, fallback to LXDE'" + DietPi-Software | TigerVNC: Set read-only password as well, otherwise the connection fails immediately (coredump): https://github.com/MichaIng/DietPi/issues/3070 + DietPi-Software | Minor coding --- CHANGELOG.txt | 3 +++ dietpi/dietpi-software | 42 +++++++++++++++++++++++++----------------- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 19885d2eaa..d4eaec7c63 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -24,6 +24,7 @@ Bug Fixes: - DietPi-NordVPN | Resolved an issue where the server menu could have wrong entries or even fail, if foreign files were placed inside the config directory. Many thanks to @svh1985 for reporting this issue and implementing a fix: https://github.com/MichaIng/DietPi/pull/3047 - DietPi-Services | Resolved an issue where single service calls failed if their names contain certain special characters, like dots. Many thanks to @maartenlangeveld for reporting this issue: https://github.com/MichaIng/DietPi/issues/3059 - DietPi-Config | Resolved an issue on RPi where I2C baudrate was not applied correctly, thus selection was ineffective. Many thanks to @flashspys for reporting this issue: https://github.com/MichaIng/DietPi/issues/2966 +- DietPi-Software | Resolved an issue where the script tells you that SQLite will be installed as pre-req, while actually a desktop is required and LXDE will be installed. - DietPi-Software | Gitea: Resolved an issue where install fails on ARMv7 systems. Many thanks to @maschiw for reporting this issue: https://github.com/MichaIng/DietPi/issues/2959 - DietPi-Software | Node-RED: Resolved an issue where install fails due to missing data dir creation. Many thanks to @Orfait for reporting this issue: https://github.com/MichaIng/DietPi/issues/2975 - DietPi-Software | Node-RED: Resolved an issue where user creation fails if "gpio" group is not present. Many thanks to @marcobrianza for reporting this issue: https://github.com/MichaIng/DietPi/issues/2975#issuecomment-513917360 @@ -32,6 +33,8 @@ Bug Fixes: - DietPi-Software | Sonarr: Resolved an issue where install failed due to an outdated APT repository key. Many thanks to @GregoryDosh and @GulyFMG for reporting this issue: https://github.com/MichaIng/DietPi/issues/3029 - DietPi-Software | Plex Media Server: Resolved an issue where DietPi-Update failed for versions prior to v6.23, due to the obsolete Plex Media Server dev2day repository being offline now. This repo is now removed via pre-patches, prior to G_AGUP being called. During regular patches PMS is reinstalled, applying the new official APT repo. Many thanks to @p-roman for reporting this issue: https://github.com/MichaIng/DietPi/issues/3038 - DietPi-Software | Pi-hole: Resolved an issue, where the blocking page was only shown, if the blocked URL contained the domain only, without any appending path: https://github.com/MichaIng/DietPi/pull/3072 +- DietPi-Software | TigerVNC: Resolved an issue on Debian Buster, where the VNC connection fails immediately due to an external bug, if no read-only password has been applied via vncpasswd. Many thanks to @Trunkzeh for reporting this issue and providing the workaround: https://github.com/MichaIng/DietPi/issues/3070 +- DietPi-Software | TigerVNC: Resolved minor error messages on login and in logs: "No session for PID ...", "DE is (null); No desktop environnement set, fallback to LXDE", "Use of uninitialized value $proto in socket at /usr/bin/tigervncserver" As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/XXXX diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 82d84a67c9..9d83a11a20 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -2710,11 +2710,11 @@ DietPi-Software will decrypt and use it for software installs. You can change it ${aSOFTWARE_INSTALL_STATE[26]} < 1 && ${aSOFTWARE_INSTALL_STATE[173]} < 1 )); then - # - If no desktop is selected or installed (0), default to LXDE + # If no desktop is selected or installed, default to LXDE aSOFTWARE_INSTALL_STATE[23]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[23]} will be installed" - # Pretent software requiring Xserver, to mark it below, in case desktop ID already passed: + # Pretent software requiring Xserver, to mark it below, in case desktop ID already passed aSOFTWARE_REQUIRES_XSERVERXORG[$i]=1 fi @@ -4482,7 +4482,9 @@ _EOF_ Banner_Installing # TigerVNC allows connecting to a virtual desktop # X11VNC allows connecting to a real desktop session, thus shared desktop sessions as well - G_AGI tigervnc-standalone-server tigervnc-common x11vnc + # netbase is required to solve: "Use of uninitialized value $proto in socket at /usr/bin/tigervncserver" + # - It is a recommendation and no dependency of perl, but expected by some packages depending on perl only: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=939055 + G_AGI tigervnc-standalone-server tigervnc-common x11vnc netbase fi @@ -9151,8 +9153,6 @@ _EOF_ (( ${aSOFTWARE_INSTALL_STATE[28]} == 1 )) && software_id=28 || software_id=120 Banner_Configuration - echo -e "$GLOBAL_PW=\n$GLOBAL_PW=\nn\n" | vncpasswd - cat << _EOF_ > /etc/systemd/system/vncserver.service [Unit] Description=Manage VNC Server (DietPi) @@ -9161,6 +9161,7 @@ After=dietpi-boot.service [Service] RemainAfterExit=yes +User=root PAMName=login Environment=HOME=/root ExecStart=/usr/local/bin/vncserver start @@ -9218,17 +9219,17 @@ case "\$1" in # Virtual desktop mode else - WIDTH=\$(grep -m1 '^[[:blank:]]*SOFTWARE_VNCSERVER_WIDTH=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') - HEIGHT=\$(grep -m1 '^[[:blank:]]*SOFTWARE_VNCSERVER_HEIGHT=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') - DEPTH=\$(grep -m1 '^[[:blank:]]*SOFTWARE_VNCSERVER_DEPTH=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') - DISPLAY=\$(grep -m1 '^[[:blank:]]*SOFTWARE_VNCSERVER_DISPLAY_INDEX=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') + WIDTH=\$(sed -n '/^[[:blank:]]*SOFTWARE_VNCSERVER_WIDTH=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) + HEIGHT=\$(sed -n '/^[[:blank:]]*SOFTWARE_VNCSERVER_HEIGHT=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) + DEPTH=\$(sed -n '/^[[:blank:]]*SOFTWARE_VNCSERVER_DEPTH=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) + DISPLAY=\$(sed -n '/^[[:blank:]]*SOFTWARE_VNCSERVER_DISPLAY_INDEX=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) \$BINARY_FP :\${DISPLAY:-1} -geometry \${WIDTH:-1280}'x'\${HEIGHT:-720} -depth \${DEPTH:-16} || exit 1 fi ;; stop) - DISPLAY=\$(grep -m1 '^[[:blank:]]*SOFTWARE_VNCSERVER_DISPLAY_INDEX=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') + DISPLAY=\$(sed -n '/^[[:blank:]]*SOFTWARE_VNCSERVER_DISPLAY_INDEX=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) \$BINARY_FP -kill :\${DISPLAY:-1} &> /dev/null killall -qw x11vnc Xtigervnc ;; @@ -9254,27 +9255,27 @@ _EOF_ # DESKTOP_LXDE if (( ${aSOFTWARE_INSTALL_STATE[23]} > 0 )); then - cmd_launch_desktop='lxsession -s LXDE &' + cmd_launch_desktop='lxsession -s LXDE -e LXDE' # DESKTOP_MATE elif (( ${aSOFTWARE_INSTALL_STATE[24]} > 0 )); then - cmd_launch_desktop='mate-session &' + cmd_launch_desktop='mate-session' # DESKTOP_GNUSTEP elif (( ${aSOFTWARE_INSTALL_STATE[26]} > 0 )); then - cmd_launch_desktop='x-window-manager &' + cmd_launch_desktop='x-window-manager' # DESKTOP_XFCE elif (( ${aSOFTWARE_INSTALL_STATE[25]} > 0 )); then - cmd_launch_desktop='xfce4-session &' + cmd_launch_desktop='xfce4-session' # DESKTOP_LXQT elif (( ${aSOFTWARE_INSTALL_STATE[173]} > 0 )); then - cmd_launch_desktop='startlxqt &' + cmd_launch_desktop='startlxqt' fi @@ -9286,10 +9287,17 @@ export SHELL='/bin/bash' [[ -r '/root/.Xresources' ]] && xrdb /root/.Xresources xsetroot -solid grey vncconfig -iconic & -$cmd_launch_desktop +$cmd_launch_desktop & _EOF_ chmod +x /root/.vnc/xstartup + # Set control + read-only passwords + vncpasswd -f << _EOF_ > /root/.vnc/passwd +$GLOBAL_PW +$GLOBAL_PW +_EOF_ + chmod 600 /root/.vnc/passwd + fi software_id=74 # InfluxDB From 1d25c2d8f48be97d106b01b315401322fb45529e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 2 Sep 2019 15:00:56 +0200 Subject: [PATCH 111/184] v6.26 + DietPi-Globals | Make G_CHECK_ROOT_USER() and G_CHECK_ROOTFS_RW() succeed silently. It is sufficient to print info in case of failure. G_CHECK_ROOT_USER() does not require an exported variable to prevent further checks then, since checking $UID is not slower then checking $G_CHECK_ROOT_USER_VERIFIED. By this, it is also assured that check is done if user is switched while preserving environment variables. For G_CHECK_ROOTFS_RW() we'll leave the variable in place, to prevent the relatively slow grep on /proc/mounts. + DietPi-Globals | After switching STDOUT with STDERR for G_WHIP returns, close temporary file descriptor &3 + DietPi-Globals | Remove G_WHIP exit code file right after it was read to variable --- dietpi/func/dietpi-globals | 47 ++++++++++++++------------------------ 1 file changed, 17 insertions(+), 30 deletions(-) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 2b9a47a323..43f1807eda 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -33,7 +33,7 @@ # - If not set, check for STDIN availability: # OK | systemd = no STDIN # OK | Cron = no STDIN - # NB | /etc/profile, ~/.profile, /etc/profile.d/, /etc/bash.bashrc, ~/.bashrc and /etc/bashrc.d/ can all be interactive since those are sourced from originating shell/bash session. + # NB | /etc/profile, ~/.profile, /etc/profile.d/, /etc/bash.bashrc, ~/.bashrc and /etc/bashrc.d/ are interactive since those are sourced from originating shell/bash session. if [[ $G_INTERACTIVE != [01] ]]; then # Backwards compatibility to keep user scripts valid for a while @@ -443,30 +443,24 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then } # $1 = mode + # 2 = Silent check, only returning error code if non-root # 1 = Kill current script only, excluding the shell. # else = Exit all linked scripts (kill all) G_CHECK_ROOT_USER(){ - if [[ $G_CHECK_ROOT_USER_VERIFIED != 1 ]]; then + if (( $UID )); then - if (( $UID )); then + [[ $1 == 2 ]] && return 1 - G_DIETPI-NOTIFY 1 'Root privileges required. Please run the command with "sudo" or "G_SUDO".' + G_DIETPI-NOTIFY 1 'Root privileges required. Please run the command with "sudo" or "G_SUDO".' - if [[ $1 == 1 ]]; then + if [[ $1 == 1 ]]; then - kill -INT $$ - - else - - exit 1 - - fi + kill -INT $$ else - export G_CHECK_ROOT_USER_VERIFIED=1 - G_DIETPI-NOTIFY 0 'Root access verified' + exit 1 fi @@ -487,7 +481,6 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then else export G_CHECK_ROOTFS_RW_VERIFIED=1 - G_DIETPI-NOTIFY 0 'RootFS R/W access verified' fi @@ -864,8 +857,8 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then local WHIP_MESSAGE=$@ G_WHIP_INIT 0 - G_WHIP_RETURNED_VALUE=$(whiptail --title "$G_PROGRAM_NAME" --inputbox "$WHIP_MESSAGE" --ok-button "$G_WHIP_BUTTON_OK_TEXT" --cancel-button "$G_WHIP_BUTTON_CANCEL_TEXT" --default-item "$G_WHIP_DEFAULT_ITEM" --backtitle "$WHIP_BACKTITLE" $WHIP_SIZE_Y $WHIP_SIZE_X "$G_WHIP_DEFAULT_ITEM" 3>&1 1>&2 2>&3; echo $? > /tmp/.G_WHIP_INPUTBOX_RESULT) - result=$(&1 1>&2 2>&3-; echo $? > /tmp/.G_WHIP_INPUTBOX_RESULT) + result=$(&1 1>&2 2>&3) - local password_1=$(whiptail --title "$G_PROGRAM_NAME" --passwordbox 'Please enter the new password again:' --ok-button "$G_WHIP_BUTTON_OK_TEXT" --nocancel --backtitle "$WHIP_BACKTITLE" $WHIP_SIZE_Y $WHIP_SIZE_X 3>&1 1>&2 2>&3) + local password_0=$(whiptail --title "$G_PROGRAM_NAME" --passwordbox "$WHIP_MESSAGE" --ok-button "$G_WHIP_BUTTON_OK_TEXT" --nocancel --backtitle "$WHIP_BACKTITLE" $WHIP_SIZE_Y $WHIP_SIZE_X 3>&1 1>&2 2>&3-) + local password_1=$(whiptail --title "$G_PROGRAM_NAME" --passwordbox 'Please enter the new password again:' --ok-button "$G_WHIP_BUTTON_OK_TEXT" --nocancel --backtitle "$WHIP_BACKTITLE" $WHIP_SIZE_Y $WHIP_SIZE_X 3>&1 1>&2 2>&3-) if [[ $password_0 && $password_0 == "$password_1" ]]; then result=$password_0 @@ -933,10 +924,8 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then local WHIP_MESSAGE=$@ G_WHIP_INIT 1 - G_WHIP_RETURNED_VALUE=$(whiptail --title "$G_PROGRAM_NAME" --menu "$WHIP_MESSAGE" --default-item "$G_WHIP_DEFAULT_ITEM" --ok-button "$G_WHIP_BUTTON_OK_TEXT" --cancel-button "$G_WHIP_BUTTON_CANCEL_TEXT" --backtitle "$WHIP_BACKTITLE" $WHIP_SIZE_Y $WHIP_SIZE_X $WHIP_SIZE_Z "${G_WHIP_MENU_ARRAY[@]}" 3>&1 1>&2 2>&3; echo $? > /tmp/.WHIP_MENU_RESULT) - result=$(&1 1>&2 2>&3-; echo $? > /tmp/.WHIP_MENU_RESULT) + result=$(&1 1>&2 2>&3; echo $? > /tmp/.WHIP_CHECKLIST_RESULT) + G_WHIP_RETURNED_VALUE=$(whiptail --title "$G_PROGRAM_NAME" --checklist "$WHIP_MESSAGE" --separate-output --default-item "$G_WHIP_DEFAULT_ITEM" --ok-button "$G_WHIP_BUTTON_OK_TEXT" --cancel-button "$G_WHIP_BUTTON_CANCEL_TEXT" --backtitle "$WHIP_BACKTITLE" $WHIP_SIZE_Y $WHIP_SIZE_X $WHIP_SIZE_Z "${G_WHIP_CHECKLIST_ARRAY[@]}" 3>&1 1>&2 2>&3-; echo $? > /tmp/.WHIP_CHECKLIST_RESULT) G_WHIP_RETURNED_VALUE=$(echo -e "$G_WHIP_RETURNED_VALUE" | tr '\n' ' ') - result=$(&1 1>&2 2>&3) + local choice=$(whiptail --title 'DietPi Error Handler:' --menu "$whip_msg" --cancel-button "$no_button_text" --scrolltext 24 90 $retry_menu_options_count "${aretry_menu_options[@]}" 3>&1 1>&2 2>&3-) if (( $? == 0 )); then if [[ $choice == 'Retry' ]]; then From b9dd4d70d4c6f0cda1095a268b5d086a25870c2a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 2 Sep 2019 21:21:33 +0200 Subject: [PATCH 112/184] v6.26 (#3091) + DietPi-Software | Netdata: The package has been removed from Debian Stretch backports repo. We recovered them from snapshots and host them on dietpi.com. They are installed on all Stretch systems but ARMv6. For ARMv6 the old self-compiled v1.11 package is installed as before on all RPi Stretch. --- CHANGELOG.txt | 3 ++- dietpi/dietpi-software | 53 ++++++++++++++++++++++++------------------ 2 files changed, 33 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d4eaec7c63..dc29625764 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,5 @@ v6.26 -(XX/08/19) +(XX/09/19) Changes / Improvements / Optimisations: - General | Support for Debian Jessie has now been fully dropped from DietPi code. Jessie systems are moved to the "jessie-support" Git branch and will stay on v6.25. Critical bugs, if reported, may still be fixed, but DietPi-Software related issues and new features will not be handled anymore by the DietPi code team. However, everyone is free to open pull requests against the jessie-support branch: https://github.com/MichaIng/DietPi/tree/jessie-support @@ -35,6 +35,7 @@ Bug Fixes: - DietPi-Software | Pi-hole: Resolved an issue, where the blocking page was only shown, if the blocked URL contained the domain only, without any appending path: https://github.com/MichaIng/DietPi/pull/3072 - DietPi-Software | TigerVNC: Resolved an issue on Debian Buster, where the VNC connection fails immediately due to an external bug, if no read-only password has been applied via vncpasswd. Many thanks to @Trunkzeh for reporting this issue and providing the workaround: https://github.com/MichaIng/DietPi/issues/3070 - DietPi-Software | TigerVNC: Resolved minor error messages on login and in logs: "No session for PID ...", "DE is (null); No desktop environnement set, fallback to LXDE", "Use of uninitialized value $proto in socket at /usr/bin/tigervncserver" +- DietPi-Software | Netdata: Resolved an issue where install failed on Stretch systems. Many thanks to @Velociraptor85 for reporting this issue: https://github.com/MichaIng/DietPi/issues/3062 As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/XXXX diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 9d83a11a20..10f9ea6376 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -1429,12 +1429,12 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=65 - aSOFTWARE_NAME[$software_id]='NetData' + aSOFTWARE_NAME[$software_id]='Netdata' aSOFTWARE_DESC[$software_id]='real-time performance monitoring' aSOFTWARE_CATEGORY_INDEX[$software_id]=9 aSOFTWARE_TYPE[$software_id]=0 - # Node.js only required for our custom package - (( $G_HW_MODEL < 10 && $G_DISTRO < 5 )) && aSOFTWARE_REQUIRES_NODEJS[$software_id]=1 + # Node.js only required for our custom v1.11 package for Stretch ARMv6 RPi + (( $G_HW_ARCH == 1 && $G_DISTRO < 5 )) && aSOFTWARE_REQUIRES_NODEJS[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1611#p1611' #------------------ @@ -4951,12 +4951,24 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior Banner_Installing - # Netdata v1.12 available on Debian stretch-backports and Raspbian/Debian Buster - # => Only install our custom package on Jessie and RPi Stretch - if (( $G_HW_MODEL < 10 && $G_DISTRO < 5 )); then + # No package available on Stretch + if (( $G_DISTRO < 5 )); then + + # For ARMv6 RPi use our self-compiled package + if (( $G_HW_ARCH == 1 )); then + + DEPS_LIST='zlib1g-dev' + Download_Install 'https://dietpi.com/downloads/binaries/all/netdata_1.11.1-1_armv6l.deb' + + # Else use the packages from Debian Stretch backports snapshot, that were removed recently, hosted now on dietpi.com + else + + Download_Install "https://dietpi.com/downloads/binaries/stretch/netdata_$G_HW_ARCH_DESCRIPTION.7z" + dpkg --force-hold,confdef,confnew -i netdata{-core,-plugins-bash,-web,}_*.deb + G_AGF + rm netdata* - DEPS_LIST='zlib1g-dev' - Download_Install "https://dietpi.com/downloads/binaries/all/netdata_1.11.1-1_$G_HW_ARCH_DESCRIPTION.deb" + fi else @@ -10089,33 +10101,30 @@ _EOF_ Banner_Configuration - # Only required for our custom package, leave defaults for Debian APT package otherwise - if (( $G_HW_MODEL < 10 && $G_DISTRO < 5 )); then + # Only required for our self-compiled package, leave defaults for Debian APT package otherwise + if (( $G_HW_ARCH == 1 && $G_DISTRO < 5 )); then - # - Service + # Service dps_index=$software_id Download_Install 'netdata.service' /etc/systemd/system/netdata.service - # - Dir (failsafe) + # Dir (failsafe) mkdir -p /var/lib/netdata - # - User + # User local usercmd='useradd -rMU' getent passwd netdata &> /dev/null && usercmd='usermod' $usercmd -d /var/lib/netdata -s $(command -v nologin) netdata - # - Permissions: https://docs.netdata.cloud/docs/netdata-security/#netdata-directories - # R/O + # Permissions: https://docs.netdata.cloud/docs/netdata-security/#netdata-directories + # - R/O chown -R root:netdata /etc/netdata /usr/lib/netdata /usr/libexec/netdata /usr/share/netdata chmod -R 0750 /etc/netdata /usr/lib/netdata /usr/libexec/netdata /usr/share/netdata - # apps.plugin requires root privileges to read disk I/O + # - apps.plugin requires root privileges to read disk I/O chmod 4750 /usr/libexec/netdata/plugins.d/apps.plugin - # R/W - chown -R netdata:netdata /var/cache/netdata /var/lib/netdata /var/log/netdata + # - R/W (web access: https://github.com/MichaIng/DietPi/issues/2336#issuecomment-450196178) + chown -R netdata:netdata /var/cache/netdata /var/lib/netdata /var/log/netdata /usr/share/netdata/web chmod -R 0770 /var/cache/netdata /var/lib/netdata /var/log/netdata - # Required: https://github.com/MichaIng/DietPi/issues/2336#issuecomment-450196178 - chown -R netdata:netdata /usr/share/netdata/web - fi fi @@ -13679,7 +13688,7 @@ _EOF_ # 1.2.0+ G_AGP netdata - # Pre v6.22 || Raspbian Stretch + All Jessie + # Pre-v6.22 Raspbian Stretch + Pre-v6.26 Raspbian Stretch ARMv6 only [[ -f '/etc/systemd/system/netdata.service' ]] && rm /etc/systemd/system/netdata.service getent passwd netdata &> /dev/null && userdel netdata From 3a53ef75d9502fcee3f4d8f2a939263bd3609c98 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 3 Sep 2019 00:59:40 +0200 Subject: [PATCH 113/184] v6.26 + DietPi-Patch | X11: Fix drivers and config on Odroid C2 --- dietpi/patch_file | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/dietpi/patch_file b/dietpi/patch_file index 666af629cd..c2f5b72ac0 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2208,6 +2208,23 @@ A backup will be created to "/etc/mympd/mympd.conf.bak_DDMMYYY_N" from where you systemctl is-enabled dhcpcd &> /dev/null && ! pgrep dhcpcd &> /dev/null &> /dev/null && systemctl disable dhcpcd fi + # X11: Fix drivers and config on Odroid C2: https://github.com/MichaIng/DietPi/issues/3028 + if (( $G_HW_MODEL == 12 )) && grep -q '^aSOFTWARE_INSTALL_STATE\[6\]=2' /DietPi/dietpi/.installed; then + + G_BACKUP_FP /etc/X11/xorg.conf + G_RUN_CMD wget "https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/.conf/dps_6/xorg_c2.conf" -O /etc/X11/xorg.conf + apt-mark auto xf86-video-mali-odroid + # Kodi: Remove PulseAudio, not required by Kodi anymore, but ask user first + if grep -q '^aSOFTWARE_INSTALL_STATE\[31\]=2' /DietPi/dietpi/.installed; then + + G_WHIP_YESNO 'PulseAudio was installed together with Kodi, but it is not required anymore. If you did not install it manually for a special purpose, it is safe to remove it.\n +Do you want to keep PulseAudio installed?' || apt-mark auto pulseaudio + + fi + G_AGA + G_AGI --reinstall aml-libs-odroid mali450-odroid libump-odroid xf86-video-fbturbo-odroid + + fi fi #------------------------------------------------------------------------------- From 57916d1face7a9dba9fc46d7ef54f9301a9716e2 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 3 Sep 2019 01:04:31 +0200 Subject: [PATCH 114/184] v6.26 + CHANGELOG | X11/Kodi on Odroid C2: Resolved an issue on Odroid C2 where Kodi failed to start --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index dc29625764..f9f1e15c8d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -25,6 +25,7 @@ Bug Fixes: - DietPi-Services | Resolved an issue where single service calls failed if their names contain certain special characters, like dots. Many thanks to @maartenlangeveld for reporting this issue: https://github.com/MichaIng/DietPi/issues/3059 - DietPi-Config | Resolved an issue on RPi where I2C baudrate was not applied correctly, thus selection was ineffective. Many thanks to @flashspys for reporting this issue: https://github.com/MichaIng/DietPi/issues/2966 - DietPi-Software | Resolved an issue where the script tells you that SQLite will be installed as pre-req, while actually a desktop is required and LXDE will be installed. +- DietPi-Software | X11/Kodi on Odroid C2: Resolved an issue on Odroid C2 where Kodi failed to start. GPU drivers and X11 config will be updated during DietPi-Update to cover this issue. Many thanks to @alexeylutskov for reporting this issue and testing the fix: https://github.com/MichaIng/DietPi/issues/3028 - DietPi-Software | Gitea: Resolved an issue where install fails on ARMv7 systems. Many thanks to @maschiw for reporting this issue: https://github.com/MichaIng/DietPi/issues/2959 - DietPi-Software | Node-RED: Resolved an issue where install fails due to missing data dir creation. Many thanks to @Orfait for reporting this issue: https://github.com/MichaIng/DietPi/issues/2975 - DietPi-Software | Node-RED: Resolved an issue where user creation fails if "gpio" group is not present. Many thanks to @marcobrianza for reporting this issue: https://github.com/MichaIng/DietPi/issues/2975#issuecomment-513917360 From a1a5fe9885f797d76e6276c1d6220e1c0e3f91ad Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 5 Sep 2019 03:13:16 +0200 Subject: [PATCH 115/184] v6.26 (#3095) + DietPi-Config | Do not call DietPi-Run_NTPD after selecting new time sync mirror or mode, if it is already running, to avoid concurrent execution, if DietPi-Config was originally called from DietPi-Run_NTPD on error. + DietPi-Config | Call DietPi-Run_NTPD non-interactively after selecting new time sync mirror or mode, to avoid its internal menu on error, which would allow to call a concurrent DietPi-Config or override the time sync result, which does not make sense when user is currently about to select a working NTP mirror. + DietPi-Config | Minor coding + DietPi-Run_NTPD | Reduce loop time to 1 second, so 60 seconds wait time is default now. This should be more then sufficient, otherwise user has to wait 2 minutes before NTP mirror can be changed without interrupting the script. Also this tic rate matches other cases. + DietPi-Run_NTPD | Do not offer to switch NTP mode on error, but NTP mirror only. All modes, but custom, share the same method and will fail the same way, thus changing mode will have no effect. Only use case would be if another NTP daemon prevents systemd-timesyncd from starting, user recognises this, and switches to manual mode accordingly. However this case is rare and in all other cases switching the mode is just a time waste and confusion. Also "Override" can always be selected, as well if another time sync daemon is interfering. + DietPi-Run_NTPD | Coding simplification, some possible by the above changes + DietPi-Set_software | ntpd-mode: Do not kill current run_ntpd instance. "/DietPi/dietpi/func/run_ntpd" did never work anyway, since killall does not check against full path, only "bash" or "run_ntpd" would have worked here. And it is good like that, otherwise when changing mode/mirror from within its own error handler, would kill the instance, leaving an orphaned dietpi-config instance that will not respond properly to input etc. + DietPi-Set_software | ntpd-mode: Remove timesync.conf when applying defaults. Apply defaults as well when no gateway was found, since this is the most compatible option. + DietPi-Set_software | Minor coding --- CHANGELOG.txt | 1 + dietpi/dietpi-config | 54 ++++++---------- dietpi/func/dietpi-set_software | 59 ++++++++--------- dietpi/func/run_ntpd | 111 ++++++++++++++------------------ 4 files changed, 94 insertions(+), 131 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f9f1e15c8d..7dc855e182 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -22,6 +22,7 @@ Bug Fixes: - General | Resolved an issue where install of required APT packages for certain scripts could fail in the rare case that APT lists are outdated and old packages are not available in the repo anymore. Many thanks to @Paulisper for reporting this issue: https://github.com/MichaIng/DietPi/issues/2996 - DietPi-Login | Resolved an issue during first run setup, where DietPi-Software was called with mostly wrong whiptail menu dimensions. This lead to info prompts and menus being quite small, in particular the "Install" menu entry, that one needs to select, being only visible when navigating to the bottom. Many thanks to @pbecks1963 for reporting this issue: https://github.com/MichaIng/DietPi/issues/3053 - DietPi-NordVPN | Resolved an issue where the server menu could have wrong entries or even fail, if foreign files were placed inside the config directory. Many thanks to @svh1985 for reporting this issue and implementing a fix: https://github.com/MichaIng/DietPi/pull/3047 +- DietPi-Run_NTPD | Resolved an issue where changing time sync mode or mirror, from within time sync error prompt, led to a concurrent script execution. Many thanks to @Sopor for reporting this issue: https://github.com/MichaIng/DietPi/issues/3010 - DietPi-Services | Resolved an issue where single service calls failed if their names contain certain special characters, like dots. Many thanks to @maartenlangeveld for reporting this issue: https://github.com/MichaIng/DietPi/issues/3059 - DietPi-Config | Resolved an issue on RPi where I2C baudrate was not applied correctly, thus selection was ineffective. Many thanks to @flashspys for reporting this issue: https://github.com/MichaIng/DietPi/issues/2966 - DietPi-Software | Resolved an issue where the script tells you that SQLite will be installed as pre-req, while actually a desktop is required and LXDE will be installed. diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 0f5460f06c..b0bdecedf2 100644 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1428,14 +1428,15 @@ Please choose whether your device have an active RTC or requires "fake-hwclock": ) G_WHIP_DEFAULT_ITEM=$ntpd_mode_current - G_WHIP_MENU 'Here you can adjust the frequency of network time syncs.\n + if G_WHIP_MENU 'Here you can adjust the frequency of network time syncs.\n - Modes 1-3:\nDietPi will launch systemd-timesyncd as a program, rather than a daemon. Once the time has been updated on your system, timesyncd will exit to reduce resource usage.\n - Mode 4:\nsystemd-timesyncd will run as a background daemon/service. Differences in time will be gradually adjusted over time, rather than instantly.\n - - Mode 0:\nIf you use a custom time sync method, e.g. the NTP package for high precision demand, select custom mode to avoid systemd-timesyncd interference.' - if (( $? == 0 )); then + - Mode 0:\nIf you use a custom time sync method, e.g. the NTP package for high precision demand, select custom mode to avoid systemd-timesyncd interference.'; then /DietPi/dietpi/func/dietpi-set_software ntpd-mode $G_WHIP_RETURNED_VALUE - /DietPi/dietpi/func/run_ntpd 1 + # Run time sync only, if not currently running, to avoid concurrent execution if dietpi-config was called from DietPi-Run_NTPD error handler + # - Run non-interactively to avoid its internal error handler allowing to open a concurrent dietpi-config instance + pgrep -cif /dietpi/func/run_ntpd &> /dev/null || G_INTERACTIVE=0 MAX_LOOPS_CHECK=10 /DietPi/dietpi/func/run_ntpd 1 fi @@ -4195,7 +4196,7 @@ The following will now be applied:\n - CPU gov = Powersave\n - HDMI output = Dis [[ $apt_mirror_current ]] || apt_mirror_current='Unknown, no string from scrape' # NTP mirror - local ntp_mirror_current=$(grep -m1 '^[[:blank:]]*CONFIG_NTP_MIRROR=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') + local ntp_mirror_current=$(sed -n '/^[[:blank:]]*CONFIG_NTP_MIRROR=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) [[ $ntp_mirror_current ]] || ntp_mirror_current='Unknown, no string from scrape' # Network boot wait @@ -4215,8 +4216,8 @@ The following will now be applied:\n - CPU gov = Powersave\n - HDMI output = Dis fi - local check_url_timeout=$(grep -m1 '^[[:blank:]]*CONFIG_G_CHECK_URL_TIMEOUT=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') - local check_url_attempts=$(grep -m1 '^[[:blank:]]*CONFIG_G_CHECK_URL_ATTEMPTS=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') + local check_url_timeout=$(sed -n '/^[[:blank:]]*CONFIG_G_CHECK_URL_TIMEOUT=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) + local check_url_attempts=$(sed -n '/^[[:blank:]]*CONFIG_G_CHECK_URL_ATTEMPTS=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) G_WHIP_MENU_ARRAY=( @@ -4367,46 +4368,31 @@ Please enter a value between $min and $max." && G_CHECK_VALIDINT "$G_WHIP_RETURN "Custom": Manually enter local or external NTP server address(es).\n "Default": Leave mirror choice to system. Usually falls back to local gateway (Stretch+ only) or "debian.pool.ntp.org".\n Use "*.pool.ntp.org" mirrors, if your device is mobile or should act as local NTP server. Further information: "http://www.pool.ntp.org/zone/@"' - if (( $? == 0 )) && [[ $G_WHIP_RETURNED_VALUE ]]; then - - local new_setting_ntp_mirror=$G_WHIP_RETURNED_VALUE - local previous_setting_ntp_mirror=$(grep -m1 '^[[:blank:]]*CONFIG_NTP_MIRROR=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') - - local apply=1 + if [[ $? == 0 && $G_WHIP_RETURNED_VALUE ]]; then case $G_WHIP_RETURNED_VALUE in 'Custom') G_WHIP_DEFAULT_ITEM=$ntp_mirror_current - if G_WHIP_INPUTBOX 'Please enter one or more (space-separated) NTP mirrors.\n + G_WHIP_INPUTBOX 'Please enter one or more (space-separated) NTP mirrors.\n NB: If you need to use *.pool.ntp.org servers, enter the base domain only. The subdomains 0-3 will be added automatically. -- Enter "uk.pool.ntp.org" to use [0-3].uk.pool.ntp.org'; then - - new_setting_ntp_mirror=$G_WHIP_RETURNED_VALUE - - else - - apply=0 - - fi +- Enter "uk.pool.ntp.org" to use [0-3].uk.pool.ntp.org' || return ;; esac - if (( $apply )); then - - G_CONFIG_INJECT 'CONFIG_NTP_MIRROR=' "CONFIG_NTP_MIRROR=$new_setting_ntp_mirror" /DietPi/dietpi.txt - /DietPi/dietpi/func/dietpi-set_software ntpd-mode $(grep -m1 '^[[:blank:]]*CONFIG_NTP_MODE=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') - if ! MAX_LOOPS_CHECK=10 /DietPi/dietpi/func/run_ntpd 1; then - - G_WHIP_MSG "Time sync failed:\n - $G_WHIP_RETURNED_VALUE\n\nSetting reverted to previous." + G_CONFIG_INJECT 'CONFIG_NTP_MIRROR=' "CONFIG_NTP_MIRROR=$G_WHIP_RETURNED_VALUE" /DietPi/dietpi.txt + /DietPi/dietpi/func/dietpi-set_software ntpd-mode $(sed -n '/^[[:blank:]]*CONFIG_NTP_MODE=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) + # Run time sync only, if not currently running, to avoid concurrent execution if dietpi-config was called from DietPi-Run_NTPD error handler + # - Run non-interactively to avoid its internal error handler allowing to open a concurrent dietpi-config instance + pgrep -cif /dietpi/func/run_ntpd &> /dev/null && return + if ! G_INTERACTIVE=0 MAX_LOOPS_CHECK=10 /DietPi/dietpi/func/run_ntpd 1; then - G_CONFIG_INJECT 'CONFIG_NTP_MIRROR=' "CONFIG_NTP_MIRROR=$previous_setting_ntp_mirror" /DietPi/dietpi.txt - /DietPi/dietpi/func/dietpi-set_software ntpd-mode $(grep -m1 '^[[:blank:]]*CONFIG_NTP_MODE=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') - - fi + G_WHIP_MSG "Time sync failed:\n - $G_WHIP_RETURNED_VALUE\n\nSetting reverted to previous." + G_CONFIG_INJECT 'CONFIG_NTP_MIRROR=' "CONFIG_NTP_MIRROR=$ntp_mirror_current" /DietPi/dietpi.txt + /DietPi/dietpi/func/dietpi-set_software ntpd-mode $(sed -n '/^[[:blank:]]*CONFIG_NTP_MODE=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) fi diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 1c189109fb..3d71e9a9f7 100644 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -246,50 +246,46 @@ _EOF_ #///////////////////////////////////////////////////////////////////////////////////// # Set NTPD Mode - # NB: also sets mirror as defined in dietpi.txt CONFIG_NTP_MIRROR + # NB: Also sets mirror as defined in dietpi.txt CONFIG_NTP_MIRROR #///////////////////////////////////////////////////////////////////////////////////// NtpdMode_Main(){ if G_CHECK_VALIDINT "$INPUT_MODE_VALUE" 0 4; then - # - Reset global to disabled, prevents run_ntpd in dietpi-software + # Reset global to disabled, prevents run_ntpd in dietpi-software sed -i '/CONFIG_NTP_MODE=/c\CONFIG_NTP_MODE=0' /DietPi/dietpi.txt - # - Kill current - killall -w /DietPi/dietpi/func/run_ntpd &> /dev/null - - local ntp_mirror=$(grep -m1 '^[[:blank:]]*CONFIG_NTP_MIRROR=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') + local ntp_mirror=$(sed -n '/^[[:blank:]]*CONFIG_NTP_MIRROR=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) [[ $ntp_mirror ]] || ntp_mirror='default' - local ntp_mirror_entry="Servers=$ntp_mirror" - - # - Default, lets timesyncd use DHCP server (Stretch+ only) or fallback to debian.pool.ntp.org. - if [[ ${ntp_mirror,,} == 'default' ]]; then - - ntp_mirror_entry='#Servers=0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org' - # - Gateway, auto detect local gateway(s) (router) to use as NTP server. - elif [[ ${ntp_mirror,,} == 'gateway' ]]; then + # Gateway, auto detect local gateway(s) (router) to use as NTP server. + if [[ ${ntp_mirror,,} == 'gateway' ]]; then - # NB: Turn output output into single line string via echo - local gateway=$(echo $(ip r | mawk '/^default/ {print $3}')) + # NB: Convert output to single line via echo + local gateway=$(echo $(ip r s 0.0.0.0/0 | mawk '{print $3}')) if [[ $gateway ]]; then G_DIETPI-NOTIFY 0 "Gateway(s) detected: $gateway, adding as NTP server(s)." - ntp_mirror_entry="Servers=$gateway" + ntp_mirror=$gateway else - G_DIETPI-NOTIFY 1 'No local gateway detected. No NTP mirror change will be applied.' + G_DIETPI-NOTIFY 1 'No local gateway detected. Reverting NTP mirror back to system defaults.' EXIT_CODE=1 - return 1 + ntp_mirror='default' fi - # - Add pool.ntp.org entries with subdomains "[0-3].", other entries without. - elif [[ $ntp_mirror =~ 'pool.ntp.org' ]]; then + fi + + # Default, lets timesyncd use DHCP server or fallback to debian.pool.ntp.org. + if [[ ${ntp_mirror,,} == 'default' ]]; then - ntp_mirror_entry='Servers=' - local i + [[ -f '/etc/systemd/timesyncd.conf' ]] && rm /etc/systemd/timesyncd.conf + + else + + local i ntp_mirror_entry for i in $ntp_mirror do @@ -305,29 +301,26 @@ _EOF_ done - fi + # Set mirror + echo -e "[Time]\nServers=${ntp_mirror_entry% }" > /etc/systemd/timesyncd.conf - # - Set mirror - cat << _EOF_ > /etc/systemd/timesyncd.conf -[Time] -$ntp_mirror_entry -_EOF_ + fi - # - Daemon mode, dbus required for timedatectl, that users may expect + # Daemon mode, dbus required for timedatectl, that users may expect if (( $INPUT_MODE_VALUE == 4 )); then G_AG_CHECK_INSTALL_PREREQ dbus systemctl unmask systemd-timesyncd # Failsafe systemctl enable --now systemd-timesyncd - # - Else, disable systemd-timesyncd to let "run_ntpd" or other time sync system take control + # Else, disable systemd-timesyncd to let "run_ntpd" or other time sync system take control else systemctl disable --now systemd-timesyncd fi - # - Update DietPi.txt + # Update DietPi.txt G_CONFIG_INJECT 'CONFIG_NTP_MODE=' "CONFIG_NTP_MODE=$INPUT_MODE_VALUE" /DietPi/dietpi.txt else @@ -384,7 +377,7 @@ _EOF_ # - DietPi-PREP, 1st run setup or user cancelled manual password choice else - GLOBAL_PW=$(grep -m1 '^[[:blank:]]*AUTO_SETUP_GLOBAL_PASSWORD=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') + GLOBAL_PW=$(sed -n '/^[[:blank:]]*AUTO_SETUP_GLOBAL_PASSWORD=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) fi [[ $GLOBAL_PW ]] || GLOBAL_PW='dietpi' diff --git a/dietpi/func/run_ntpd b/dietpi/func/run_ntpd index 0eb25f8a46..48c6dc3bae 100644 --- a/dietpi/func/run_ntpd +++ b/dietpi/func/run_ntpd @@ -28,99 +28,85 @@ EXIT_CODE=1 FP_EXIT_CODE='/DietPi/dietpi/.timesync_exit_status' - MAX_LOOPS_CHECK=${MAX_LOOPS_CHECK:-60} # *2 = seconds + MAX_LOOPS_CHECK=${MAX_LOOPS_CHECK:-60} # seconds Update_NTPD(){ - # Loop NTP check until sucess, or, non-G_INTERACTIVE and timeout - while (( $EXIT_CODE == 1 )) - do - - NTP_UPDATE_MODE=$(grep -m1 '^[[:blank:]]*CONFIG_NTP_MODE=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') - - if (( $NTP_UPDATE_MODE > 0 && $NTP_UPDATE_MODE < 5 )); then - - G_RUN_CMD systemctl restart systemd-timesyncd - - for ((i=0; i<=$MAX_LOOPS_CHECK; i++)) - do - - # NB: Following will always report "Synced", once systemd has completed it once - if systemctl status systemd-timesyncd | grep -qi '^[[:blank:]]*status: "synchronized to time server'; then + NTP_UPDATE_MODE=$(sed -n '/^[[:blank:]]*CONFIG_NTP_MODE=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) + # Assume status okay when manual mode is detected + if [[ $NTP_UPDATE_MODE != [1-4] ]]; then - G_DIETPI-NOTIFY 0 'NTPD: systemd-timesyncd synced' - if (( $NTP_UPDATE_MODE < 4 )); then + G_DIETPI-NOTIFY 0 'NTPD: Manual mode detected' + EXIT_CODE=0 + return - systemctl stop systemd-timesyncd - #systemctl stop systemd-timedated + fi - fi + # Loop NTP check until sucess, or, non-G_INTERACTIVE and timeout + while (( $EXIT_CODE )) + do - EXIT_CODE=0 - break + G_RUN_CMD systemctl restart systemd-timesyncd - elif (( $i == $MAX_LOOPS_CHECK )); then + for ((i=0; i<=$MAX_LOOPS_CHECK; i++)) + do - G_DIETPI-NOTIFY 2 'NTPD: Timeed out waiting for systemd-timesyncd' + # NB: Following will always report "Synced", once systemd has completed it once + if systemctl status systemd-timesyncd | grep -qi '^[[:blank:]]*status: "synchronized to time server'; then - if (( $G_INTERACTIVE )); then + G_DIETPI-NOTIFY 0 'NTPD: systemd-timesyncd synced' + (( $NTP_UPDATE_MODE < 4 )) && systemctl stop systemd-timesyncd + EXIT_CODE=0 + break 2 - # - Ask - G_WHIP_MENU_ARRAY=( + elif (( $i == $MAX_LOOPS_CHECK )); then - 'Retry' ': (Recommended) Rerun network time sync' - 'NTP mirror' ': Change the NTP mirror used' - 'NTP mode' ': Change the NTP mode (eg: daemon + drift)' - 'Override' ': (NOT RECOMMENDED) Ignore failure and override time sync status' + G_DIETPI-NOTIFY 2 'NTPD: Timed out waiting for systemd-timesyncd' - ) + if [[ $G_INTERACTIVE != 0 ]]; then - G_WHIP_BUTTON_CANCEL_TEXT='Retry' - if G_WHIP_MENU 'Network time sync has not yet completed, or, failed to update.\nTo prevent issues with outdated system time during installations, please select an option below.\n -NB: We highly recommend choosing "Retry" first. Failing that, "NTP mirror" then "NTP mode".\n"Override" is a last resort and may cause follow-up issues due to incorrect system clock time.'; then + # Ask + G_WHIP_MENU_ARRAY=( - if [[ $G_WHIP_RETURNED_VALUE == 'NTP mirror' ]]; then + 'Retry' ': (Recommended) Rerun network time sync' + 'NTP mirror' ': Change the NTP mirror used' + 'Override' ': (NOT RECOMMENDED) Ignore failure and override time sync status' - G_WHIP_MSG 'DietPi-Config will now be launched, on the next screen:\n - Select "NTP Mirror"\n - Select a different NTP mirror\n\nOnce completed, exit dietpi-config to resume setup' - /DietPi/dietpi/dietpi-config 16 1 + ) - elif [[ $G_WHIP_RETURNED_VALUE == 'NTP mode' ]]; then + G_WHIP_BUTTON_CANCEL_TEXT='Retry' + if G_WHIP_MENU 'Network time sync has not yet completed, or, failed to update.\nTo prevent issues with outdated system time during installations, please select an option below.\n +NB: We highly recommend choosing "Retry" first. Failing that, try to change the "NTP mirror".\n"Override" is a last resort and may cause follow-up issues due to incorrect system clock time.'; then - G_WHIP_MSG 'DietPi-Config will now be launched, on the next screen:\n - Select "Time sync mode"\n - Select a different time sync mode (eg: Daemon + Drift)\n\nOnce completed, exit dietpi-config to resume setup' - /DietPi/dietpi/dietpi-config 3 1 + if [[ $G_WHIP_RETURNED_VALUE == 'NTP mirror' ]]; then - elif [[ $G_WHIP_RETURNED_VALUE == 'Override' ]]; then + G_WHIP_MSG 'DietPi-Config will now be launched, on the next screen:\n - Select "NTP Mirror"\n - Select a different NTP mirror\n\nOnce completed, exit dietpi-config to resume setup' + /DietPi/dietpi/dietpi-config 16 1 - EXIT_CODE=0 - echo 1 > /var/lib/dietpi/.ntpd_override + elif [[ $G_WHIP_RETURNED_VALUE == 'Override' ]]; then - fi + EXIT_CODE=0 + echo 1 > /var/lib/dietpi/.ntpd_override fi - # - Automated, allow fail - else - - EXIT_CODE=2 # End loop - fi + # Automated, allow fail else - G_DIETPI-NOTIFY 2 "NTPD: Waiting for completion of systemd-timesyncd ($(( $i + 1 ))/$MAX_LOOPS_CHECK)" - sleep 2 + break 2 fi - done + else - # Other method: assume status is ok - else + G_DIETPI-NOTIFY 2 "NTPD: Waiting for completion of systemd-timesyncd ($(( $i + 1 ))/$MAX_LOOPS_CHECK)" + sleep 1 - G_DIETPI-NOTIFY 0 'NTPD: Manual mode detected' - EXIT_CODE=0 + fi - fi + done done @@ -132,11 +118,8 @@ NB: We highly recommend choosing "Retry" first. Failing that, "NTP mirror" then #///////////////////////////////////////////////////////////////////////////////////// # Main Loop #///////////////////////////////////////////////////////////////////////////////////// - # Reset and force new sync? - [[ $INPUT == 1 && -f $FP_EXIT_CODE ]] && rm $FP_EXIT_CODE - - # Only run timesync check once, for each boot session. - if [[ -f $FP_EXIT_CODE && $(<$FP_EXIT_CODE) == 0 ]]; then + # Run timesync only once each boot session, or if $1 == 1 is given + if [[ $INPUT != 1 && -f $FP_EXIT_CODE && $(<$FP_EXIT_CODE) == 0 ]]; then EXIT_CODE=0 From 67a4ca975bbed560ba6d7d205b41424becfdcb3c Mon Sep 17 00:00:00 2001 From: svh1985 Date: Sun, 8 Sep 2019 14:42:35 +0200 Subject: [PATCH 116/184] v6.26 (#3084) + DietPi-NordVPN | Added an input command to only print the current VPN status + DietPi-Banner | Added DietPi-NordVPN status as optional banner entry + DietPi-NordVPN | Do root user and rootfs R/W check only when menu is to be loaded, otherwise printing status as non-root would prompt error messages even that both is not required. This allows to load DietPi-Globals as well just for menu, which speeds up status print. + DietPi-NordVPN | Force non-interactive mode on status print, to skip any whiptail prompt + DietPi-NordVPN | Move RX/TX obtaining into an own function and remove DietPi-Globals dependency from it. This allows to share very most code between menu mode and status print. + DietPi-NordVPN | Up/Down scripts: Changed "up" to "route-up" and "down" to "route-pre-down", to assure that the scripts run while VPN connection is active. + DietPi-NordVPN | Update WAN IP only before first menu load, on connect, disconnect and refresh, to speed up all other navigation steps, which do not affect the connection state. This is due the WAN IP check can take up to two seconds, which adds a significant delay. + DietPi-NordVPN | Moved systemd unit to /etc/systemd/system, since /lib/systemd/system should be reserved for distribution package manager (APT). A DietPi-Patch will be added to move units on existing installs. + DietPi-NordVPN | Further coding and wording enhancements --- dietpi/func/dietpi-banner | 12 ++- dietpi/misc/dietpi-nordvpn | 215 ++++++++++++++++++++++++------------- 2 files changed, 146 insertions(+), 81 deletions(-) diff --git a/dietpi/func/dietpi-banner b/dietpi/func/dietpi-banner index c557151494..d5ee64e89b 100644 --- a/dietpi/func/dietpi-banner +++ b/dietpi/func/dietpi-banner @@ -41,10 +41,11 @@ 'Custom banner entry' 'Display DietPi useful commands?' 'MOTD' + 'NordVPN status' ) # Set defaults - aENABLED=(1 0 1 0 0 1 0 0 0 0 0 1 1) + aENABLED=(1 0 1 0 0 1 0 0 0 0 0 1 1 0) COLOUR_RESET='\e[0m' aCOLOUR=( @@ -184,7 +185,7 @@ $GREEN_LINE" Print_Banner(){ - # - Source DietPi-Globals if not yet sourced from main menu and CPU temp chosen + # Source DietPi-Globals if not yet sourced from main menu and CPU temp chosen [[ ${aENABLED[2]} != 1 && ${aENABLED[12]} != 1 || $G_PROGRAM_NAME ]] || . /DietPi/dietpi/func/dietpi-globals printf '\ec' # clear current terminal screen @@ -195,8 +196,9 @@ $GREEN_LINE" (( ${aENABLED[2]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[2]} $GREEN_SEPARATOR $(print_full_info=1 G_OBTAIN_CPU_TEMP 2>&1)" # 2: CPU temp (( ${aENABLED[3]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[3]} $GREEN_SEPARATOR $(hostname -f 2>&1)" # 3: Hostname (( ${aENABLED[4]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[4]} $GREEN_SEPARATOR $(hostname -y 2>&1)" # 4: Domain name - Print_Local_Ip + Print_Local_Ip # 5: LAN IP (( ${aENABLED[6]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[6]} $GREEN_SEPARATOR $(curl -sSfLm 2 https://dietpi.com/myip.php 2>&1)" # 6: WAN IP # Move this to /DietPi/dietpi/.network? + (( ${aENABLED[13]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[13]} $GREEN_SEPARATOR $(/DietPi/dietpi/misc/dietpi-nordvpn status 2>&1)" # 13: DietPi-NordVPN connection status (( ${aENABLED[7]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[7]} $GREEN_SEPARATOR $(df -h --output=avail / | mawk 'NR==2 {print $1}' 2>&1)" # 7: Freespace (RootFS) (( ${aENABLED[8]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[8]} $GREEN_SEPARATOR $(df -h --output=avail /mnt/dietpi_userdata | mawk 'NR==2 {print $1}' 2>&1)" # 8: Freespace (DietPi userdata) (( ${aENABLED[9]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[9]} $GREEN_SEPARATOR $(curl -sSfLm 2 https://wttr.in/?format=4 2>&1)" # 9: Weather @@ -209,7 +211,7 @@ $GREEN_LINE" if . $fp_motd &> /dev/null && [[ $motd ]]; then - echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[12]} $GREEN_SEPARATOR $motd" # 12: MOTD + echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[12]} $GREEN_SEPARATOR $motd" # 12: MOTD else @@ -223,7 +225,7 @@ $GREEN_LINE" echo -e "$GREEN_LINE\n" Print_Credits - (( ${aENABLED[11]} == 1 )) && Print_Useful_Commands + (( ${aENABLED[11]} == 1 )) && Print_Useful_Commands # 11: Useful commands } diff --git a/dietpi/misc/dietpi-nordvpn b/dietpi/misc/dietpi-nordvpn index bf0b485def..7233112628 100644 --- a/dietpi/misc/dietpi-nordvpn +++ b/dietpi/misc/dietpi-nordvpn @@ -10,17 +10,33 @@ # # Info: # - GUI to setup a NordVPN connection - # - Automatically starts service during boot - # Usage: - # - /DietPi/dietpi/misc/dietpi-nordvpn - #//////////////////////////////////// + # - Allows to automatically connect on boot + # - Allows to add post-up and pre-down scripts + USAGE=' +Usage: dietpi-nordvpn [] +Available commands: + Interactive menu to edit, connect and apply NordVPN settings + status Print NordVPN connection status info +' #//////////////////////////////////// + + # Grab Inputs + INPUT=$1 # Import DietPi-Globals -------------------------------------------------------------- - . /DietPi/dietpi/func/dietpi-globals - G_PROGRAM_NAME='DietPi-NordVPN' - G_CHECK_ROOT_USER - G_CHECK_ROOTFS_RW - G_INIT + # - Only load for interactive menu + if [[ $INPUT ]]; then + + G_PROGRAM_NAME='DietPi-NordVPN' + + else + + . /DietPi/dietpi/func/dietpi-globals + G_PROGRAM_NAME='DietPi-NordVPN' + G_CHECK_ROOT_USER + G_CHECK_ROOTFS_RW + G_INIT + + fi # Import DietPi-Globals -------------------------------------------------------------- FP_SETTINGS_DIETPI='/var/lib/dietpi/dietpi-software/installed/dietpi-nordvpn/settings_dietpi.conf' @@ -32,13 +48,16 @@ NORDVPN_SERVER='' PROTOCOL='udp' - NET_DEV='tun0' + IFACE='tun0' + MAX_WAIT_FOR_CONNECTION=5 # seconds + NORDVPN_INSTALLED=0 NORDVPN_SERVICE=0 NORDVPN_CONNECTED=0 - MAX_WAIT_FOR_CONNECTION=5 WAN_IP='' + RX='N/A' + TX='N/A' - Update_Wan_Ip(){ WAN_IP=$(curl -sLm 2 https://dietpi.com/myip.php 2>&1); } + Update_Wan_Ip(){ WAN_IP=$(curl -sSfLm 2 https://dietpi.com/myip.php 2>&1); } Init(){ @@ -46,41 +65,58 @@ until grep -q 'aSOFTWARE_INSTALL_STATE\[171\]=2' /DietPi/dietpi/.installed do - if G_WHIP_YESNO "$G_PROGRAM_NAME is not installed, would you like to install it now?"; then + # Offer install only for interactive menu + if [[ ! $INPUT ]] && G_WHIP_YESNO "$G_PROGRAM_NAME is not installed, would you like to install it now?"; then /DietPi/dietpi/dietpi-software install 171 else - TARGETMENUID=-1 #Exit path without save. - break + TARGETMENUID=-1 # Skip menu + return fi done + NORDVPN_INSTALLED=1 # Check service exists - [[ -f '/lib/systemd/system/dietpi-nordvpn.service' ]] && NORDVPN_SERVICE=1 - - Read_Settings + [[ -f '/etc/systemd/system/dietpi-nordvpn.service' ]] && NORDVPN_SERVICE=1 } Check_Connected(){ - NORDVPN_CONNECTED=0 #systemctl status dietpi-nordvpn | grep -qi 'initialization sequence completed' - ip r s dev $NET_DEV &>/dev/null && NORDVPN_CONNECTED=1 - + ip r s dev $IFACE &> /dev/null && NORDVPN_CONNECTED=1 || NORDVPN_CONNECTED=0 return $(( ! $NORDVPN_CONNECTED )) } + Get_Connection_Info(){ + + RX='N/A' + if [[ -f /sys/class/net/$IFACE/statistics/rx_bytes ]]; then + + local rx=$( /lib/systemd/system/dietpi-nordvpn.service + G_CONFIG_INJECT 'auth-user-pass([[:blank:]]|$)' "auth-user-pass $FP_SETTINGS_OVPN" $fp_ovpn + [[ -f $FP_SETTINGS_UP || -f $FP_SETTINGS_DOWN ]] && G_CONFIG_INJECT 'script-security[[:blank:]]' 'script-security 2' $fp_ovpn 'auth[[:blank:]]' + [[ -f $FP_SETTINGS_UP ]] && G_CONFIG_INJECT 'route-up[[:blank:]]' "route-up $FP_SETTINGS_UP" $fp_ovpn 'auth[[:blank:]]' || sed -i '/^[[:blank:]]*route-up[[:blank:]]/d' $fp_ovpn + [[ -f $FP_SETTINGS_DOWN ]] && G_CONFIG_INJECT 'route-pre-down[[:blank:]]' "route-pre-down $FP_SETTINGS_DOWN" $fp_ovpn 'auth[[:blank:]]' || sed -i '/^[[:blank:]]*route-pre-down[[:blank:]]/d' $fp_ovpn + + cat << _EOF_ > /etc/systemd/system/dietpi-nordvpn.service [Unit] Description=NordVPN (DietPi) After=network.target dietpi-boot.service @@ -125,17 +161,25 @@ _EOF_ NORDVPN_SERVICE=1 G_RUN_CMD systemctl restart dietpi-nordvpn - for (( i=1; i<=$MAX_WAIT_FOR_CONNECTION; i++ )) + local i=1 + until Check_Connected || (( $i > $MAX_WAIT_FOR_CONNECTION )) do - Check_Connected && break - - G_DIETPI-NOTIFY 2 "Waiting for connection ($i/$MAX_WAIT_FOR_CONNECTION)" + G_DIETPI-NOTIFY -2 "Waiting for connection ($((i++))/$MAX_WAIT_FOR_CONNECTION)" sleep 1 done - (( $NORDVPN_CONNECTED )) || G_WHIP_MSG "Connection failed/time out: $NORDVPN_SERVER\n\nPlease verify account details are correct.\n\nIf problems persist, please check the status of 'systemctl status dietpi-nordvpn -l'" + if (( $NORDVPN_CONNECTED )); then + + G_DIETPI-NOTIFY 0 "Connection established: $NORDVPN_SERVER" + + else + + G_DIETPI-NOTIFY 1 "Connection failed/timeout: $NORDVPN_SERVER" + G_WHIP_MSG "Connection failed/timeout: $NORDVPN_SERVER\n\nPlease verify account details are correct.\n\nIf problems persist, please check the service status: \"systemctl -l status dietpi-nordvpn\"" + + fi } @@ -155,34 +199,19 @@ _EOF_ # TARGETMENUID=0 Menu_Main(){ - Update_Wan_Ip - - local text_status="Status:\n - WAN IP: $WAN_IP\n" - if (( $NORDVPN_SERVICE )) && Check_Connected; then + local text_status="WAN IP : $WAN_IP\nState : " + if (( ! $NORDVPN_SERVICE )); then - text_status+=" - Connected : $NORDVPN_SERVER\n" + text_status+='Not configured\nSubscription : https://go.nordvpn.net/aff_c?offer_id=15&aff_id=5305&url_id=902' - local net_rx_byte=0 - local net_tx_byte=0 - local net_rx_mb='N/A' - local net_tx_mb='N/A' + elif ! Check_Connected; then - if [[ -f /sys/class/net/$NET_DEV/statistics/rx_bytes && -f /sys/class/net/$NET_DEV/statistics/tx_bytes ]]; then - - net_rx_byte=$( $FP_SETTINGS_UP - nano $FP_SETTINGS_UP - (( $(stat -c %s $FP_SETTINGS_UP) )) && chmod 700 $FP_SETTINGS_UP || rm $FP_SETTINGS_UP + elif [[ $G_WHIP_RETURNED_VALUE == 'Edit'* ]]; then - elif [[ $G_WHIP_RETURNED_VALUE == 'Edit Down' ]]; then - - [[ -f $FP_SETTINGS_DOWN ]] || echo -e '#!/bin/bash\n# Clear this file completely, including line breaks, to have it removed.' > $FP_SETTINGS_DOWN - nano $FP_SETTINGS_DOWN - (( $(stat -c %s $FP_SETTINGS_DOWN) )) && chmod 700 $FP_SETTINGS_DOWN || rm $FP_SETTINGS_DOWN + local fp=$FP_SETTINGS_UP + [[ $G_WHIP_RETURNED_VALUE == *'Down' ]] && fp=$FP_SETTINGS_DOWN + [[ -f $fp ]] || echo -e '#!/bin/bash\n# Clear this file completely, including line breaks, to have it removed.' > $fp + nano $fp + (( $(stat -c %s $fp) )) && chmod 700 $fp || rm $fp elif [[ $G_WHIP_RETURNED_VALUE == 'Auto start' ]]; then @@ -253,11 +279,12 @@ _EOF_ elif [[ $G_WHIP_RETURNED_VALUE == 'Disconnect' ]]; then G_RUN_CMD systemctl stop dietpi-nordvpn + Update_Wan_Ip LAST_SELECTED_NAME='Refresh' elif [[ $G_WHIP_RETURNED_VALUE == 'Server' ]]; then - # - Select protocol + # Select protocol G_WHIP_MENU_ARRAY=( 'UDP' ': Recommended' @@ -268,21 +295,23 @@ _EOF_ G_WHIP_DEFAULT_ITEM=$PROTOCOL G_WHIP_MENU 'Please select the connection protocol type:' && PROTOCOL=${G_WHIP_RETURNED_VALUE,,} - # - Select server + # Select server G_DIETPI-NOTIFY 2 'Populating NordVPN server list, please wait...' - cd /etc/openvpn/ovpn_$PROTOCOL G_WHIP_MENU_ARRAY=() - for i in *.ovpn + for i in /etc/openvpn/ovpn_$PROTOCOL/*.ovpn do - G_WHIP_MENU_ARRAY+=("$i" '') + G_WHIP_MENU_ARRAY+=("${i##*/}" '') done - cd /tmp/$G_PROGRAM_NAME G_WHIP_DEFAULT_ITEM=$NORDVPN_SERVER G_WHIP_MENU 'Please select a NordVPN server to use:' && NORDVPN_SERVER=$G_WHIP_RETURNED_VALUE + elif [[ $G_WHIP_RETURNED_VALUE == 'Refresh' ]]; then + + Update_Wan_Ip + fi else @@ -299,12 +328,46 @@ _EOF_ #----------------------------------------------------------------------------------- Init #----------------------------------------------------------------------------------- - while (( $TARGETMENUID >= 0 )) - do + if [[ $INPUT == 'status' ]]; then + + if (( ! $NORDVPN_INSTALLED )); then + + echo -e "\e[33m$G_PROGRAM_NAME is not installed! Please run: \"dietpi-software install 171\"\e[0m" + + elif (( ! $NORDVPN_SERVICE )); then + + echo -e "\e[33m$G_PROGRAM_NAME is not configured! Please run: \"dietpi-nordvpn\"\e[0m" + + elif ! Check_Connected; then + + echo -e '\e[1;31mDisconnected\e[0m' - Menu_Main + else + + Get_Connection_Info + echo -e "\e[1;32mConnected\e[0m - Sent = $TX | Received = $RX" + + fi + + elif [[ $INPUT ]]; then + + # Unknown input + echo -e "\e[90m[\e[0m\e[31mFAILURE\e[0m\e[90m]\e[0m \e[90m$G_PROGRAM_NAME | \e[0mInvalid input command ($INPUT). Aborting...\n$USAGE" + exit 1 + + else + + Read_Settings + Update_Wan_Ip + + while (( $TARGETMENUID >= 0 )) + do + + Menu_Main + + done - done + fi #----------------------------------------------------------------------------------- exit #----------------------------------------------------------------------------------- From 9e726b5bc2ceb1ff4a8c57c4f190d51e555cac56 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 8 Sep 2019 14:45:22 +0200 Subject: [PATCH 117/184] v6.26 + DietPi-Patch | Move DietPi-NordVPN service to /etc/systemd/system: https://github.com/MichaIng/DietPi/pull/3084 --- dietpi/patch_file | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dietpi/patch_file b/dietpi/patch_file index c2f5b72ac0..917833f1de 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2142,6 +2142,9 @@ A backup will be created to "/etc/mympd/mympd.conf.bak_DDMMYYY_N" from where you rm -f /{DietPi,boot}/dietpi/func/dietpi-set_{curlftpfs,nfsclient,smbclient} rm -f /{DietPi,boot}/dietpi/.dietpi-backup_{include,exclude} #------------------------------------------------------------------------------- + # Move DietPi-NordVPN service to /etc/systemd/system: https://github.com/MichaIng/DietPi/pull/3084 + [[ -f '/lib/systemd/system/dietpi-nordvpn.service' ]] && mv /lib/systemd/system/dietpi-nordvpn.service /etc/systemd/system/dietpi-nordvpn.service && systemctl daemon-reload + #------------------------------------------------------------------------------- # On RPi, replace haveged with rng-tools, which is proven to work on RPi, is default on Raspbian and uses less RAM on idle. if (( $G_HW_MODEL < 9 )); then From ec55d49a488fd9cb1dbb18cbfa067b5d1d1a974e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 8 Sep 2019 21:21:18 +0200 Subject: [PATCH 118/184] v6.26 + DietPi-Software | Webmin: Switch to official Webmin APT repo, which ships a slightly newer version and provides easier updating via APT for users + DietPi-Software | Webmin: Remove rsyslog dependency. Webmin logging panel still expects it and does not support journald, however we'll not impose the logging overhead of rsyslog on systemd-driven systems on our users anymore. Instead we'll leave a hint on our online docs and raise a feature request on Webmin to support systemd-journald instead. + DietPi-Software | Remove /etc/rc*.d/ symlinks to sysvinit services, when using a systemd unit instead --- dietpi/dietpi-software | 66 +++++++++++++++++++++++++++--------------- 1 file changed, 42 insertions(+), 24 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 10f9ea6376..46f98ef0a1 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -1462,7 +1462,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=9 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=3047#p3047' - aSOFTWARE_REQUIRES_RSYSLOG[$software_id]=1 #------------------ software_id=162 @@ -3357,6 +3356,7 @@ _EOF_ G_DIETPI-NOTIFY 2 'Switching from /etc/init.d/mysql to mariadb.service' systemctl disable --now mysql rm /etc/init.d/mysql + update-rc.d -f mysql remove fi @@ -4075,8 +4075,12 @@ _EOF_ Banner_Installing - DEPS_LIST='perl python' - Download_Install 'http://www.webmin.com/download/deb/webmin-current.deb' + INSTALL_URL_ADDRESS='http://www.webmin.com/jcameron-key.asc' + G_CHECK_URL "$INSTALL_URL_ADDRESS" + curl -sSL "$INSTALL_URL_ADDRESS" | apt-key add - + echo 'deb http://download.webmin.com/download/repository sarge contrib' > /etc/apt/sources.list.d/webmin.list + G_AGUP + G_AGI webmin fi @@ -4635,6 +4639,7 @@ _EOF_ G_AGI openvpn iptables # Remove obsolete sysvinit service [[ -f '/etc/init.d/openvpn' ]] && rm /etc/init.d/openvpn + update-rc.d -f openvpn remove fi @@ -7282,9 +7287,10 @@ _EOF_ Banner_Configuration # Remove old data + config directories and init.d service - rm -R /var/lib/fahclient - rm -R /etc/fahclient - rm /etc/init.d/FAHClient + [[ -d '/var/lib/fahclient' ]] && rm -R /var/lib/fahclient + [[ -d '/etc/fahclient' ]] && rm -R /etc/fahclient + [[ -f '/etc/init.d/FAHClient' ]] && rm /etc/init.d/FAHClient + update-rc.d -f FAHClient remove # Create new working (data + config) directory and log file mkdir -p $G_FP_DIETPI_USERDATA/fahclient @@ -7808,18 +7814,19 @@ The install script will now exit. After applying one of the the above, rerun die Banner_Configuration G_DIETPI-NOTIFY 2 'Configuring TURN server:' - # Buster (systemd unit) + # Buster: systemd unit if [[ -f '/lib/systemd/system/coturn.service' ]]; then - # - Remove init.d service traces + # - Remove sysvinit service traces [[ -f '/etc/init.d/coturn' ]] && rm /etc/init.d/coturn + update-rc.d -f coturn remove [[ -f '/etc/default/coturn' ]] && rm /etc/default/coturn # - Disable coturn logging by default, this can be overridden via /etc/turnserver.conf mkdir -p /etc/systemd/system/coturn.service.d echo -e "[Service]\nExecStart=\n$(grep -m1 "^[[:blank:]]*ExecStart=" /lib/systemd/system/coturn.service) -l stdout --no-stdout-log --simple-log" > /etc/systemd/system/coturn.service.d/dietpi-logging.conf - # Stretch/Jessie (init.d service) + # Stretch: sysvinit service else # - Enable init.d service @@ -7933,8 +7940,9 @@ NB: This port needs to be forwarded by your router and/or opened in your firewal Banner_Configuration - # Remove obsolete init.d service and its environment file + # Remove obsolete sysvinit service and its environment file [[ -f '/etc/init.d/transmission-daemon' ]] && rm /etc/init.d/transmission-daemon + update-rc.d -f transmission-daemon remove [[ -f '/etc/default/transmission-daemon' ]] && rm /etc/default/transmission-daemon # Run service as "dietpi" group: https://github.com/MichaIng/DietPi/issues/350#issuecomment-423763518 @@ -8402,6 +8410,7 @@ _EOF_ $usercmd -G dietpi -s $(command -v nologin) minidlna [[ -f '/etc/init.d/minidlna' ]] && rm /etc/init.d/minidlna + update-rc.d -f minidlna remove [[ -f '/lib/systemd/system/minidlna.service' ]] && rm /lib/systemd/system/minidlna.service cat << _EOF_ > /etc/systemd/system/minidlna.service @@ -8721,8 +8730,9 @@ _EOF_ fi - # Remove init.d service leftovers, installed by Debian APT package + # Remove sysvinit service leftovers, installed by Debian APT package [[ -f '/etc/init.d/deluged' ]] && rm /etc/init.d/deluged + update-rc.d -f deluged remove [[ -f '/etc/default/deluged' ]] && rm /etc/default/deluged [[ -d '/var/lib/deluged' ]] && rm -R /var/lib/deluged @@ -8737,8 +8747,8 @@ _EOF_ Banner_Configuration - update-rc.d webmin remove &> /dev/null - rm /etc/init.d/webmin &> /dev/null + [[ -f '/etc/init.d/webmin' ]] && rm /etc/init.d/webmin + update-rc.d -f webmin remove cat << _EOF_ > /etc/systemd/system/webmin.service [Unit] Description=Webmin (DietPi) @@ -9067,11 +9077,10 @@ _EOF_ Banner_Configuration # Remove bundled SysVinit service - systemctl stop logitechmediaserver &> /dev/null - systemctl disable logitechmediaserver &> /dev/null + systemctl disable --now logitechmediaserver &> /dev/null killall -qwr squeezeboxserver* # Provided service may not wait for exit, kill: https://github.com/MichaIng/DietPi/issues/1613#issuecomment-372787574 - update-rc.d logitechmediaserver remove &> /dev/null [[ -f '/etc/init.d/logitechmediaserver' ]] && rm /etc/init.d/logitechmediaserver + update-rc.d -f logitechmediaserver remove [[ -f '/etc/default/logitechmediaserver' ]] && rm /etc/default/logitechmediaserver # Grant user access to audio devices and DietPi media files @@ -9999,9 +10008,10 @@ _EOF_ Banner_Configuration - # - Replace Sysinit service with systemd - echo -e '#This file is no longer used as service has been upgraded to systemd.\n#Please see /etc/systemd/system/squeezelite.service to set start options' > /etc/default/squeezelite - rm /etc/init.d/squeezelite + # Replace sysvinit service with systemd + [[ -f '/etc/init.d/squeezelite' ]] && rm /etc/init.d/squeezelite + update-rc.d -f squeezelite remove + [[ -f '/etc/default/squeezelite' ]] && rm /etc/default/squeezelite dps_index=$software_id Download_Install 'squeezelite.service' /etc/systemd/system/squeezelite.service Download_Test_Media @@ -11132,8 +11142,9 @@ public = no #localDumpFile = $G_FP_DIETPI_USERDATA/darkice_recording.ogg _EOF_ - # Systemd service for DarkIce - rm /etc/init.d/darkice + # systemd service for DarkIce + [[ -f '/etc/init.d/darkice' ]] && rm /etc/init.d/darkice + update-rc.d -f darkice remove cat << _EOF_ > /etc/systemd/system/darkice.service [Unit] Description=DarkIce (DietPi) @@ -11154,7 +11165,8 @@ _EOF_ Banner_Configuration - rm /etc/init.d/mosquitto + [[ -f '/etc/init.d/mosquitto' ]] && rm /etc/init.d/mosquitto + update-rc.d -f mosquitto remove cat << _EOF_ > /etc/systemd/system/mosquitto.service [Unit] Description=Mosquitto (DietPi) @@ -12605,12 +12617,18 @@ _EOF_ fi - software_id=115 + software_id=115 # Webmin if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then Banner_Uninstalling + if [[ -f '/etc/systemd/system/webmin.service' ]]; then + + systemctl disable --now webmin + rm /etc/systemd/system/webmin.service + + fi G_AGP webmin - rm /etc/systemd/system/webmin.service + [[ -f '/etc/apt/sources.list.d/webmin.list' ]] && rm /etc/apt/sources.list.d/webmin.list fi From d30291744405fae8e96c175b4b6c54d5f519e3f0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 8 Sep 2019 21:34:12 +0200 Subject: [PATCH 119/184] v6.26 + DietPi-Patch | Webmin: Reinstall to apply new APT repo for all users: https://github.com/MichaIng/DietPi/commit/ec55d49a488fd9cb1dbb18cbfa067b5d1d1a974e --- dietpi/patch_file | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dietpi/patch_file b/dietpi/patch_file index 917833f1de..5ffaecab5b 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2228,6 +2228,8 @@ Do you want to keep PulseAudio installed?' || apt-mark auto pulseaudio G_AGI --reinstall aml-libs-odroid mali450-odroid libump-odroid xf86-video-fbturbo-odroid fi + # Webmin: https://github.com/MichaIng/DietPi/commit/ec55d49a488fd9cb1dbb18cbfa067b5d1d1a974e + /DietPi/dietpi/dietpi-software reinstall 115 fi #------------------------------------------------------------------------------- From f22e531a5b4b60ccc131161e4f2a3e15f0a398b9 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 8 Sep 2019 21:38:39 +0200 Subject: [PATCH 120/184] v6.26 + DietPi-Software | Webmin: Switch to HTTPS for APT repo access --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 46f98ef0a1..339183b2f3 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -4078,7 +4078,7 @@ _EOF_ INSTALL_URL_ADDRESS='http://www.webmin.com/jcameron-key.asc' G_CHECK_URL "$INSTALL_URL_ADDRESS" curl -sSL "$INSTALL_URL_ADDRESS" | apt-key add - - echo 'deb http://download.webmin.com/download/repository sarge contrib' > /etc/apt/sources.list.d/webmin.list + echo 'deb https://download.webmin.com/download/repository sarge contrib' > /etc/apt/sources.list.d/webmin.list G_AGUP G_AGI webmin From 5d0f793de0a9220fa322151282a2cd60029c7718 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 8 Sep 2019 21:52:06 +0200 Subject: [PATCH 121/184] v6.26 + CHANGELOG | DietPi-Banner/NordVPN: DietPi-NordVPN has a new input command to print the current VPN connection state, which has been implemented as banner entry as well + CHANGELOG | Webmin: Install is now done via official APT repository and rsyslog dependency has been removed --- CHANGELOG.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7dc855e182..f41762ff69 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -7,6 +7,7 @@ Changes / Improvements / Optimisations: - General | DietPi scripts, i.e. dietpi-software, will not overwrite you custom permissions in /mnt/dietpi_userdata anymore. Instead required permissions are now only applied for individual software titles that are being installed. Besides saving you time to re-apply custom permission, this as well enhances security in some cases where software installers/archives apply/contain stricter per-file/dir permissions. Many thanks to @JJGO and @johnvick for suggesting this enhancement: https://github.com/MichaIng/DietPi/issues/2641 - RPi | The haveged daemon has been replaced with rng-tools, an alternative which does not work on all devices, but has been proven to work on RPi, is default on Raspbian and uses less RAM on idle. - DietPi-Globals | The environment variable $G_USER_INPUTS has been renamed to $G_INTERACTIVE, which describes better what it does. When setting this to "0", DietPi scripts will run non-interactively, i.e. all whiptail dialog prompts and other tasks that require manual user input are skipped. Note that this is not required when running scripts from cron jobs or systemd units, since those have no STDIN attached which makes DietPi scripts run non-interactively automatically. Scripts will stay backwards-compatible, thus respect $G_USER_INPUTS for a while, but please adjust your scripts or docs where you make use of it. Many thanks to @AtkLordOverAll for contributing this change: https://github.com/MichaIng/DietPi/pull/3041 +- DietPi-Banner/NordVPN: DietPi-NordVPN has a new input command to print the current VPN connection state: "dietpi-nordvpn status". This has been implemented as well into DietPi-Banner to optionally show NordVPN connection state on login automatically. Many thanks to @svh1985 for implementing this feature: https://github.com/MichaIng/DietPi/pull/3084 - DietPi-NordVPN | Added options for connection up/down scripts, e.g. to implement killswitches, answer inbound connections from outside local network correctly, safe and track connection uptime, and similar tasks. Many thanks to @svh1985 for implementing this feature: https://github.com/MichaIng/DietPi/pull/3047 - DietPi-Config | Audio Options: Menu has been reworked. Audio capabilities (ALSA) can be enabled and disabled as a separate option. If enabled, generic sound card auto-detection has been added to the bottom of the list for all devices. This allows the selection of generic sound devices on all SBCs, e.g. if unknown to DietPi or if our hard-coded card/device IDs are wrong due to additional attached audio hardware. - DietPi-Config | RPi: Update certain config.txt settings to match new firmware version. WiFi and Bluetooth is now disabled via related dtoverlays, which should further reduce hardware and firmware loads. @@ -16,6 +17,7 @@ Changes / Improvements / Optimisations: Many thanks to @AtkLordOverAll for his effort to implement this for Lighttpd initially + the choice during install to block public admin panel access as well: https://github.com/MichaIng/DietPi/pull/3054 - DietPi-Software | OpenVPN: Rsyslog is not installed anymore together with OpenVPN server. Logs are available via "journalctl -u openvpn", all system logs via "journalctl". If you require persistent logs, uninstall DietPi-RAMlog via dietpi-software and make the journal boot persistent via: mkdir /var/log/journal - DietPi-Software | Gogs: On ARMv7 and x86_64 now the latest version from GitHub is installed. Reinstalls will upgrade the version while preserving existing settings. Many thanks to @LazyLama for doing this suggestion: https://github.com/MichaIng/DietPi/issues/2999 +- DietPi-Software | Webmin: Install is now done via official APT repository to allow easier updates. To apply this to all systems, it is reinstalled on DietPi-Update to v6.26. Additionally the dependency on rsyslog has been removed. The Webmin logging panel still depends on rsyslog, but the overhead shall not be applied to all systems by default. Instead users can now decide themselves, whether they need to see system logs on Webmin, or not, and in case apply custom logging settings as well. Bug Fixes: - General | Removed an obsolete OpenMediaVault cron job and binary that was leftover on at least one of our images (NanoPi NEO2) and is not part of the current OMV packages, thus save to remove in every case. Many thanks to @kt1024 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2994 From c71ecb85350f4cb51f6be337c045714e6e1c7d93 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 9 Sep 2019 17:02:35 +0200 Subject: [PATCH 122/184] v6.26 + DietPi-Drive_Manager | Allow and preserve multiple swap mount entries in fstab. DietPi will always create and manage one only, but if user decides to add multiple ones manually, we should not destroy the entries. + DietPi-Drive_Manager | Mount /DietPi RAMdisk with 755 permissions. The contained files/dirs have 644/755 permissions anyway, so this only affects the permissions for non-root users to write to the mounts root. And since there is no reason to do so, the size is very limited to 10 MiB and new files would only be copied to /boot on shutdown but not recovered to RAM on boot, messing up the /boot partition, we should prevent any non-root writes by default. + DietPi-Drive_Manager | Additionally to "noatime", add "lazytime" option by default to all mounts. This assures that all time-related meta data are only written to disk if data-related writes are done anyway, or after a defined timeout. Until then, meta data writes are hold in cache, like it is done with async. This option makes sense as a consequence to reduce SDcard writes/access to a minimum. + DietPi-Drive_Manager | Skip non-required fstab options and flags: "defaults" is only required as placeholder, if no other option is present. "rw" is default, so "ro" is required only, in case. dump and fsck flags are only required if non-zero or as placeholder for the following entry. + DietPi-Drive_Manager | Add /boot/efi as required boot mount with related mount options (fsck flag, no nofail, no x-systemd.automount) + DietPi-Drive_Manager | Add explicit file system type to fstab entry. This is the usual way and found by default on all images and guides around, being safe when type was estimated via df or blkid before. Only for unknown network drives, + DietPi-Drive_Manager | Minor coding and alignment: "Restart" comments hierarchy when code is aligned within a new "tab" --- dietpi/dietpi-drive_manager | 213 ++++++++++++++++++------------------ 1 file changed, 108 insertions(+), 105 deletions(-) diff --git a/dietpi/dietpi-drive_manager b/dietpi/dietpi-drive_manager index de0d6a7091..8b8787cda3 100644 --- a/dietpi/dietpi-drive_manager +++ b/dietpi/dietpi-drive_manager @@ -9,7 +9,7 @@ #//////////////////////////////////// # # Info: - # - Location: /DietPi/dietpi/dietpi-drive_manager + # - Location: /{DietPi,boot}/dietpi/dietpi-drive_manager # # Usage: # - = Interactive menu @@ -102,47 +102,43 @@ Init_Drives_and_Refresh(){ - #--------------------------------------------------------------- # Reset current index and delete arrays local i index=-1 Destroy - # Obtain actual user data location on disk (follows symlinks) + # Obtain actual user data location on disk (follow symlinks) FP_USERDATA_CURRENT=$(readlink -f $G_FP_DIETPI_USERDATA) # Swapfile location - FP_SWAPFILE_CURRENT=$(grep -m1 '^[[:blank:]]*AUTO_SETUP_SWAPFILE_LOCATION=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') + FP_SWAPFILE_CURRENT=$(sed -n '/^[[:blank:]]*AUTO_SETUP_SWAPFILE_LOCATION=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) - # RootFS location + # RootFS device location FP_ROOTFS_SOURCE=$(findmnt -no source /) # Create tmp fstab local fp_fstab_tmp='.fstab' cp -a /etc/fstab $fp_fstab_tmp - # Mounts - local swap_mount='' - local tmpfs_mounts='' - local misc_mounts='' - local net_mounts='' + # Special mounts + local swap_mounts tmpfs_mounts misc_mounts net_mounts # Mode 4: Force reset/clean fstab (PREP) if (( $INPUT == 4 )); then - local var_log_size=$(grep -m1 '^[[:blank:]]*AUTO_SETUP_RAMLOG_MAXSIZE=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') - tmpfs_mounts="tmpfs /tmp tmpfs defaults,noatime,nodev,nosuid,mode=1777 0 0 -tmpfs /var/log tmpfs defaults,size=${var_log_size}m,noatime,nodev,nosuid,mode=1777 0 0 -tmpfs /DietPi tmpfs defaults,size=10m,noatime,nodev,nosuid,mode=1777 0 0" + local var_log_size=$(sed -n '/^[[:blank:]]*AUTO_SETUP_RAMLOG_MAXSIZE=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) + tmpfs_mounts="tmpfs /tmp tmpfs noatime,lazytime,nodev,nosuid,mode=1777 +tmpfs /DietPi tmpfs size=10m,noatime,lazytime,nodev,nosuid,mode=1755 +tmpfs /var/log tmpfs size=${var_log_size}m,noatime,lazytime,nodev,nosuid,mode=1777" # Else: Grab current mounts else - swap_mount=$(grep -m1 '^[[:blank:]]*[^#].*[[:blank:]]swap[[:blank:]]' $fp_fstab_tmp) - tmpfs_mounts=$(grep '^tmpfs[[:blank:]]' $fp_fstab_tmp) + swap_mounts=$(grep '^[[:blank:]]*[^#].*[[:blank:]]swap[[:blank:]]' $fp_fstab_tmp) + tmpfs_mounts=$(grep '^[[:blank:]]*tmpfs[[:blank:]]' $fp_fstab_tmp) # ecryptfs, vboxsf, bind mounts misc_mounts=$(grep -E '^[[:blank:]]*[^#].*([[:blank:]](ecryptfs|vboxsf)[[:blank:]]|[[:blank:],]bind[[:blank:],])' $fp_fstab_tmp) # CurlFtpFS, CIFS/SMB/Samba, NFS - net_mounts=$(grep -E '(^curlftpfs|[[:blank:]](cifs|nfs4?)[[:blank:]])' $fp_fstab_tmp) + net_mounts=$(grep -E '^[[:blank:]]*(curlftpfs|[^#].*[[:blank:]](cifs|nfs4?)[[:blank:]])' $fp_fstab_tmp) fi @@ -165,19 +161,19 @@ $misc_mounts #---------------------------------------------------------------- # SWAPFILE #---------------------------------------------------------------- -$swap_mount +$swap_mounts #---------------------------------------------------------------- # PHYSICAL DRIVES #----------------------------------------------------------------" > $fp_fstab_tmp - # Detect mounted drives and add them to fstab + # Detect mounted drives G_DIETPI-NOTIFY 2 'Detecting drives, please wait...' # - Only detect mounts with valid source path (word 1 contains "/") - mawk '$1~/\// {print}' <<< $(df -Pha) > .df_out_tmp + mawk '$1~/\//{print}' <<< $(df -Pha) > .df_out_tmp - # - Remove misc items from list - # bind: https://github.com/MichaIng/DietPi/issues/2013#issuecomment-416394374 + # Remove misc items from list + # - bind: https://github.com/MichaIng/DietPi/issues/2013#issuecomment-416394374 [[ $misc_mounts ]] && while read line do @@ -190,7 +186,7 @@ $swap_mount done <<< "$misc_mounts" - # - Process final df result + # Process final df result while read line do @@ -203,7 +199,7 @@ $swap_mount aDRIVE_SIZE_FREE[$index]=$(mawk '{print $4}' <<< $line) aDRIVE_SIZE_PERCENTUSED[$index]=$(mawk '{print $5}' <<< $line) aDRIVE_MOUNT_TARGET[$index]=$(mawk '{print $6}' <<< $line) - # - Workaround for /dev/root under RPi, force physical location + # Workaround for /dev/root under RPi, force physical location [[ ${aDRIVE_MOUNT_TARGET[$index]} == '/' ]] && aDRIVE_MOUNT_SOURCE[$index]=$FP_ROOTFS_SOURCE aDRIVE_SOURCE_DEVICE[$index]=$(Return_Drive_Without_Partitions ${aDRIVE_MOUNT_SOURCE[$index]}) @@ -211,13 +207,13 @@ $swap_mount aDRIVE_UUID[$index]=$(blkid ${aDRIVE_MOUNT_SOURCE[$index]} -s UUID -o value) (( ${aDRIVE_ISPARTITIONTABLE[$index]} )) && aDRIVE_PART_UUID[$index]=$(blkid ${aDRIVE_MOUNT_SOURCE[$index]} -s PARTUUID -o value) - # - Physical? + # Physical? if [[ -d '/sys/block/'${aDRIVE_SOURCE_DEVICE[$index]} ]]; then aDRIVE_FSTYPE[$index]=$(blkid ${aDRIVE_MOUNT_SOURCE[$index]} -s TYPE -o value) [[ ${aDRIVE_FSTYPE[$index]} ]] && aDRIVE_ISFILESYSTEM[$index]=1 - # - Networked + # Networked else aDRIVE_ISNETWORKED[$index]=1 @@ -228,8 +224,8 @@ $swap_mount G_DIETPI-NOTIFY 2 " - Detected mounted drive: ${aDRIVE_MOUNT_SOURCE[$index]} > ${aDRIVE_MOUNT_TARGET[$index]}" - # - RO mounted? - # - NB: We can't use -m1 for initial check as results can be: + # R/O mounted? + # NB: We can't use -m1 for initial check as results can be: # root@DietPi:~# cat /proc/mounts | grep ' / ' # rootfs / rootfs rw 0 0 # /dev/mmcblk0p2 / ext4 ro,noatime,discard,data=ordered 0 0 @@ -237,7 +233,7 @@ $swap_mount aDRIVE_ISREADONLY_CURRENTLY[$index]=1 - # - RootFS RW check + # RootFS R/W check if [[ ${aDRIVE_MOUNT_TARGET[$index]} == '/' ]]; then if G_WHIP_YESNO "RootFS is currently set to \"Read Only (R/O)\". $G_PROGRAM_NAME requires \"Read Write (R/W)\" access to function.\n\nWould you like to re-enable R/W access on RootFS?"; then @@ -258,24 +254,34 @@ $swap_mount fi - # - Add entry to fstab + # Add entry to fstab if [[ ${aDRIVE_UUID[$index]} ]]; then - local options=',rw' - (( ${aDRIVE_ISREADONLY_CURRENTLY[$index]} )) && options=',ro' + local options='' - # - Root/BootFS dependant flags - # On RPi we need to use PARTUUID for Root/BootFS + # R/O? + (( ${aDRIVE_ISREADONLY_CURRENTLY[$index]} )) && options+=',ro' + + # Additional FS-specific options + # - NFTS: Enable POSIX permissions + if [[ ${aDRIVE_FSTYPE[$index]} == 'ntfs' ]]; then + + options+=',permissions' + + fi + + # Root/BootFS dependant flags + # - fsck flag for RootFS, to allow check on reboot and for BootFS, since corruption here is most critical and fsck finishes in no time + # - nofail: Allow boot to continue, if mount fails, not wanted for Root/BootFS + # - x-systemd.automount: [ 1166.110202] systemd-fstab-generator[3512]: Ignoring automount option for root device + # /boot is removed from local-fs.target by this (on Buster only?), allowing it to mount after RAMdisk starts and unmount before it stops. + # Source device entry local dev_entry="UUID=${aDRIVE_UUID[$index]}" - # fsck flag for RootFS, to allow check on reboot and for BootFS, since corruption here is most critical and fsck finishes in no time - # nofail: Allow boot to continue, if mount fails, not wanted for Root/BootFS - # x-systemd.automount: [ 1166.110202] systemd-fstab-generator[3512]: Ignoring automount option for root device - # /boot is removed from local-fs.target by this (on Buster only?), allowing it to mount after RAMdisk starts and unmount before it stops. - local fsck_flag=0 - if [[ ${aDRIVE_MOUNT_TARGET[$index]} =~ ^/(boot)?$ ]]; then + if [[ ${aDRIVE_MOUNT_TARGET[$index]} =~ ^/(boot(/efi)?)?$ ]]; then + # On RPi we need to use PARTUUID for Root/BootFS (( $G_HW_MODEL < 10 )) && dev_entry="PARTUUID=${aDRIVE_PART_UUID[$index]}" - fsck_flag=1 + options+=' 0 1' # dump + fsck flag else @@ -283,29 +289,25 @@ $swap_mount fi - # - Additional options for fs type specific items - # NFTS: Enable POSIX permissions for NTFS - if [[ ${aDRIVE_FSTYPE[$index]} == 'ntfs' ]]; then - - options+=',permissions' - - fi + # FS type: In case of unknown network drive, use "auto", to allow remove FS changes without breaking the fstab entry + local type=${aDRIVE_FSTYPE[$index]} + (( ${aDRIVE_ISNETWORKED[$index]} )) && type='auto' - echo "$dev_entry ${aDRIVE_MOUNT_TARGET[$index]} auto defaults,noatime$options 0 $fsck_flag" >> $fp_fstab_tmp + echo "$dev_entry ${aDRIVE_MOUNT_TARGET[$index]} $type noatime,lazytime$options" >> $fp_fstab_tmp fi done < .df_out_tmp rm .df_out_tmp - # - Check blkid for unmounted drives, if drive is not mounted, add entry as disabled/commented mount + # Check blkid for unmounted drives, if drive is not mounted, add entry as disabled/commented mount blkid -o device > .blkid_out_tmp while read line do [[ $line ]] || continue - # - Exclude drives already found + # Exclude drives already found for i in "${aDRIVE_MOUNT_SOURCE[@]}" do @@ -313,7 +315,7 @@ $swap_mount done - # - Must have a valid UUID! (this excludes /dev/mmcblk0) + # Must have a valid UUID! (this excludes /dev/mmcblk0) local uuid=$(blkid $line -s UUID -o value) [[ $uuid ]] || continue @@ -335,15 +337,15 @@ $swap_mount done < .blkid_out_tmp rm .blkid_out_tmp - # - Find unformated drives - # Exclude mtdblock devices: https://github.com/MichaIng/DietPi/issues/2067#issuecomment-422400520 + # Find unformated drives + # - Exclude mtdblock devices: https://github.com/MichaIng/DietPi/issues/2067#issuecomment-422400520 lsblk -nro NAME | sed '/^mtdblock[0-9]/d' > .lsblk_out_tmp while read line do [[ $line ]] || continue - # - Exclude drives already found + # Exclude drives already found for i in "${aDRIVE_SOURCE_DEVICE[@]}" do @@ -362,14 +364,14 @@ $swap_mount done < .lsblk_out_tmp rm .lsblk_out_tmp - # - Set required global flags and deps for all drives found + # Set required global flags and deps for all drives found for i in ${!aDRIVE_MOUNT_SOURCE[@]} do - # - Detect and set ROM drives + # Detect and set ROM drives [[ ${aDRIVE_MOUNT_SOURCE[$i]} == '/dev/sr'* ]] && aDRIVE_ISROM[$i]=1 - # - Collect required APT packages for FS R/W access + # Collect required APT packages for FS R/W access if [[ ${aDRIVE_FSTYPE[$i]} == 'ntfs' ]]; then local need_ntfs='ntfs-3g' @@ -386,7 +388,7 @@ $swap_mount done - # - Debug drive detection, exit after first init + # Debug drive detection, exit after first init if [[ $G_DEBUG == 1 ]]; then G_DIETPI-NOTIFY 0 'DEBUG INFO:' @@ -416,7 +418,7 @@ aDRIVE_ISPARTITIONTABLE ${aDRIVE_ISPARTITIONTABLE[$i]} fi - # - Remove x-systemd.automount if not supported by kernel: https://github.com/MichaIng/DietPi/issues/1607#issuecomment-372030565 + # Remove x-systemd.automount if not supported by kernel: https://github.com/MichaIng/DietPi/issues/1607#issuecomment-372030565 if ! modprobe autofs4 --dry-run &> /dev/null; then sed -i 's/,x-systemd.automount//g' $fp_fstab_tmp @@ -426,11 +428,12 @@ aDRIVE_ISPARTITIONTABLE ${aDRIVE_ISPARTITIONTABLE[$i]} Update_Menu_Drive_Index + # Move new fstab in place and reload systemd generators cp -a $fp_fstab_tmp /etc/fstab systemctl daemon-reload rm $fp_fstab_tmp - # - Install required APT packages for FS R/W access + # Install required APT packages for FS R/W access [[ $APT_CHECK == 0 && $need_ntfs$need_hfs$need_exfat ]] && G_AG_CHECK_INSTALL_PREREQ $need_ntfs $need_hfs $need_exfat && APT_CHECK=1 sync @@ -487,7 +490,7 @@ NB: The path must start with /mnt/ and be unique. Spaces will be converted autom if [[ $G_WHIP_RETURNED_VALUE == '/mnt/'* ]]; then - # - Replace spaces with underscores + # Replace spaces with underscores target=${G_WHIP_RETURNED_VALUE//[[:space:]]/_} else @@ -588,17 +591,17 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return info_format_type_output='Single partition format' - # - Unmount + # Unmount umount ${aDRIVE_MOUNT_SOURCE[$MENU_DRIVE_INDEX]} - # - Clear partition from device + # Clear partition from device G_DIETPI-NOTIFY 2 "Writing zeros to partition ${aDRIVE_MOUNT_SOURCE[$MENU_DRIVE_INDEX]}" G_RUN_CMD dd if=/dev/zero of=${aDRIVE_MOUNT_SOURCE[$MENU_DRIVE_INDEX]} bs=4K count=1337 # Drive format: Create a new partition table else - # - Umount and zero all partitions on device + # Umount and zero all partitions on device for i in /dev/${aDRIVE_SOURCE_DEVICE[$MENU_DRIVE_INDEX]}?* do @@ -609,14 +612,14 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return done - # - Unmount whole drive in case of fs on drive without partition table + # Unmount whole drive in case of fs on drive without partition table umount ${aDRIVE_MOUNT_SOURCE[$MENU_DRIVE_INDEX]} - # - Clear partition table from device + # Clear partition table from device G_DIETPI-NOTIFY 2 "Writing zeros to partition table: /dev/${aDRIVE_SOURCE_DEVICE[$MENU_DRIVE_INDEX]}" G_RUN_CMD dd if=/dev/zero of=/dev/${aDRIVE_SOURCE_DEVICE[$MENU_DRIVE_INDEX]} bs=4K count=1337 # Block device wipe - # - Create partition table type + # Create partition table type local parition_table_type='gpt' (( $FORMAT_GPT )) || parition_table_type='msdos' @@ -628,15 +631,15 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return sleep 1 # Due to systemd automount, wait for it umount ${aDRIVE_MOUNT_SOURCE[$MENU_DRIVE_INDEX]} - # - Generate new aDRIVE_MOUNT_SOURCE location to use - # mmcblkXp1/nvmeXn1p1 + # Generate new aDRIVE_MOUNT_SOURCE location to use + # - mmcblkXp1/nvmeXn1p1 aDRIVE_MOUNT_SOURCE[$MENU_DRIVE_INDEX]="/dev/${aDRIVE_SOURCE_DEVICE[$MENU_DRIVE_INDEX]}p1" - # h/sdX1 + # - h/sdX1 if [[ ${aDRIVE_SOURCE_DEVICE[$MENU_DRIVE_INDEX]} == [sh]d[a-z]* ]]; then aDRIVE_MOUNT_SOURCE[$MENU_DRIVE_INDEX]="/dev/${aDRIVE_SOURCE_DEVICE[$MENU_DRIVE_INDEX]}1" - # NanoPC-T4 + NVMe special: https://github.com/MichaIng/DietPi/issues/2102#issue-366001513 + # - NanoPC-T4 + NVMe special: https://github.com/MichaIng/DietPi/issues/2102#issue-366001513 elif [[ $G_HW_MODEL == 68 && ${aDRIVE_SOURCE_DEVICE[$MENU_DRIVE_INDEX]} == nvme* ]]; then aDRIVE_MOUNT_SOURCE[$MENU_DRIVE_INDEX]="/dev/${aDRIVE_SOURCE_DEVICE[$MENU_DRIVE_INDEX]}p6" @@ -663,7 +666,7 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return # Format FAT32 elif (( $FORMAT_FILESYSTEM_TYPE == 2 )); then - # use 1 parition on whole device + # Use 1 parition on whole device info_format_fs_type='FAT' G_RUN_CMD mkfs.vfat -I ${aDRIVE_MOUNT_SOURCE[$MENU_DRIVE_INDEX]} @@ -729,12 +732,12 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return # Update fstab cp -a /etc/fstab /etc/fstab.bak # in case of rsync fail - # - Remove automatic entry for new uuid + # - Remove automatic entry for new UUID sed -i "\@[[:blank:]]${aDRIVE_MOUNT_TARGET[$MENU_DRIVE_INDEX]}[[:blank:]]@d" /etc/fstab - # - Add new rootfs entry + # - Replace old with new rootfs entry local dev_entry="UUID=${aDRIVE_UUID[$MENU_DRIVE_INDEX]}" (( $G_HW_MODEL < 10 )) && dev_entry="PARTUUID=${aDRIVE_PART_UUID[$MENU_DRIVE_INDEX]}" - sed -i "\@[[:blank:]]/[[:blank:]][[:blank:]]*auto@c $dev_entry / auto defaults,noatime,rw 0 1" /etc/fstab + sed -i "\@UUID=[^[:blank:]]*[[:blank:]][[:blank:]]*/[[:blank:]]@c $dev_entry / ${aDRIVE_FSTYPE[$MENU_DRIVE_INDEX]} noatime,lazytime 0 1" /etc/fstab # Disable swap /DietPi/dietpi/func/dietpi-set_swapfile 0 @@ -746,7 +749,7 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return if ! rsync -aHv --delete --exclude '/dev/*' --exclude '/sys/*' --exclude '/proc/*' --exclude '/run/*' $exclude_var_log --exclude '/lost+found/' --exclude '/boot/*' --exclude '/mnt/*' --exclude "${aDRIVE_MOUNT_TARGET[$MENU_DRIVE_INDEX]}/" / "${aDRIVE_MOUNT_TARGET[$MENU_DRIVE_INDEX]}/"; then G_DIETPI-NOTIFY 1 'Rsync has failed, RootFS transfer has been aborted.' - # - Revert fstab changes + # Revert fstab changes cp -a /etc/fstab.bak /etc/fstab exit 1 @@ -757,24 +760,24 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return # - Manually update location #G_CONFIG_INJECT 'AUTO_SETUP_SWAPFILE_LOCATION=' 'AUTO_SETUP_SWAPFILE_LOCATION=/var/swap' /DietPi/dietpi.txt - # RPi | cmdline.txt + # RPi | /boot/cmdline.txt if (( $G_HW_MODEL < 10 )); then - # - Find current root= and replace + # Find current root= and replace local rootfs_current=$(mawk '{for(i=1;i<=NF;i++) {print $i} }' /boot/cmdline.txt | grep -m1 'root=') sed -i "s#$rootfs_current#root=PARTUUID=${aDRIVE_PART_UUID[$MENU_DRIVE_INDEX]}#g" /boot/cmdline.txt - # - Add root delay + # Add root delay grep -qi '[[:space:]]rootdelay=' /boot/cmdline.txt || sed -i "s#console=tty1#console=tty1 rootdelay=10#g" /boot/cmdline.txt - # - Set FS type + # Set FS type local rootfstype_current=$(mawk '{for(i=1;i<=NF;i++) {print $i} }' /boot/cmdline.txt | grep -m1 'rootfstype=') sed -i "s#$rootfstype_current#rootfstype=${aDRIVE_FSTYPE[$MENU_DRIVE_INDEX]}#g" /boot/cmdline.txt # C2/XU4 | /DietPi/boot.ini elif (( $G_HW_MODEL == 11 || $G_HW_MODEL == 12 )); then - # - Find current root= to replace + # Find current root= to replace local rootfs_current=$(mawk '{for(i=1;i<=NF;i++) {print $i} }' /DietPi/boot.ini | grep -m1 'root=' | sed 's/\"//') sed -i "s#$rootfs_current#root=UUID=${aDRIVE_UUID[$MENU_DRIVE_INDEX]}#g" /DietPi/boot.ini @@ -801,7 +804,7 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return (( $SERVICES_STOPPED )) || { /DietPi/dietpi/dietpi-services stop; SERVICES_STOPPED=1; } - # - RootFS, set fstab now, else, will not be applied to /etc/fstab during Init as already RO: https://github.com/MichaIng/DietPi/issues/2604 + # RootFS, set fstab now, else, will not be applied to /etc/fstab during Init as already RO: https://github.com/MichaIng/DietPi/issues/2604 if [[ ${aDRIVE_MOUNT_TARGET[$MENU_DRIVE_INDEX]} == '/' ]]; then local line_number=$(grep -n "[[:blank:]]${aDRIVE_MOUNT_TARGET[$MENU_DRIVE_INDEX]}[[:blank:]].*,rw" /etc/fstab | cut -d : -f 1) @@ -846,7 +849,7 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return done - # - Add + # Add (( $new_cat )) && acategory_list+=( ${aDRIVE_SOURCE_DEVICE[$i]} ) done @@ -875,7 +878,7 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return # Drive has no FS: elif (( ! ${aDRIVE_ISFILESYSTEM[$j]} )); then - # - ROM device with no ROM attached + # ROM device with no ROM attached if (( ${aDRIVE_ISROM[$j]} )); then G_WHIP_MENU_ARRAY+=("${aDRIVE_MOUNT_TARGET[$j]}" ": ${aDRIVE_MOUNT_SOURCE[$j]} | Please insert media into the ROM device") @@ -925,7 +928,7 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return MENU_LASTITEM=$G_WHIP_RETURNED_VALUE - # - Refresh + # Refresh if [[ $G_WHIP_RETURNED_VALUE == 'Refresh' ]]; then Init_Drives_and_Refresh @@ -994,7 +997,7 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return fi - # - Edit drive + # Edit drive elif [[ $G_WHIP_RETURNED_VALUE ]]; then TARGETMENUID=1 @@ -1099,8 +1102,8 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return fi - # - Swapfile - # NB: / rootfs will always be detected in this check, however, no rootFS options for umount and format... + # Swapfile + # - NB: / rootfs will always be detected in this check, however, no rootFS options for umount and format... local swapfile_size=$(grep -m1 '^[[:blank:]]*AUTO_SETUP_SWAPFILE_SIZE=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') if (( $swapfile_size > 0 )) && { [[ $FP_SWAPFILE_CURRENT == ${aDRIVE_MOUNT_TARGET[$MENU_DRIVE_INDEX]}* && ${aDRIVE_MOUNT_TARGET[$MENU_DRIVE_INDEX]} != '/' ]] || @@ -1322,7 +1325,7 @@ Please enter the desired percentage of reserved blocks, e.g. "0.05" for 0.05% or elif [[ $G_WHIP_RETURNED_VALUE == 'User data' ]]; then local fp_target_userdata_dir=${aDRIVE_MOUNT_TARGET[$MENU_DRIVE_INDEX]} - # Assign location if under RootFS + # Assign location if under RootFS [[ ${aDRIVE_MOUNT_TARGET[$MENU_DRIVE_INDEX]} == '/' ]] && fp_target_userdata_dir='/mnt' fp_target_userdata_dir+='/dietpi_userdata' @@ -1343,7 +1346,7 @@ Please enter the desired percentage of reserved blocks, e.g. "0.05" for 0.05% or elif [[ $G_WHIP_RETURNED_VALUE == 'Format' ]]; then - # - Disallow if userdata is located on this drive! + # Disallow if userdata is located on this drive! if (( $partition_contains_userdata )); then Notification 0 @@ -1352,7 +1355,7 @@ Please enter the desired percentage of reserved blocks, e.g. "0.05" for 0.05% or Notification 1 - # - User must unmount partition on this drive, before we can format, this ensures a valid unmount check + # User must unmount partition on this drive, before we can format, this ensures a valid unmount check elif (( ${aDRIVE_ISMOUNTED[$MENU_DRIVE_INDEX]} )); then G_WHIP_MSG "The partition (${aDRIVE_MOUNT_SOURCE[$MENU_DRIVE_INDEX]}) must be unmounted, before formatting is allowed.\n\nPlease use the option 'Unmount' on the next screen, then retry the 'Format' option." @@ -1371,13 +1374,13 @@ Please enter the desired percentage of reserved blocks, e.g. "0.05" for 0.05% or # Transfer RootFS elif [[ $G_WHIP_RETURNED_VALUE == 'Transfer RootFS' ]]; then - # - Kernel lacks native BTRFS support (enabled as module): https://github.com/MichaIng/DietPi/issues/2909 + # Kernel lacks native BTRFS support (enabled as module): https://github.com/MichaIng/DietPi/issues/2909 if [[ ${aDRIVE_FSTYPE[$MENU_DRIVE_INDEX]} == 'btrfs' ]]; then G_WHIP_MSG "[WARNING] Booting from ${aDRIVE_FSTYPE[$MENU_DRIVE_INDEX]} is not supported by this device.\n We recommend \"ext4\" as filesystem type for the RootFS." - # - User must unmount partition before format + # User must unmount partition before format elif (( ${aDRIVE_ISMOUNTED[$MENU_DRIVE_INDEX]} )); then G_WHIP_MSG '[WARNING] Partition must be unmounted, before format and RootFS transfer can begin.\n\nPlease unmount the partition, then try again.' @@ -1409,7 +1412,7 @@ We recommend \"ext4\" as filesystem type for the RootFS." elif [[ $G_WHIP_RETURNED_VALUE == 'Read Only' ]]; then - # - Disallow if userdata is located on this drive! + # Disallow if userdata is located on this drive! if (( $partition_contains_swapfile )); then Notification 1 @@ -1448,10 +1451,10 @@ We recommend \"ext4\" as filesystem type for the RootFS." (( $SERVICES_STOPPED )) || { /DietPi/dietpi/dietpi-services stop; SERVICES_STOPPED=1; } - # - Disable swap + # Disable swap (( $partition_contains_swapfile )) && G_RUN_CMD swapoff -a - # - Unmount drive + # Unmount drive G_RUN_CMD umount ${aDRIVE_MOUNT_SOURCE[$MENU_DRIVE_INDEX]} fi @@ -1608,12 +1611,12 @@ Read more about I/O scheduling: https://wiki.archlinux.org/index.php/Improving_p G_WHIP_MENU_ARRAY=() - # - Has partition table, offer to format single partition or whole drive + # Has partition table, offer to format single partition or whole drive if (( ${aDRIVE_ISPARTITIONTABLE[$MENU_DRIVE_INDEX]} )); then G_WHIP_MENU_ARRAY+=('Format Mode' ": [$format_mode_text]") - # - No partition table, force drive wipe + # No partition table, force drive wipe else FORMAT_MODE=0 @@ -1781,9 +1784,9 @@ NTFS:\nRecommended if you plan to use this drive on a Windows system. High CPU u G_DIETPI-NOTIFY 2 "Attempting to mount with CIFS version: $i" if mount -t cifs -o username="$samba_clientuser",password="$samba_clientpassword",uid=dietpi,gid=dietpi,file_mode=0770,dir_mode=0770,vers=$i //"$samba_clientname"/"$samba_clientshare" "$samba_fp_mount_target" &>> $fp_tmp; then - # - Apply to fstab + # Apply to fstab sed -i "\#[[:space:]]$samba_fp_mount_target[[:space:]]#d" /etc/fstab - echo "//$samba_clientname/$samba_clientshare $samba_fp_mount_target cifs username=$samba_clientuser,password=$samba_clientpassword,iocharset=utf8,uid=dietpi,gid=dietpi,file_mode=0770,dir_mode=0770,vers=$i,_netdev,nofail 0 0" >> /etc/fstab + echo "//$samba_clientname/$samba_clientshare $samba_fp_mount_target cifs username=$samba_clientuser,password=$samba_clientpassword,iocharset=utf8,uid=dietpi,gid=dietpi,file_mode=0770,dir_mode=0770,vers=$i,_netdev,nofail" >> /etc/fstab MENU_DRIVE_TARGET=$samba_fp_mount_target Init_Drives_and_Refresh @@ -1843,9 +1846,9 @@ NTFS:\nRecommended if you plan to use this drive on a Windows system. High CPU u if mount -vt nfs -o port=2049 "$nfs_server_ip":/ $nfs_fp_mount_target &>> $fp_tmp; then - # - Apply to fstab + # Apply to fstab sed -i "\#[[:space:]]$nfs_fp_mount_target[[:space:]]#d" /etc/fstab - echo "$nfs_server_ip:/ $nfs_fp_mount_target nfs auto,_netdev,nofail 0 0" >> /etc/fstab + echo "$nfs_server_ip:/ $nfs_fp_mount_target nfs auto,_netdev,nofail" >> /etc/fstab MENU_DRIVE_TARGET=$nfs_fp_mount_target Init_Drives_and_Refresh @@ -1866,9 +1869,9 @@ NTFS:\nRecommended if you plan to use this drive on a Windows system. High CPU u if mount -vt nfs -o port=2049 "$nfs_server_ip":"$nfs_fp_server_share" $nfs_fp_mount_target &>> $fp_tmp; then - # - Apply to fstab + # Apply to fstab sed -i "\#[[:space:]]$nfs_fp_mount_target[[:space:]]#d" /etc/fstab - echo "$nfs_server_ip:$nfs_fp_server_share $nfs_fp_mount_target nfs auto,_netdev,nofail 0 0" >> /etc/fstab + echo "$nfs_server_ip:$nfs_fp_server_share $nfs_fp_mount_target nfs auto,_netdev,nofail" >> /etc/fstab MENU_DRIVE_TARGET=$nfs_fp_mount_target Init_Drives_and_Refresh From e1c5ed25dff452a8ca87ca8a4d1058334787a564 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 10 Sep 2019 15:01:59 +0200 Subject: [PATCH 123/184] v6.26 + DietPi-Config | Add RPi4 overclocking profiles: https://dietpi.com/phpbb/viewtopic.php?f=12&t=6225 + DietPi-Config | Fix RPi2 overclocking profiles showing wrong default SDRAM clock + DietPi-Config | RPi4 does not support SDRAM clock + DietPi-Config | Coding + visual: Use G_CONFIG_INJECT to apply settings --- dietpi/dietpi-config | 133 +++++++++++++++++++++++++++++++++---------- 1 file changed, 102 insertions(+), 31 deletions(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index b0bdecedf2..f03c0de57c 100644 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -3517,7 +3517,7 @@ Additional benchmarks: sed -i '/arm_freq=/c\#arm_freq=1500' /DietPi/config.txt sed -i '/core_freq=/c\#core_freq=500' /DietPi/config.txt - sed -i '/sdram_freq=/c\#sdram_freq=3200' /DietPi/config.txt + sed -i '/sdram_freq=/d' /DietPi/config.txt elif (( $G_HW_MODEL == 3 )); then @@ -3578,7 +3578,7 @@ Additional benchmarks: local over_voltage_value=$(grep -m1 'over_voltage=' /DietPi/config.txt | tr -d '#over_voltage=') local arm_freq_value=$(grep -m1 'arm_freq=' /DietPi/config.txt | tr -d '#arm_freq=') local core_freq_value=$(grep -m1 'core_freq=' /DietPi/config.txt | tr -d '#core_freq=') - local sdram_freq_value=$(grep -m1 'sdram_freq=' /DietPi/config.txt | tr -d '#sdram_freq=') + (( $G_HW_MODEL == 4 )) || local sdram_freq_value=$(grep -m1 'sdram_freq=' /DietPi/config.txt | tr -d '#sdram_freq=') # Overclocking RPi1 # - Zero @@ -3630,8 +3630,8 @@ Additional benchmarks: 'safe') Reset_Overclocking - sed -i '/over_voltage=/c\over_voltage=2' /DietPi/config.txt - sed -i '/arm_freq=/c\arm_freq=900' /DietPi/config.txt + G_CONFIG_INJECT 'over_voltage=' 'over_voltage=2' /DietPi/config.txt + G_CONFIG_INJECT 'arm_freq=' 'arm_freq=900' /DietPi/config.txt ;; @@ -3640,9 +3640,9 @@ Additional benchmarks: if Warning_Overclocking; then Reset_Overclocking - sed -i '/over_voltage=/c\over_voltage=4' /DietPi/config.txt - sed -i '/arm_freq=/c\arm_freq=900' /DietPi/config.txt - sed -i '/core_freq=/c\core_freq=500' /DietPi/config.txt + G_CONFIG_INJECT 'over_voltage=' 'over_voltage=4' /DietPi/config.txt + G_CONFIG_INJECT 'arm_freq=' 'arm_freq=900' /DietPi/config.txt + G_CONFIG_INJECT 'core_freq=' 'core_freq=500' /DietPi/config.txt fi @@ -3653,9 +3653,9 @@ Additional benchmarks: if Warning_Overclocking; then Reset_Overclocking - sed -i '/over_voltage=/c\over_voltage=6' /DietPi/config.txt - sed -i '/arm_freq=/c\arm_freq=1025' /DietPi/config.txt - sed -i '/core_freq=/c\core_freq=500' /DietPi/config.txt + G_CONFIG_INJECT 'over_voltage=' 'over_voltage=6' /DietPi/config.txt + G_CONFIG_INJECT 'arm_freq=' 'arm_freq=1025' /DietPi/config.txt + G_CONFIG_INJECT 'core_freq=' 'core_freq=500' /DietPi/config.txt fi @@ -3670,10 +3670,10 @@ Additional benchmarks: G_WHIP_MENU_ARRAY=( - 'none' ': 900 MHz ARM | 250 MHz core | 450 MHz SDRAM | 0 overvolt' - 'low' ': 1000 MHz ARM | 250 MHz core | 450 MHz SDRAM | 3 overvolt' - 'med' ': 1000 MHz ARM | 500 MHz core | 450 MHz SDRAM | 5 overvolt' - 'extreme' ': 1050 MHz ARM | 500 MHz core | 450 MHz SDRAM | 6 overvolt' + 'none' ': 900 MHz ARM | 250 MHz core | 400 MHz SDRAM | 0 overvolt' + 'low' ': 1000 MHz ARM | 250 MHz core | 400 MHz SDRAM | 3 overvolt' + 'med' ': 1000 MHz ARM | 500 MHz core | 400 MHz SDRAM | 5 overvolt' + 'extreme' ': 1050 MHz ARM | 500 MHz core | 400 MHz SDRAM | 6 overvolt' ) @@ -3695,8 +3695,8 @@ Additional benchmarks: if Warning_Overclocking; then Reset_Overclocking - sed -i '/over_voltage=/c\over_voltage=3' /DietPi/config.txt - sed -i '/arm_freq=/c\arm_freq=1000' /DietPi/config.txt + G_CONFIG_INJECT 'over_voltage=' 'over_voltage=3' /DietPi/config.txt + G_CONFIG_INJECT 'arm_freq=' 'arm_freq=1000' /DietPi/config.txt fi @@ -3707,9 +3707,9 @@ Additional benchmarks: if Warning_Overclocking; then Reset_Overclocking - sed -i '/over_voltage=/c\over_voltage=5' /DietPi/config.txt - sed -i '/arm_freq=/c\arm_freq=1000' /DietPi/config.txt - sed -i '/core_freq=/c\core_freq=500' /DietPi/config.txt + G_CONFIG_INJECT 'over_voltage=' 'over_voltage=5' /DietPi/config.txt + G_CONFIG_INJECT 'arm_freq=' 'arm_freq=1000' /DietPi/config.txt + G_CONFIG_INJECT 'core_freq=' 'core_freq=500' /DietPi/config.txt fi @@ -3720,9 +3720,9 @@ Additional benchmarks: if Warning_Overclocking; then Reset_Overclocking - sed -i '/over_voltage=/c\over_voltage=6' /DietPi/config.txt - sed -i '/arm_freq=/c\arm_freq=1050' /DietPi/config.txt - sed -i '/core_freq=/c\core_freq=500' /DietPi/config.txt + G_CONFIG_INJECT 'over_voltage=' 'over_voltage=6' /DietPi/config.txt + G_CONFIG_INJECT 'arm_freq=' 'arm_freq=1050' /DietPi/config.txt + G_CONFIG_INJECT 'core_freq=' 'core_freq=500' /DietPi/config.txt fi @@ -3770,9 +3770,9 @@ Additional benchmarks: if Warning_Overclocking; then Reset_Overclocking - sed -i '/arm_freq=/c\arm_freq=1300' /DietPi/config.txt - sed -i '/over_voltage=/c\over_voltage=3' /DietPi/config.txt - sed -i '/core_freq=/c\core_freq=400' /DietPi/config.txt + G_CONFIG_INJECT 'over_voltage=' 'over_voltage=3' /DietPi/config.txt + G_CONFIG_INJECT 'arm_freq=' 'arm_freq=1300' /DietPi/config.txt + G_CONFIG_INJECT 'core_freq=' 'core_freq=400' /DietPi/config.txt fi @@ -3783,9 +3783,9 @@ Additional benchmarks: if Warning_Overclocking; then Reset_Overclocking - sed -i '/arm_freq=/c\arm_freq=1325' /DietPi/config.txt - sed -i '/over_voltage=/c\over_voltage=4' /DietPi/config.txt - sed -i '/core_freq=/c\core_freq=400' /DietPi/config.txt + G_CONFIG_INJECT 'over_voltage=' 'over_voltage=4' /DietPi/config.txt + G_CONFIG_INJECT 'arm_freq=' 'arm_freq=1325' /DietPi/config.txt + G_CONFIG_INJECT 'core_freq=' 'core_freq=400' /DietPi/config.txt fi @@ -3796,9 +3796,9 @@ Additional benchmarks: if Warning_Overclocking; then Reset_Overclocking - sed -i '/over_voltage=/c\over_voltage=5' /DietPi/config.txt - sed -i '/arm_freq=/c\arm_freq=1350' /DietPi/config.txt - sed -i '/core_freq=/c\core_freq=400' /DietPi/config.txt + G_CONFIG_INJECT 'over_voltage=' 'over_voltage=5' /DietPi/config.txt + G_CONFIG_INJECT 'arm_freq=' 'arm_freq=1350' /DietPi/config.txt + G_CONFIG_INJECT 'core_freq=' 'core_freq=400' /DietPi/config.txt fi @@ -3808,6 +3808,77 @@ Additional benchmarks: fi + # Overclocking Pi4 + elif (( $G_HW_MODEL == 4 )); then + + G_WHIP_MENU_ARRAY=( + + 'energy saving' ': 1500 MHz ARM | 500 MHz core | -2 overvolt' + 'default' ': 1500 MHz ARM | 500 MHz core | 0 overvolt' + 'safe' ': 1600 MHz ARM | 500 MHz core | 0 overvolt' + 'medium GPU' ': 1600 MHz ARM | 600 MHz core | 2 overvolt' + 'medium ARM' ': 1750 MHz ARM | 500 MHz core | 2 overvolt' + 'high GPU' ': 1750 MHz ARM | 600 MHz core | 4 overvolt' + 'high ARM' ': 1900 MHz ARM | 500 MHz core | 4 overvolt' + + ) + + G_WHIP_MENU "Hardware : $G_HW_MODEL_DESCRIPTION\nCurrent: $arm_freq_value MHz ARM | $core_freq_value MHz core | $over_voltage_value overvolt" + if (( $? == 0 )); then + + TARGETMENUID=13 # Return to this menu + Reset_Overclocking + + case "$G_WHIP_RETURNED_VALUE" in + + 'energy saving') + + G_CONFIG_INJECT 'over_voltage=' 'over_voltage=-2' /DietPi/config.txt + + ;; + + 'safe') + + G_CONFIG_INJECT 'arm_freq=' 'arm_freq=1600' /DietPi/config.txt + + ;; + + 'medium GPU') + + G_CONFIG_INJECT 'over_voltage=' 'over_voltage=2' /DietPi/config.txt + G_CONFIG_INJECT 'arm_freq=' 'arm_freq=1600' /DietPi/config.txt + G_CONFIG_INJECT 'core_freq=' 'core_freq=600' /DietPi/config.txt + + ;; + + 'medium ARM') + + G_CONFIG_INJECT 'over_voltage=' 'over_voltage=2' /DietPi/config.txt + G_CONFIG_INJECT 'arm_freq=' 'arm_freq=1750' /DietPi/config.txt + G_CONFIG_INJECT 'core_freq=' 'core_freq=500' /DietPi/config.txt + + ;; + + 'high GPU') + + G_CONFIG_INJECT 'over_voltage=' 'over_voltage=4' /DietPi/config.txt + G_CONFIG_INJECT 'arm_freq=' 'arm_freq=1750' /DietPi/config.txt + G_CONFIG_INJECT 'core_freq=' 'core_freq=600' /DietPi/config.txt + + ;; + + 'high ARM') + + G_CONFIG_INJECT 'over_voltage=' 'over_voltage=4' /DietPi/config.txt + G_CONFIG_INJECT 'arm_freq=' 'arm_freq=1900' /DietPi/config.txt + G_CONFIG_INJECT 'core_freq=' 'core_freq=500' /DietPi/config.txt + + ;; + + esac + + fi + fi } From 7031514be7100b3293fb93cb7898166c02ebb4d9 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 10 Sep 2019 15:02:42 +0200 Subject: [PATCH 124/184] v6.26 + DietPi-FirstBoot | RPi4 does not support SDRAM clock, thus remove setting from config.txt --- rootfs/var/lib/dietpi/services/dietpi-firstboot.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash b/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash index 276af5942f..63d1526d3f 100755 --- a/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash +++ b/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash @@ -75,7 +75,7 @@ sed -i '/over_voltage=/c\#over_voltage=0' /DietPi/config.txt sed -i '/arm_freq=/c\#arm_freq=1500' /DietPi/config.txt sed -i '/core_freq=/c\#core_freq=500' /DietPi/config.txt - sed -i '/sdram_freq=/c\#sdram_freq=3200' /DietPi/config.txt + sed -i '/sdram_freq=/d' /DietPi/config.txt # Not supported on RPi4, defaults to 3200 MHz G_CONFIG_INJECT 'temp_limit=' 'temp_limit=75' /DietPi/config.txt # https://github.com/MichaIng/DietPi/issues/3019 fi From 4886c55fc89fb5286300f265ef2988936a776958 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 11 Sep 2019 12:45:17 +0200 Subject: [PATCH 125/184] v6.26 + DietPi-Software | Amiberry: Use name capitalisation that matches official website/docs + DietPi-Software | Amiberry: Re-enable experimental support for XU4, since it is Stretch now + DietPi-Software | Amiberry: Fix install on Buster+ due to "libsndio6.1" => "libsndio7.0" package switch + DietPi-Software | Amiberry: Minor coding, e.g. failsafe rekursiv userdata symlink estimation --- dietpi/dietpi-software | 48 ++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 339183b2f3..9f60d729b6 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -1109,7 +1109,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=108 - aSOFTWARE_NAME[$software_id]='AmiBerry' + aSOFTWARE_NAME[$software_id]='Amiberry' aSOFTWARE_DESC[$software_id]='amiga emulator' aSOFTWARE_CATEGORY_INDEX[$software_id]=5 aSOFTWARE_TYPE[$software_id]=0 @@ -1124,10 +1124,10 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,$i]=0 done - aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,52]=1 # + ASUS TB - + # + ASUS TB + aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,52]=1 # + XU4 test - #aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,11]=1 # Requires Stretch due to libc requirements + aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,11]=1 #------------------ software_id=51 @@ -3926,7 +3926,8 @@ _EOF_ # Backup existing autostart.uae for user G_BACKUP_FP $G_FP_DIETPI_USERDATA/amiberry/conf/autostart.uae - DEPS_LIST='libmpg123-0 libxml2 mpeg2dec libmpeg2-4 libsndio6.1' + DEPS_LIST='libmpg123-0 libxml2 mpeg2dec libmpeg2-4' + (( $G_DISTRO < 5 )) && DEPS_LIST+=' libsndio6.1' || DEPS_LIST+=' libsndio7.0' Download_Install 'https://dietpi.com/downloads/binaries/all/amiberry_v2.25.7z' $G_FP_DIETPI_USERDATA fi @@ -8475,63 +8476,60 @@ _EOF_ # Allow binary execution chmod -R +x $G_FP_DIETPI_USERDATA/amiberry - local amiberry_filename=0 + local amiberry_filename local capsimg_filename='capsimg-rpi.so' - # - ASUS TB + # ASUS TB if (( $G_HW_MODEL == 52 )); then amiberry_filename='amiberry-tinker' capsimg_filename='capsimg-tinker.so' - # - XU4 + # XU4 elif (( $G_HW_MODEL == 11 )); then amiberry_filename='amiberry-xu4' capsimg_filename='capsimg-xu4.so' - # - RPi 4 + # RPi 4 elif (( $G_HW_MODEL == 4 )); then : - # - RPi 3 + # RPi 3 elif (( $G_HW_MODEL == 3 )); then amiberry_filename='amiberry-rpi3-sdl2-dispmanx' - # - RPi 2 + # RPi 2 elif (( $G_HW_MODEL == 2 )); then amiberry_filename='amiberry-rpi2-sdl2-dispmanx' - # - Assume RPi 1 (ARMv6) + # Assume RPi 1 (ARMv6) else amiberry_filename='amiberry-rpi1-sdl2-dispmanx' fi - # - Update capsimg.so - rm $G_FP_DIETPI_USERDATA/amiberry/capsimg.so &> /dev/null - mv $G_FP_DIETPI_USERDATA/amiberry/"$capsimg_filename" $G_FP_DIETPI_USERDATA/amiberry/capsimg.so + # Update capsimg.so + mv "$G_FP_DIETPI_USERDATA/amiberry/$capsimg_filename" $G_FP_DIETPI_USERDATA/amiberry/capsimg.so - # - Create additional user media directories - mkdir -p $G_FP_DIETPI_USERDATA/amiberry/floppy_images - mkdir -p $G_FP_DIETPI_USERDATA/amiberry/hdf - mkdir -p $G_FP_DIETPI_USERDATA/amiberry/cd + # Create additional user media directories + mkdir -p $G_FP_DIETPI_USERDATA/amiberry/{floppy_images,hdf,cd} - # Uae4arm does not support browsing symlinks (https://github.com/MichaIng/DietPi/issues/474#issuecomment-242973839) - # So we need to change config file default paths to actual userdata location: - local fp_userdata_actual=$(readlink $G_FP_DIETPI_USERDATA) # Only returns a value if symlink exists (eg: off SDcard) - if [[ $fp_userdata_actual ]]; then + # Uae4arm does not support browsing symlinks: https://github.com/MichaIng/DietPi/issues/474#issuecomment-242973839 + # - So we need to change config file default paths to actual userdata location: + if [[ -L $G_FP_DIETPI_USERDATA ]]; then + local fp_userdata_actual=$(readlink -f $G_FP_DIETPI_USERDATA) sed -i "s:$G_FP_DIETPI_USERDATA:$fp_userdata_actual:g" $G_FP_DIETPI_USERDATA/amiberry/conf/adfdir.conf sed -i "s:$G_FP_DIETPI_USERDATA:$fp_userdata_actual:g" $G_FP_DIETPI_USERDATA/amiberry/conf/autostart.uae fi - # - Service + # Service local exec_start="$G_FP_DIETPI_USERDATA/amiberry/$amiberry_filename -f $G_FP_DIETPI_USERDATA/amiberry/conf/autostart.uae" if (( $G_HW_MODEL == 52 )); then @@ -8541,7 +8539,7 @@ _EOF_ cat << _EOF_ > /etc/systemd/system/amiberry.service [Unit] -Description=AmiBerry Amiga Emulator (DietPi) +Description=Amiberry Amiga Emulator (DietPi) [Service] #StandardOutput=tty From 80c710c4f22f3e43d0f420389fb90a848e1e6874 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 11 Sep 2019 13:13:21 +0200 Subject: [PATCH 126/184] v6.26 + CHANGELOG | DietPi-Config: Added RPi4 overclocking profiles + CHANGELOG | Amiberry: Enabled experimental support for Odroid XU4 + CHANGELOG | Amiberry: Resolved an issue where install failed on Buster --- CHANGELOG.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f41762ff69..4ea1c573e5 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -12,12 +12,14 @@ Changes / Improvements / Optimisations: - DietPi-Config | Audio Options: Menu has been reworked. Audio capabilities (ALSA) can be enabled and disabled as a separate option. If enabled, generic sound card auto-detection has been added to the bottom of the list for all devices. This allows the selection of generic sound devices on all SBCs, e.g. if unknown to DietPi or if our hard-coded card/device IDs are wrong due to additional attached audio hardware. - DietPi-Config | RPi: Update certain config.txt settings to match new firmware version. WiFi and Bluetooth is now disabled via related dtoverlays, which should further reduce hardware and firmware loads. - DietPi-Config | Some /etc/modprobe.d/ configs are merged to less files and mostly prefixed with "dietpi-", to allow easier differentiation between Debian/pre-image and DietPi files. +- DietPi-Config | Added overclocking profiles for RPi4. Many thanks to @aftensleuk for request and valuable suggestions: https://dietpi.com/phpbb/viewtopic.php?f=12&t=6225 - DietPi-Software | Pi-hole: Logging to /var/log/pihole.log is now disabled by default, since it is not required in usual cases. Query logs, shown in web UI, are stored in database. This might also resolve possible pihole-FTL crashes in combination with DietPi-RAMlog and DietPi-Logclear. Many thanks to @kuerious for reporting and @Mcat12 for providing helpful information on this topic: https://github.com/pi-hole/FTL/issues/614 - DietPi-Software | Pi-hole: Webserver configs have been added to block public access to the blocking page, optionally as well to the admin panel and generally block access to dot files/dirs (.git*) inside the admin panel directory. Parts are inspired by the official Lighttpd config, provided by Pi-hole: https://github.com/pi-hole/pi-hole/blob/master/advanced/lighttpd.conf.debian Many thanks to @AtkLordOverAll for his effort to implement this for Lighttpd initially + the choice during install to block public admin panel access as well: https://github.com/MichaIng/DietPi/pull/3054 - DietPi-Software | OpenVPN: Rsyslog is not installed anymore together with OpenVPN server. Logs are available via "journalctl -u openvpn", all system logs via "journalctl". If you require persistent logs, uninstall DietPi-RAMlog via dietpi-software and make the journal boot persistent via: mkdir /var/log/journal - DietPi-Software | Gogs: On ARMv7 and x86_64 now the latest version from GitHub is installed. Reinstalls will upgrade the version while preserving existing settings. Many thanks to @LazyLama for doing this suggestion: https://github.com/MichaIng/DietPi/issues/2999 - DietPi-Software | Webmin: Install is now done via official APT repository to allow easier updates. To apply this to all systems, it is reinstalled on DietPi-Update to v6.26. Additionally the dependency on rsyslog has been removed. The Webmin logging panel still depends on rsyslog, but the overhead shall not be applied to all systems by default. Instead users can now decide themselves, whether they need to see system logs on Webmin, or not, and in case apply custom logging settings as well. +- DietPi-Software | Amiberry: Enabled experimental support for Odroid XU4. Bug Fixes: - General | Removed an obsolete OpenMediaVault cron job and binary that was leftover on at least one of our images (NanoPi NEO2) and is not part of the current OMV packages, thus save to remove in every case. Many thanks to @kt1024 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2994 @@ -40,6 +42,7 @@ Bug Fixes: - DietPi-Software | TigerVNC: Resolved an issue on Debian Buster, where the VNC connection fails immediately due to an external bug, if no read-only password has been applied via vncpasswd. Many thanks to @Trunkzeh for reporting this issue and providing the workaround: https://github.com/MichaIng/DietPi/issues/3070 - DietPi-Software | TigerVNC: Resolved minor error messages on login and in logs: "No session for PID ...", "DE is (null); No desktop environnement set, fallback to LXDE", "Use of uninitialized value $proto in socket at /usr/bin/tigervncserver" - DietPi-Software | Netdata: Resolved an issue where install failed on Stretch systems. Many thanks to @Velociraptor85 for reporting this issue: https://github.com/MichaIng/DietPi/issues/3062 +- DietPi-Software | Amiberry: Resolved an issue where install failed on Buster due to changed library package version. Many thanks to @TuKo1982 for reporting this issue: https://github.com/MichaIng/DietPi/issues/3104 As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/XXXX From 1bdf5858a791fc6d5595026982fd070e6a3e8782 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 11 Sep 2019 17:59:30 +0200 Subject: [PATCH 127/184] v6.26 + DietPi-Config | Headless: On RPi, "hdmi_ignore_composite" has been removed, instead on RPi4 "enable_tvout" has been added. Since there is no option anymore that disables the whole video+framebuffer pipe, we need to run "tvservice -o" again to disable video output completely. --- dietpi/func/dietpi-set_hardware | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index ce0c3a1339..c0acb09a21 100644 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -233,21 +233,19 @@ _EOF_ # RPi if (( $G_HW_MODEL < 10 )); then - # - Framebuffer dimensions should not play a role here, but - # if NOT set, they appear as "0" by asking "vcgencmd get_config (max_)?framebuffer_(width|height)" - # otherwise vcgencmd shows the set value. So we simply comment it. - sed -i '/^[[:blank:]]*framebuffer_width=/c\#framebuffer_width=0' $FP_RPI_CONFIG - sed -i '/^[[:blank:]]*framebuffer_height=/c\#framebuffer_height=0' $FP_RPI_CONFIG - sed -i '/^[[:blank:]]*max_framebuffer_width=/c\#max_framebuffer_width=0' $FP_RPI_CONFIG - sed -i '/^[[:blank:]]*max_framebuffer_height=/c\#max_framebuffer_height=0' $FP_RPI_CONFIG + # Apply lowest possible framebuffer size + G_CONFIG_INJECT 'framebuffer_width=' 'framebuffer_width=16' $FP_RPI_CONFIG + G_CONFIG_INJECT 'framebuffer_height=' 'framebuffer_height=16' $FP_RPI_CONFIG + G_CONFIG_INJECT 'max_framebuffer_width=' 'max_framebuffer_width=16' $FP_RPI_CONFIG + G_CONFIG_INJECT 'max_framebuffer_height=' 'max_framebuffer_height=16' $FP_RPI_CONFIG # - Splash cannot be seen anyway without video output G_CONFIG_INJECT 'disable_splash=' 'disable_splash=1' $FP_RPI_CONFIG # - hdmi_blanking should not play a role, however mode 1 should be generally preferred, which on idle disables HDMI output completely instead of just blanking the screen G_CONFIG_INJECT 'hdmi_blanking=' 'hdmi_blanking=1' $FP_RPI_CONFIG # - Disable HDMI hotplug detection, which requires it to be generally responsive/active G_CONFIG_INJECT 'hdmi_ignore_hotplug=' 'hdmi_ignore_hotplug=1' $FP_RPI_CONFIG - # - Disable composite hotplug, which then allows to completely disable the video pipeline + framebuffer - G_CONFIG_INJECT 'hdmi_ignore_composite=' 'hdmi_ignore_composite=1' $FP_RPI_CONFIG + # - Disable SDTV on RPi4 + sed -i '/^[[:blank:]]*enable_tvout=/c\#enable_tvout=0' $FP_RPI_CONFIG # Odroid C2 elif (( $G_HW_MODEL == 12 )); then @@ -265,9 +263,13 @@ _EOF_ # RPi if (( $G_HW_MODEL < 10 )); then - sed -i '/^[[:blank:]]*hdmi_ignore_hotplug=/c\#hdmi_ignore_hotplug=0' $FP_RPI_CONFIG - sed -i '/^[[:blank:]]*hdmi_ignore_composite=/c\#hdmi_ignore_composite=0' $FP_RPI_CONFIG + sed -i '/^[[:blank:]]*framebuffer_width=/c\#framebuffer_width=16' $FP_RPI_CONFIG + sed -i '/^[[:blank:]]*framebuffer_height=/c\#framebuffer_height=16' $FP_RPI_CONFIG + sed -i '/^[[:blank:]]*max_framebuffer_width=/c\#max_framebuffer_width=16' $FP_RPI_CONFIG + sed -i '/^[[:blank:]]*max_framebuffer_height=/c\#max_framebuffer_height=16' $FP_RPI_CONFIG sed -i '/^[[:blank:]]*hdmi_blanking=/c\#hdmi_blanking=0' $FP_RPI_CONFIG + sed -i '/^[[:blank:]]*hdmi_ignore_hotplug=/c\#hdmi_ignore_hotplug=0' $FP_RPI_CONFIG + sed -i '/^[[:blank:]]*enable_tvout=/c\#enable_tvout=0' $FP_RPI_CONFIG # Odroid C2 elif (( $G_HW_MODEL == 12 )); then From 4b2ad6b58ba9b1e103188fcf590bbdc50bf0b4da Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 11 Sep 2019 18:02:18 +0200 Subject: [PATCH 128/184] v6.26 + DietPi-Config | Headless: Edit dietpi.txt entry as well when switching headless mode --- dietpi/func/dietpi-set_hardware | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index c0acb09a21..11c3130fff 100644 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -258,6 +258,8 @@ _EOF_ fi + G_CONFIG_INJECT 'AUTO_SETUP_HEADLESS=' 'AUTO_SETUP_HEADLESS=1' /DietPi/dietpi.txt + elif [[ $INPUT_DEVICE_VALUE == 'disable' ]]; then # RPi @@ -282,6 +284,8 @@ _EOF_ fi + G_CONFIG_INJECT 'AUTO_SETUP_HEADLESS=' 'AUTO_SETUP_HEADLESS=0' /DietPi/dietpi.txt + else Unknown_Input_Mode From c21a727f35a3ab1eeeef5fdaf821dd7e38195688 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 11 Sep 2019 18:07:32 +0200 Subject: [PATCH 129/184] v6.26 + DietPi-PreBoot | On RPi, if headless mode was chosen, disable video output via tvservice, since the config.txt setting to boot without video output has been removed. --- dietpi/preboot | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dietpi/preboot b/dietpi/preboot index ad9b4ca91b..15d6f47f9d 100644 --- a/dietpi/preboot +++ b/dietpi/preboot @@ -29,6 +29,9 @@ # Apply LED triggers if set G_THREAD_START /DietPi/dietpi/func/dietpi-led_control 1 + + # Disable video output on RPi when headless mode has been chosen + (( $G_HW_MODEL < 10 )) && grep -q '^[[:blank:]]*AUTO_SETUP_HEADLESS=1' /DietPi/dietpi.txt && tvservice -o #----------------------------------------------------------------------------------- G_THREAD_WAIT exit From dc7208d1c77da51b01b9d908f3e0b75c1cb9d21f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 11 Sep 2019 18:12:33 +0200 Subject: [PATCH 130/184] v6.26 + CHANGELOG | Resolved an issue on RPi where headless mode did not disable all video outputs and framebuffer as intended --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4ea1c573e5..97327850eb 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -29,6 +29,7 @@ Bug Fixes: - DietPi-Run_NTPD | Resolved an issue where changing time sync mode or mirror, from within time sync error prompt, led to a concurrent script execution. Many thanks to @Sopor for reporting this issue: https://github.com/MichaIng/DietPi/issues/3010 - DietPi-Services | Resolved an issue where single service calls failed if their names contain certain special characters, like dots. Many thanks to @maartenlangeveld for reporting this issue: https://github.com/MichaIng/DietPi/issues/3059 - DietPi-Config | Resolved an issue on RPi where I2C baudrate was not applied correctly, thus selection was ineffective. Many thanks to @flashspys for reporting this issue: https://github.com/MichaIng/DietPi/issues/2966 +- DietPi-Config | Resolved an issue on RPi where headless mode did not disable all video outputs and framebuffer as intended, since the used config.txt setting has been removed with recent firmware versions. - DietPi-Software | Resolved an issue where the script tells you that SQLite will be installed as pre-req, while actually a desktop is required and LXDE will be installed. - DietPi-Software | X11/Kodi on Odroid C2: Resolved an issue on Odroid C2 where Kodi failed to start. GPU drivers and X11 config will be updated during DietPi-Update to cover this issue. Many thanks to @alexeylutskov for reporting this issue and testing the fix: https://github.com/MichaIng/DietPi/issues/3028 - DietPi-Software | Gitea: Resolved an issue where install fails on ARMv7 systems. Many thanks to @maschiw for reporting this issue: https://github.com/MichaIng/DietPi/issues/2959 From d92df03e5b63c879767bccce8c3da8bf76f3dd9d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 11 Sep 2019 18:35:49 +0200 Subject: [PATCH 131/184] v6.26 + DietPi-Config | Fix RPi headless mode estimation and info, based on required method change --- dietpi/dietpi-config | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index f03c0de57c..10724c10eb 100644 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -830,7 +830,7 @@ A long (or insufficiently manufactured) cable may required a higher boost settin current_value="$framebuffer_x X $framebuffer_y" # - Check for headless - grep -q '^[[:blank:]]*hdmi_ignore_hotplug=1' /DietPi/config.txt && grep -q '^[[:blank:]]*hdmi_ignore_composite=1' /DietPi/config.txt && current_value='Headless' + grep -q '^[[:blank:]]*AUTO_SETUP_HEADLESS=1' /DietPi/dietpi.txt && current_value='Headless' fi @@ -868,12 +868,10 @@ A long (or insufficiently manufactured) cable may required a higher boost settin - Disable the framebuffer - Lower energy consumption by 0.1+ Watts - Improve RAM performance by 1-5% (VideoCore shares RAM bandwidth) - - Lead to some kernel error messages on boot, that can be ignored\n -Re-enabling HDMI requires a reboot. If you need emergency HDMI output, comment or remove the following lines within "config.txt" on first partition of the SDcard from external system: - - hdmi_ignore_hotplug=1 - - hdmi_ignore_composite=1\n -More info here: https://www.raspberrypi.org/forums/viewtopic.php?p=105008#p105008 - and here: https://github.com/raspberrypi/userland/issues/447#issuecomment-404399670' || { REBOOT_REQUIRED=0; return; } + Source: https://www.raspberrypi.org/forums/viewtopic.php?p=105008#p105008\n +Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the following files on first partition of the SDcard from external system: + - In config.txt, set "hdmi_ignore_hotplug=0" and comment/remove all (max_)framebuffer_(width/height) lines. + - In dietpi.txt, set "AUTO_SETUP_HEADLESS=1".' || { REBOOT_REQUIRED=0; return; } /DietPi/dietpi/func/dietpi-set_hardware headless 1 From 8e5c729b0dee010f9c5f5b6c8ec4eb4bf4acb01c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 11 Sep 2019 18:48:44 +0200 Subject: [PATCH 132/184] v6.26 + DietPi-Patch | On RPi, reapply headless mode correctly --- dietpi/patch_file | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dietpi/patch_file b/dietpi/patch_file index 5ffaecab5b..05e92e188e 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2146,11 +2146,19 @@ A backup will be created to "/etc/mympd/mympd.conf.bak_DDMMYYY_N" from where you [[ -f '/lib/systemd/system/dietpi-nordvpn.service' ]] && mv /lib/systemd/system/dietpi-nordvpn.service /etc/systemd/system/dietpi-nordvpn.service && systemctl daemon-reload #------------------------------------------------------------------------------- # On RPi, replace haveged with rng-tools, which is proven to work on RPi, is default on Raspbian and uses less RAM on idle. - if (( $G_HW_MODEL < 9 )); then + # - And fix headless mode + if (( $G_HW_MODEL < 10 )); then systemctl disable --now haveged 2> /dev/null G_AGP haveged G_AGI rng-tools + if grep -q '^[[:blank:]]*hdmi_ignore_hotplug=1' /DietPi/config.txt && grep -q '^[[:blank:]]*hdmi_ignore_composite=1' /DietPi/config.txt; then + + /DietPi/dietpi/func/dietpi-set_hardware headless enable + tvservice -o + + fi + sed -i '/hdmi_ignore_composite/d' /DietPi/config.txt fi #------------------------------------------------------------------------------- From b12918204e9cb372ddc014964fc04374da799669 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 15 Sep 2019 15:29:52 +0200 Subject: [PATCH 133/184] v6.26 + DietPi-Software | Amiberry: Install added RPi4 binary + DietPi-Software | Amiberry: On reinstall, remove old (and obsolete/renamed) config file that is recreated by Amiberry automatically, as recommended + DietPi-Software | Amiberry: Remove non-required binaries and capsimg to keep install slim + DietPi-Software | Minor coding and remove empty lines between software array declarations, since the dashes separate them sufficiently. --- dietpi/dietpi-software | 321 +++++++++-------------------------------- 1 file changed, 70 insertions(+), 251 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 9f60d729b6..891b1e4ee0 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -327,7 +327,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_ALSA[$software_id]=1 aSOFTWARE_REQUIRES_XSERVERXORG[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=42#p42' - #------------------ software_id=173 @@ -338,7 +337,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_ALSA[$software_id]=1 aSOFTWARE_REQUIRES_XSERVERXORG[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=17712#p17712' - #------------------ software_id=24 @@ -349,7 +347,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_ALSA[$software_id]=1 aSOFTWARE_REQUIRES_XSERVERXORG[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=2073#p2073' - #------------------ software_id=25 @@ -360,7 +357,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_ALSA[$software_id]=1 aSOFTWARE_REQUIRES_XSERVERXORG[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=2203#p2203' - #------------------ software_id=26 @@ -371,7 +367,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_ALSA[$software_id]=1 aSOFTWARE_REQUIRES_XSERVERXORG[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=2072#p2072' - #------------------ software_id=113 @@ -382,10 +377,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_ALSA[$software_id]=1 aSOFTWARE_REQUIRES_XSERVERXORG[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=3011#p3011' - # - ARMv6 aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0 - #------------------ software_id=174 @@ -395,7 +388,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_XSERVERXORG[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=17713#p17713' - #------------------ software_id=175 @@ -416,7 +408,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_DESKTOP[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=408#p408' - #------------------ software_id=29 @@ -426,7 +417,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_DESKTOP[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=2074#p2074' - #------------------ software_id=30 @@ -436,7 +426,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_DESKTOP[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=2071#p2071' - #------------------ software_id=120 @@ -446,8 +435,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_DESKTOP[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=4149#p4149' - - # - RPi only (archive.raspberrypi.org repo) + # RPi only (archive.raspberrypi.org repo) for ((i=10; i<=$MAX_G_HW_MODEL; i++)) do @@ -466,21 +454,17 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_ALSA[$software_id]=1 aSOFTWARE_REQUIRES_XSERVERXORG[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=43#p43' - - # - Only RPi + Odroid + x86_64 + # Only RPi + Odroid + x86_64 for ((i=22; i<=$MAX_G_HW_MODEL; i++)) do aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,$i]=0 done - # + ASUS TB aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,52]=1 - # - C1 Stretch aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,10]=0 - #------------------ software_id=32 @@ -490,18 +474,16 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=50#p50' - #------------------ software_id=148 aSOFTWARE_NAME[$software_id]='myMPD' aSOFTWARE_DESC[$software_id]='fork of ympd with improved features' - aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 + aSOFTWARE_CATEGORY_INDEX[$software_id]=2 + aSOFTWARE_ONLINEDOC_URL[$software_id]='p=13978#p13978' aSOFTWARE_REQUIRES_ALSA[$software_id]=1 aSOFTWARE_REQUIRES_BUILDESSENTIAL[$software_id]=1 - aSOFTWARE_ONLINEDOC_URL[$software_id]='p=13978#p13978' - #------------------ software_id=119 @@ -511,23 +493,20 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=3928#p3928' - #------------------ software_id=33 aSOFTWARE_NAME[$software_id]='Airsonic' aSOFTWARE_DESC[$software_id]='web interface media streaming server' - aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 + aSOFTWARE_CATEGORY_INDEX[$software_id]=2 + aSOFTWARE_ONLINEDOC_URL[$software_id]='p=11280#p11280' aSOFTWARE_REQUIRES_ALSA[$software_id]=1 aSOFTWARE_REQUIRES_JAVA_JRE_JDK[$software_id]=1 aSOFTWARE_REQUIRES_FFMPEG[$software_id]=1 - aSOFTWARE_ONLINEDOC_URL[$software_id]='p=11280#p11280' - # - Buster: https://github.com/MichaIng/DietPi/issues/2787 aSOFTWARE_AVAIL_G_DISTRO[$software_id,5]=0 aSOFTWARE_AVAIL_G_DISTRO[$software_id,6]=0 - #------------------ software_id=34 @@ -539,11 +518,9 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_FFMPEG[$software_id]=1 aSOFTWARE_REQUIRES_JAVA_JRE_JDK[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=213#p213' - # - Buster: https://github.com/MichaIng/DietPi/issues/2787 aSOFTWARE_AVAIL_G_DISTRO[$software_id,5]=0 aSOFTWARE_AVAIL_G_DISTRO[$software_id,6]=0 - #------------------ software_id=35 @@ -552,7 +529,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1009#p1009' - #------------------ software_id=36 @@ -562,7 +538,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1009#p1009' - #------------------ software_id=37 @@ -572,7 +547,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1221#p1221' - #------------------ software_id=39 @@ -581,7 +555,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=49#p49' - #------------------ software_id=40 @@ -596,7 +569,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_PHP[$software_id]=1 aSOFTWARE_REQUIRES_MYSQL[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=554#p554' - #------------------ software_id=41 @@ -605,10 +577,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1789#p1789' - # - ARMv6: https://github.com/MichaIng/DietPi/issues/534#issuecomment-416405968 aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0 - #------------------ software_id=42 @@ -617,10 +587,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1949#p1949' - # - ARMv6: https://github.com/MichaIng/DietPi/issues/648 aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0 - #------------------ software_id=43 @@ -629,7 +597,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1691#p1691' - #------------------ software_id=118 @@ -639,7 +606,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=3611#p3611' aSOFTWARE_REQUIRES_ALSA[$software_id]=1 - #------------------ software_id=121 @@ -649,10 +615,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=4153#p4153' aSOFTWARE_REQUIRES_ALSA[$software_id]=1 - # - ARMv6 aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0 - #------------------ software_id=124 @@ -662,7 +626,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=4294#p4294' aSOFTWARE_REQUIRES_ALSA[$software_id]=1 - #------------------ software_id=128 @@ -672,7 +635,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 #aSOFTWARE_ONLINEDOC_URL[$software_id] aSOFTWARE_REQUIRES_ALSA[$software_id]=1 - #------------------ software_id=129 @@ -685,7 +647,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_WEBSERVER[$software_id]=1 aSOFTWARE_REQUIRES_PHP[$software_id]=1 aSOFTWARE_REQUIRES_MYSQL[$software_id]=1 - #------------------ software_id=135 @@ -695,10 +656,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=6526#p6526' - # - VM aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,20]=0 - #------------------ software_id=141 @@ -708,8 +667,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=7013#p7013' aSOFTWARE_REQUIRES_ALSA[$software_id]=1 - - # - ARMv7 only + # ARMv7 only for ((i=1; i<=$MAX_G_HW_ARCH; i++)) do @@ -717,7 +675,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it done aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,2]=1 - #------------------ software_id=143 @@ -733,7 +690,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_FFMPEG[$software_id]=1 # Currently user prompt asks for admin user credentials aSOFTWARE_REQUIRES_USERINPUT[$software_id]=1 - #------------------ software_id=146 @@ -743,7 +699,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=7463#p7463' aSOFTWARE_REQUIRES_GIT[$software_id]=1 - #------------------ software_id=154 @@ -754,8 +709,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_ONLINEDOC_URL[$software_id]='p=7966#p7966' aSOFTWARE_REQUIRES_ALSA[$software_id]=1 aSOFTWARE_REQUIRES_FFMPEG[$software_id]=1 - - # - x86_64 only + # x86_64 only for ((i=1; i<=$MAX_G_HW_ARCH; i++)) do @@ -763,7 +717,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it done aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,10]=1 - #------------------ software_id=159 @@ -776,7 +729,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_WEBSERVER[$software_id]=1 aSOFTWARE_REQUIRES_PHP[$software_id]=1 aSOFTWARE_REQUIRES_MYSQL[$software_id]=1 - #------------------ software_id=160 @@ -785,7 +737,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=2 aSOFTWARE_TYPE[$software_id]=-1 #aSOFTWARE_ONLINEDOC_URL[$software_id] - #------------------ software_id=163 @@ -795,7 +746,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=9012#p9012' - #------------------ software_id=167 @@ -805,11 +755,10 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=9368#p9368' - - # - ARMv8 - x86_64 + # - ARMv8 aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,3]=0 + # - x86_64 aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,10]=0 - #------------------ software_id=80 @@ -819,7 +768,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_JAVA_JRE_JDK[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=12969#p12969' - #------------------ software_id=86 @@ -840,7 +788,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=46#p46' - #------------------ software_id=45 @@ -849,7 +796,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=61#p61' - #------------------ software_id=46 @@ -858,7 +804,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=2272#p2272' - #------------------ software_id=107 @@ -869,7 +814,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_WEBSERVER[$software_id]=1 aSOFTWARE_REQUIRES_PHP[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=2603#p2603' - #------------------ software_id=116 @@ -878,7 +822,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=3327#p3327' - #------------------ software_id=132 @@ -890,7 +833,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_WEBSERVER[$software_id]=1 aSOFTWARE_REQUIRES_PHP[$software_id]=1 aSOFTWARE_REQUIRES_SQLITE[$software_id]=1 - #------------------ software_id=139 @@ -901,7 +843,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_ONLINEDOC_URL[$software_id]='p=6747#p6747' # Pre-compiling required on ARM (( $G_HW_ARCH < 10 )) && aSOFTWARE_REQUIRES_BUILDESSENTIAL[$software_id]=1 - #------------------ software_id=142 @@ -912,7 +853,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_ONLINEDOC_URL[$software_id]='p=6747#p6747' aSOFTWARE_REQUIRES_BUILDESSENTIAL[$software_id]=1 aSOFTWARE_REQUIRES_GIT[$software_id]=1 - #------------------ software_id=144 @@ -922,7 +862,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=7455#p7455' aSOFTWARE_REQUIRES_SQLITE[$software_id]=1 - #------------------ software_id=145 @@ -932,7 +871,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=7457#p7457' aSOFTWARE_REQUIRES_SQLITE[$software_id]=1 - #------------------ software_id=106 @@ -942,7 +880,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=13580#p13580' aSOFTWARE_REQUIRES_SQLITE[$software_id]=1 - #------------------ software_id=147 @@ -951,7 +888,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=7503#p7503' - #------------------ software_id=149 @@ -960,7 +896,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=7575#p7575' - #------------------ software_id=155 @@ -990,7 +925,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0 # Disable if PHP7.3 is already installed command -v php7.3 &> /dev/null && aSOFTWARE_AVAIL_G_DISTRO[$software_id,$G_DISTRO]=0 - #------------------ software_id=114 @@ -1002,7 +936,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_PHP[$software_id]=1 aSOFTWARE_REQUIRES_MYSQL[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=3026#p3026' - #------------------ software_id=168 @@ -1014,7 +947,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it # - To resolve: Default port 5349 could be used, but reliable method to get external domain/static IP is required. aSOFTWARE_REQUIRES_USERINPUT[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=15227#p15227' - #------------------ software_id=48 @@ -1026,7 +958,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_PHP[$software_id]=1 aSOFTWARE_REQUIRES_MYSQL[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1064#p1064' - #------------------ software_id=111 @@ -1035,10 +966,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=65#p65' - # - ARMv6 aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0 - #------------------ software_id=49 @@ -1049,10 +978,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_GIT[$software_id]=1 aSOFTWARE_REQUIRES_MYSQL[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=2187#p2187' - # - ARMv8 aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,3]=0 - #------------------ software_id=50 @@ -1061,7 +988,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=2363#p2363' - #------------------ software_id=134 @@ -1070,11 +996,10 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=6476#p6476' - - # - ARMv6 - ARMv8 + # - ARMv6 aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0 + # - ARMv8 aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,3]=0 - #------------------ software_id=158 @@ -1082,7 +1007,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_DESC[$software_id]='S3 compatible distributed object server' aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=0 - #------------------ software_id=161 @@ -1090,10 +1014,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_DESC[$software_id]='Lightweight WebDAV cloud (eg: dropbox) with a CMS' aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=0 - # - ARMv8 aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,3]=0 - #------------------ software_id=165 @@ -1111,24 +1033,22 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_NAME[$software_id]='Amiberry' aSOFTWARE_DESC[$software_id]='amiga emulator' - aSOFTWARE_CATEGORY_INDEX[$software_id]=5 aSOFTWARE_TYPE[$software_id]=0 - aSOFTWARE_REQUIRES_ALSA[$software_id]=1 + aSOFTWARE_CATEGORY_INDEX[$software_id]=5 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=64#p64' aSOFTWARE_REQUIRES_XSERVERXORG[$software_id]=1 - - # - RPi only + aSOFTWARE_REQUIRES_ALSA[$software_id]=1 + # RPi only for ((i=10; i<=$MAX_G_HW_MODEL; i++)) do aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,$i]=0 done + # + Odroid XU4 + aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,11]=1 # + ASUS TB aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,52]=1 - # + XU4 test - aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,11]=1 - #------------------ software_id=51 @@ -1139,18 +1059,15 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_ALSA[$software_id]=1 aSOFTWARE_REQUIRES_XSERVERXORG[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=45#p45' - - # - RPi only + # RPi only for ((i=10; i<=$MAX_G_HW_MODEL; i++)) do aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,$i]=0 done - # + x86_64 aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,21]=1 - #------------------ software_id=112 @@ -1160,15 +1077,13 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=2963#p2963' - - # - RPi only + # RPi only for ((i=10; i<=$MAX_G_HW_MODEL; i++)) do aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,$i]=0 done - #------------------ software_id=52 @@ -1177,10 +1092,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=5 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=2068#p2068' - # - ARMv8 aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,3]=0 - #------------------ software_id=53 @@ -1193,7 +1106,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_JAVA_JRE_JDK[$software_id]=1 aSOFTWARE_REQUIRES_NODEJS[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=2069#p2069' - #------------------ software_id=156 @@ -1205,7 +1117,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_ALSA[$software_id]=1 aSOFTWARE_REQUIRES_XSERVERXORG[$software_id]=1 aSOFTWARE_REQUIRES_DESKTOP[$software_id]=1 - # Native PC only for ((i=0; i<=$MAX_G_HW_MODEL; i++)) do @@ -1214,7 +1125,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it done aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,21]=1 - #------------------ software_id=164 @@ -1237,7 +1147,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_PHP[$software_id]=1 aSOFTWARE_REQUIRES_MYSQL[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=51#p51' - # phpBB up to 3.2 does not support PHP7.3 (Buster) aSOFTWARE_AVAIL_G_DISTRO[$software_id,5]=0 aSOFTWARE_AVAIL_G_DISTRO[$software_id,6]=0 @@ -1245,7 +1154,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0 # Disable if PHP7.3 is already installed command -v php7.3 &> /dev/null && aSOFTWARE_AVAIL_G_DISTRO[$software_id,$G_DISTRO]=0 - #------------------ software_id=55 @@ -1257,7 +1165,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_PHP[$software_id]=1 aSOFTWARE_REQUIRES_MYSQL[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=395#p395' - #------------------ software_id=38 @@ -1269,7 +1176,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_PHP[$software_id]=1 aSOFTWARE_REQUIRES_MYSQL[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=13918#p13918' - #------------------ software_id=56 @@ -1280,7 +1186,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_WEBSERVER[$software_id]=1 aSOFTWARE_REQUIRES_PHP[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=480#p480' - #------------------ software_id=57 @@ -1292,7 +1197,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_PHP[$software_id]=1 aSOFTWARE_REQUIRES_MYSQL[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1502#p1502' - #------------------ software_id=58 @@ -1304,7 +1208,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_GIT[$software_id]=1 aSOFTWARE_REQUIRES_USERINPUT[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1796#p1796' - #------------------ software_id=133 @@ -1314,7 +1217,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_JAVA_JRE_JDK[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=6202#p6202' - #------------------ software_id=2 @@ -1323,8 +1225,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=20 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=13704#p13704' - - # - x86_64 only + # x86_64 only for ((i=1; i<$MAX_G_HW_ARCH; i++)) do @@ -1332,8 +1233,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it done - #------------------ - # Camera #-------------------------------------------------------------------------------- software_id=59 @@ -1345,15 +1244,13 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_WEBSERVER[$software_id]=1 aSOFTWARE_REQUIRES_PHP[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=48#p48' - - # - RPi only + # RPi only for ((i=10; i<=$MAX_G_HW_MODEL; i++)) do aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,$i]=0 done - #------------------ software_id=136 @@ -1365,8 +1262,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_FFMPEG[$software_id]=1 aSOFTWARE_REQUIRES_BUILDESSENTIAL[$software_id]=1 - #------------------ - # WiFi Hotspot #-------------------------------------------------------------------------------- software_id=60 @@ -1376,10 +1271,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=8 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1207#p1207' - # - VM aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,20]=0 - #------------------ software_id=61 @@ -1388,12 +1281,9 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=8 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1529#p1529' - # - VM aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,20]=0 - #------------------ - # System stats #-------------------------------------------------------------------------------- software_id=62 @@ -1403,7 +1293,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=9 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=204#p204' - #------------------ software_id=63 @@ -1414,7 +1303,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_WEBSERVER[$software_id]=1 aSOFTWARE_REQUIRES_PHP[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=108#p108' - #------------------ software_id=64 @@ -1425,7 +1313,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_WEBSERVER[$software_id]=1 aSOFTWARE_REQUIRES_PHP[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=451#p451' - #------------------ software_id=65 @@ -1436,7 +1323,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it # Node.js only required for our custom v1.11 package for Stretch ARMv6 RPi (( $G_HW_ARCH == 1 && $G_DISTRO < 5 )) && aSOFTWARE_REQUIRES_NODEJS[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1611#p1611' - #------------------ software_id=66 @@ -1445,15 +1331,13 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=9 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1503#p1503' - - # - RPi only + # RPi only for ((i=10; i<=$MAX_G_HW_MODEL; i++)) do aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,$i]=0 done - #------------------ software_id=115 @@ -1462,7 +1346,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=9 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=3047#p3047' - #------------------ software_id=162 @@ -1480,7 +1363,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=10 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=58#p58' - #------------------ software_id=68 @@ -1489,7 +1371,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=10 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=188#p188' - #------------------ software_id=138 @@ -1499,9 +1380,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=6709#p6709' - #------------------ - - #Hardware projects + # Hardware projects #-------------------------------------------------------------------------------- software_id=69 @@ -1510,15 +1389,13 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=11 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1065#p1065' - - # - RPi only + # RPi only for ((i=10; i<=$MAX_G_HW_MODEL; i++)) do aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,$i]=0 done - #------------------ software_id=70 @@ -1528,18 +1405,15 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_BUILDESSENTIAL[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1066#p1066' - - # - RPi + Odroids only + # RPi + Odroids only for ((i=20; i<=$MAX_G_HW_MODEL; i++)) do aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,$i]=0 done - # + BPi Pro aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,51]=1 - #------------------ software_id=71 @@ -1549,15 +1423,13 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_REQUIRES_BUILDESSENTIAL[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=189#p189' - - # - RPi1/2/Zero only + # RPi1/2/Zero only for ((i=3; i<=$MAX_G_HW_MODEL; i++)) do aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,$i]=0 done - #------------------ software_id=72 @@ -1565,15 +1437,13 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_DESC[$software_id]='enables support for i2c based hardware' aSOFTWARE_CATEGORY_INDEX[$software_id]=11 aSOFTWARE_TYPE[$software_id]=0 - - # - RPi only + # RPi only for ((i=10; i<=$MAX_G_HW_MODEL; i++)) do aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,$i]=0 done - #------------------ software_id=100 @@ -1582,15 +1452,13 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=11 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=10740#p10740' - - # - RPi only + # RPi only for ((i=10; i<=$MAX_G_HW_MODEL; i++)) do aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,$i]=0 done - #------------------ software_id=122 @@ -1601,7 +1469,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_ONLINEDOC_URL[$software_id]='p=4292#p4292' aSOFTWARE_REQUIRES_NODEJS[$software_id]=1 aSOFTWARE_REQUIRES_BUILDESSENTIAL[$software_id]=1 - #------------------ software_id=123 @@ -1610,7 +1477,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=11 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=4293#p4293' - #------------------ software_id=131 @@ -1622,7 +1488,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_JAVA_JRE_JDK[$software_id]=1 aSOFTWARE_REQUIRES_NODEJS[$software_id]=1 aSOFTWARE_REQUIRES_BUILDESSENTIAL[$software_id]=1 - #------------------ software_id=166 @@ -1631,15 +1496,13 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=11 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=9359#p9359' - - # - RPi only + # RPi only for ((i=10; i<=$MAX_G_HW_MODEL; i++)) do aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,$i]=0 done - #------------------ software_id=169 @@ -1650,15 +1513,13 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_ALSA[$software_id]=1 aSOFTWARE_REQUIRES_GIT[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=9486#p9486' - - # - RPi only + # RPi only for ((i=10; i<=$MAX_G_HW_MODEL; i++)) do aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,$i]=0 done - #------------------ software_id=176 @@ -1670,7 +1531,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_ALSA[$software_id]=1 aSOFTWARE_REQUIRES_GIT[$software_id]=1 aSOFTWARE_REQUIRES_USERINPUT[$software_id]=1 - #------------------ software_id=74 @@ -1679,7 +1539,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=11 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=12523#p12523' - #------------------ software_id=77 @@ -1698,7 +1557,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=12 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=452#p452' - #------------------ # Webserver stacks #-------------------------------------------------------------------------------- @@ -1709,7 +1567,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=52#p52' - #------------------ software_id=76 @@ -1718,7 +1575,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=52#p52' - #------------------ software_id=78 @@ -1727,7 +1583,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=53#p53' - #------------------ software_id=79 @@ -1736,7 +1591,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=53#p53' - #------------------ software_id=81 @@ -1745,7 +1599,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1335#p1335' - #------------------ software_id=82 @@ -1754,7 +1607,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1335#p1335' - #------------------ software_id=83 @@ -1764,7 +1616,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=-1 aSOFTWARE_REQUIRES_PHP[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=52#p52' - #------------------ software_id=84 @@ -1774,7 +1625,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=-1 aSOFTWARE_REQUIRES_PHP[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1335#p1335' - #------------------ software_id=85 @@ -1784,7 +1634,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=-1 aSOFTWARE_REQUIRES_PHP[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=53#p53' - #------------------ software_id=87 @@ -1793,7 +1642,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=-1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1335#p1335' - #------------------ software_id=88 @@ -1802,7 +1650,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=-1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1335#p1335' - #------------------ software_id=89 @@ -1811,7 +1658,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=-1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1335#p1335' - #------------------ software_id=90 @@ -1823,14 +1669,11 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_MYSQL[$software_id]=1 aSOFTWARE_REQUIRES_PHP[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=54#p54' - # - non-RPi Buster: https://packages.debian.org/phpmyadmin (( $G_HW_MODEL > 9 )) && aSOFTWARE_AVAIL_G_DISTRO[$software_id,5]=0 && aSOFTWARE_AVAIL_G_DISTRO[$software_id,6]=0 - # Since the APT package depends on PHP meta packages, PHP7.2 cannot be installed # Since ownCloud + phpBB require PHP7.2 currently, phpMyAdmin is not compatible with those [[ -f '/var/www/owncloud/occ' || -f '/var/www/phpBB3/config.php' ]] && aSOFTWARE_AVAIL_G_DISTRO[$software_id,$G_DISTRO]=0 - #------------------ software_id=91 @@ -1838,7 +1681,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_DESC[$software_id]='optional non-sql database store' aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=0 - #------------------ software_id=92 @@ -1847,7 +1689,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=13 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1061#p1062' - #------------------ software_id=125 @@ -1857,7 +1698,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=4316#p4316' aSOFTWARE_REQUIRES_JAVA_JRE_JDK[$software_id]=1 - # - non-RPi Buster: https://packages.debian.org/tomcat8 (( $G_HW_MODEL > 9 )) && aSOFTWARE_AVAIL_G_DISTRO[$software_id,5]=0 && aSOFTWARE_AVAIL_G_DISTRO[$software_id,6]=0 @@ -1885,7 +1725,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=15 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=55#p55' - #------------------ software_id=95 @@ -1894,7 +1733,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=15 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=2820#p2820' - #------------------ software_id=96 @@ -1903,7 +1741,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=15 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=56#p56' - #------------------ software_id=109 @@ -1912,7 +1749,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=15 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=2821#p2821' - #------------------ # VPN @@ -1924,7 +1760,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=16 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=613#p613' - #------------------ software_id=117 @@ -1936,7 +1771,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_GIT[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=3469#p3469' aSOFTWARE_REQUIRES_USERINPUT[$software_id]=1 - #------------------ software_id=171 @@ -1945,7 +1779,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=16 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p15975#p15975' - #------------------ software_id=172 @@ -1956,7 +1789,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_ONLINEDOC_URL[$software_id]='p=16308#p16308' # Required to ask for public domain/IP and desired VPN server port aSOFTWARE_REQUIRES_USERINPUT[$software_id]=1 - # Disable all for ((i=0; i<=$MAX_G_HW_MODEL; i++)) do @@ -1964,10 +1796,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,$i]=0 done - # - ARMv6 aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0 - # + RPi/Odroids/x86_64 | ARMv6 disabled if (( $G_HW_MODEL < 13 || $G_HW_MODEL == 14 || $G_HW_ARCH == 10 )); then @@ -1979,7 +1809,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it #-------------------------------------------------------------------------------- software_id=98 - aSOFTWARE_NAME[$software_id]='HaProxy' + aSOFTWARE_NAME[$software_id]='HAProxy' aSOFTWARE_DESC[$software_id]='high performance tcp/http load balancer' aSOFTWARE_CATEGORY_INDEX[$software_id]=17 aSOFTWARE_TYPE[$software_id]=0 @@ -1995,15 +1825,13 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=18 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1525#p1525' - - # - RPi only + # RPi only for ((i=10; i<=$MAX_G_HW_MODEL; i++)) do aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,$i]=0 done - #------------------ software_id=157 @@ -2017,8 +1845,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_REQUIRES_FFMPEG[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=70#p70' - #------------------ - # Printing #-------------------------------------------------------------------------------- software_id=137 @@ -2029,7 +1855,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=6630#p6630' aSOFTWARE_REQUIRES_RSYSLOG[$software_id]=1 # Not required, but comes in as package dep - #------------------ software_id=153 @@ -2053,7 +1878,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_DESC[$software_id]='' aSOFTWARE_CATEGORY_INDEX[$software_id]=0 aSOFTWARE_TYPE[$software_id]=1 - #------------------ # File server clients #-------------------------------------------------------------------------------- @@ -2072,7 +1896,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=1 aSOFTWARE_TYPE[$software_id]=1 aSOFTWARE_ONLINEDOC_URL[$software_id]=' dietpi-config > Network Options: NAS/Misc' - #------------------ # File managers #-------------------------------------------------------------------------------- @@ -2106,7 +1929,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_DESC[$software_id]='linux display system' aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=1 - #------------------ software_id=151 @@ -2115,8 +1937,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=1 aSOFTWARE_REQUIRES_XSERVERXORG[$software_id]=1 - - # - Native PC only + # Native PC only for ((i=0; i<=$MAX_G_HW_MODEL; i++)) do @@ -2162,7 +1983,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=1 SOFTWARE_REQUIRES_XSERVERXORG[$software_id]=1 - # - ARMv8 aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,3]=0 #------------------ @@ -2253,7 +2073,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_DESC[$software_id]='unarchiver for .rar files' aSOFTWARE_CATEGORY_INDEX[$software_id]=6 aSOFTWARE_TYPE[$software_id]=1 - #------------------ # Text Editors #-------------------------------------------------------------------------------- @@ -2291,7 +2110,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_DESC[$software_id]='heavily refactored vim fork' aSOFTWARE_CATEGORY_INDEX[$software_id]=7 aSOFTWARE_TYPE[$software_id]=1 - #------------------ # Desktop Utilities #-------------------------------------------------------------------------------- @@ -2302,7 +2120,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=8 aSOFTWARE_TYPE[$software_id]=1 aSOFTWARE_REQUIRES_DESKTOP[$software_id]=1 - #------------------ #-------------------------------------------------------------------------------- # Logging (hidden) @@ -2330,7 +2147,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=0 aSOFTWARE_TYPE[$software_id]=-1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=68#p68' - #------------------ #-------------------------------------------------------------------------------- # SSH servers (hidden from install menu) @@ -2350,7 +2166,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=0 aSOFTWARE_TYPE[$software_id]=-1 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=63#p63' - #------------------ #-------------------------------------------------------------------------------- # Init install state for defined software @@ -8473,9 +8288,6 @@ _EOF_ Banner_Configuration - # Allow binary execution - chmod -R +x $G_FP_DIETPI_USERDATA/amiberry - local amiberry_filename local capsimg_filename='capsimg-rpi.so' @@ -8491,51 +8303,53 @@ _EOF_ amiberry_filename='amiberry-xu4' capsimg_filename='capsimg-xu4.so' - # RPi 4 + # RPi4 elif (( $G_HW_MODEL == 4 )); then - : + amiberry_filename='amiberry-rpi4-sdl2-dispmanx' - # RPi 3 + # RPi3 elif (( $G_HW_MODEL == 3 )); then amiberry_filename='amiberry-rpi3-sdl2-dispmanx' - # RPi 2 + # RPi2 elif (( $G_HW_MODEL == 2 )); then amiberry_filename='amiberry-rpi2-sdl2-dispmanx' - # Assume RPi 1 (ARMv6) + # Assume RPi1 (ARMv6) else amiberry_filename='amiberry-rpi1-sdl2-dispmanx' fi - # Update capsimg.so + # Update executable and capsimg.so + mv "$G_FP_DIETPI_USERDATA/amiberry/$amiberry_filename" $G_FP_DIETPI_USERDATA/amiberry/amiberry mv "$G_FP_DIETPI_USERDATA/amiberry/$capsimg_filename" $G_FP_DIETPI_USERDATA/amiberry/capsimg.so + rm $G_FP_DIETPI_USERDATA/amiberry/{amiberry,capsimg}-* # Create additional user media directories mkdir -p $G_FP_DIETPI_USERDATA/amiberry/{floppy_images,hdf,cd} + # Remove obsolete and old config file to allow Amiberry recreating it: https://github.com/midwan/amiberry/releases/tag/v2.25 + [[ -f $G_FP_DIETPI_USERDATA/amiberry/conf/adfdir.conf ]] && rm $G_FP_DIETPI_USERDATA/amiberry/conf/adfdir.conf + [[ -f $G_FP_DIETPI_USERDATA/amiberry/conf/amiberry.conf ]] && rm $G_FP_DIETPI_USERDATA/amiberry/conf/amiberry.conf + # Uae4arm does not support browsing symlinks: https://github.com/MichaIng/DietPi/issues/474#issuecomment-242973839 - # - So we need to change config file default paths to actual userdata location: + # - So we need to change config file default paths to actual userdata location if [[ -L $G_FP_DIETPI_USERDATA ]]; then local fp_userdata_actual=$(readlink -f $G_FP_DIETPI_USERDATA) - sed -i "s:$G_FP_DIETPI_USERDATA:$fp_userdata_actual:g" $G_FP_DIETPI_USERDATA/amiberry/conf/adfdir.conf sed -i "s:$G_FP_DIETPI_USERDATA:$fp_userdata_actual:g" $G_FP_DIETPI_USERDATA/amiberry/conf/autostart.uae fi # Service - local exec_start="$G_FP_DIETPI_USERDATA/amiberry/$amiberry_filename -f $G_FP_DIETPI_USERDATA/amiberry/conf/autostart.uae" - if (( $G_HW_MODEL == 52 )); then - - exec_start="$(command -v xinit) $G_FP_DIETPI_USERDATA/amiberry/$amiberry_filename -f $G_FP_DIETPI_USERDATA/amiberry/conf/autostart.uae" - - fi + # - On Asus TB we need to start it as X11 session + local xinit_start='' + (( $G_HW_MODEL == 52 )) && xinit_start="$(command -v xinit) " cat << _EOF_ > /etc/systemd/system/amiberry.service [Unit] @@ -8548,19 +8362,21 @@ Description=Amiberry Amiga Emulator (DietPi) #TTYReset=yes #TTYVHangup=yes WorkingDirectory=$G_FP_DIETPI_USERDATA/amiberry -ExecStart=$exec_start +ExecStart=$xinit_start$G_FP_DIETPI_USERDATA/amiberry/amiberry -f $G_FP_DIETPI_USERDATA/amiberry/conf/autostart.uae [Install] WantedBy=local-fs.target _EOF_ + # Start script cat << _EOF_ > $G_FP_DIETPI_USERDATA/amiberry/run.sh #!/bin/dash cd $G_FP_DIETPI_USERDATA/amiberry -./$amiberry_filename -f conf/autostart.uae +./amiberry -f conf/autostart.uae _EOF_ - chmod +x $G_FP_DIETPI_USERDATA/amiberry/run.sh + # Execute permissions + chmod +x $G_FP_DIETPI_USERDATA/amiberry/{amiberry,run.sh} fi @@ -13881,31 +13697,34 @@ _EOF_ fi - # - Webserver rutorrent user/pw settings + # Webserver rutorrent user/pw settings [[ -f '/etc/.rutorrent-htaccess' ]] && rm /etc/.rutorrent-htaccess - - # Lighttpd + # - Lighttpd #Remove from #RUTORRENT_DIETPI to #RUTORRENT_DIETPI in /etc/lighttpd/lighttpd.conf - - # Nginx + # - Nginx [[ -f '/etc/nginx/sites-dietpi/dietpi-rutorrent.conf' ]] && rm /etc/nginx/sites-dietpi/dietpi-rutorrent.conf - - # Apache2 + # - Apache2 command -v a2dissite &> /dev/null && a2dissite dietpi-rutorrent [[ -f '/etc/apache2/sites-available/dietpi-rutorrent.conf' ]] && rm /etc/apache2/sites-available/dietpi-rutorrent.conf fi - software_id=108 + software_id=108 # Amiberry if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then Banner_Uninstalling - rm -R $G_FP_DIETPI_USERDATA/amiberry - rm /etc/systemd/system/amiberry.service + # Service + if [[ -f '/etc/systemd/system/amiberry.service' ]]; then - # Disable autostart, revert boot index to console - /DietPi/dietpi/dietpi-autostart 0 + systemctl disable --now amiberry + rm /etc/systemd/system/amiberry.service + + fi + # Files + [[ -d $G_FP_DIETPI_USERDATA/amiberry ]] && rm -R $G_FP_DIETPI_USERDATA/amiberry + # Autostart index: If currently Amiberry, revert to console login + [[ -f '/DietPi/dietpi/.dietpi-autostart_index' && $( Date: Sun, 15 Sep 2019 15:49:08 +0200 Subject: [PATCH 134/184] v6.26 + DietPi-Autostart | Rename AmiBerry => Amiberry as of @midwan preference + minor wording and ordering --- dietpi/dietpi-autostart | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dietpi/dietpi-autostart b/dietpi/dietpi-autostart index 8dab4de171..92a23f5501 100644 --- a/dietpi/dietpi-autostart +++ b/dietpi/dietpi-autostart @@ -87,7 +87,7 @@ WantedBy=multi-user.target _EOF_ systemctl enable dietpi-autostart_custom - # - Uae4arm special | fast boot via enabled service + # - Amiberry fast boot via enabled service elif (( $AUTO_START_INDEX == 6 )); then systemctl enable amiberry @@ -167,16 +167,16 @@ _EOF_ '0' ': Manual login (default)' '7' ': Automatic login' '' '●─ Desktops ' - '2' ': Automatic login' '16' ': LightDM login mask' + '2' ': Automatic login' '' '●─ Browser Kiosk ' - '11' ': Chromium - Dedicated use, without desktop' + '11' ': Chromium - Dedicated use without desktop' '' '●─ Media ' '1' ': Kodi' '10' ': CAVA Spectrum' '' '●─ Gaming/Emulation ' - '6' ': AmiBerry - Fast boot' - '8' ': AmiBerry - Standard boot' + '6' ': Amiberry fast boot' + '8' ': Amiberry standard boot' '3' ': RetroPie' '9' ': DXX-Rebith - Descent 1/2' '4' ': OpenTyrian' @@ -193,11 +193,11 @@ _EOF_ AUTO_START_INDEX=$G_WHIP_RETURNED_VALUE - # AmiBerry fast boot info + # Amiberry fast boot info if (( $AUTO_START_INDEX == 6 )); then - G_WHIP_MSG 'AmiBerry: (Fast boot):\nA highly optimized and tweaked boot mode. -This mode allows for a < 2.5 second boot on a RPi 3, into AmiBerry.\n\nIf you experience boot issues with this mode, please try (Standard Boot)' + G_WHIP_MSG 'Amiberry fast boot:\nA highly optimised and tweaked boot mode. +This mode allows for a < 2.5 second boot on an RPi3, into Amiberry.\n\nIf you experience boot issues with this mode, please try the "standard boot" option.' # Chromium prompt for URL elif (( $AUTO_START_INDEX == 11 )); then From bc3c8a8122e0039f133e1038521ed74b24f5b3b1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 15 Sep 2019 16:22:32 +0200 Subject: [PATCH 135/184] v6.26 + dietpi.txt | Rename "Uae4ARM" => "Amiberry" + dietpi.txt | Remove multiple AUTO_SETUP_INSTALL_SOFTWARE_ID examples and remove comments on the same line. Users should not leave any trailing comments after settings, since parser support for this might be dropped in the future. --- dietpi.txt | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/dietpi.txt b/dietpi.txt index f001a83c18..fa7511c28e 100644 --- a/dietpi.txt +++ b/dietpi.txt @@ -79,7 +79,7 @@ AUTO_SETUP_RAMLOG_MAXSIZE=50 # - This will be ignored if you have manually selected any webserver stack. AUTO_SETUP_WEB_SERVER_INDEX=-2 -# DietPi-Autostart: 0=Console | 7=Console autologin | 1=Kodi | 2=Desktop autologin | 16=Desktop | 3=RetroPie | 4=OpenTyrian | 5=DietPi-Cloudshell | 6=Uae4ARM fastboot | 8=Uae4ARM standard boot | 9=DDX-Rebirth | 10=CAVA Spectrum | 11=Chromium kiosk | 14=Custom autostart service +# DietPi-Autostart: 0=Console | 7=Console autologin | 1=Kodi | 2=Desktop autologin | 16=Desktop | 3=RetroPie | 4=OpenTyrian | 5=DietPi-Cloudshell | 6=Amiberry fast boot | 8=Amiberry standard boot | 9=DDX-Rebirth | 10=CAVA Spectrum | 11=Chromium kiosk | 14=Custom autostart service # - This will be effective on 2nd boot, after firstrun update and installs have been done. # - Related software titles must be installed either on firstrun installs or via AUTO_SETUP_AUTOMATED=1 + AUTO_SETUP_INSTALL_SOFTWARE_ID (see below). AUTO_SETUP_AUTOSTART_TARGET_INDEX=0 @@ -101,12 +101,10 @@ AUTO_SETUP_GLOBAL_PASSWORD=dietpi # Software to automatically install # - List of available software IDs: https://github.com/MichaIng/DietPi/wiki/DietPi-Software-list -# - Add as many entries as you wish, one each line, without the leading "#". -# - DietPi will automatically install all pre-reqs (eg: ALSA/XSERVER for desktops etc) -# - Examples: -#AUTO_SETUP_INSTALL_SOFTWARE_ID=23 # will install LXDE desktop -#AUTO_SETUP_INSTALL_SOFTWARE_ID=74 # will install LAMP webserver stack -#AUTO_SETUP_INSTALL_SOFTWARE_ID=44 # will install Transmission Bittorrent downloader +# - Add as many entries as you wish, one each line. +# - DietPi will automatically install all pre-reqs (e.g. ALSA/X11 for desktops etc) +# - E.g. the following (without the leading "#") will install the LXDE desktop automatically on first boot: +#AUTO_SETUP_INSTALL_SOFTWARE_ID=23 #------------------------------------------------------------------------------------------------------ # D I E T - P I From b81bee4c90bd8ed960679db49f50d6ac18e289fa Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 15 Sep 2019 17:44:19 +0200 Subject: [PATCH 136/184] v6.26 + DietPi-Software | Firstrun: Do a full APT upgrade (including firmware/dependency changes) on first run installs, since it is safe to do it here and to assure that all systems are lifted to the same package/firmware stage: https://github.com/MichaIng/DietPi/issues/3098 + DietPi-Software | Firstrun: No time sync mode requires additional packages anymore, thus set it along with other AUTOINSTALL settings + DietPi-Software | Firstrun: Set defaults for automation settings missing in dietpi.txt --- dietpi/dietpi-software | 87 ++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 46 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 891b1e4ee0..910b364094 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -14436,25 +14436,16 @@ _EOF_ #------------------------------------------------------------ # Update & upgrade APT Banner_Apt_Update - - # - Update APT list + # - Update APT lists G_AGUP - # - Simulated APT installation to check for failures related to apt-cache. G_DIETPI-NOTIFY 2 'Running apt simulation to check for errors, please wait...' local package_to_test='bash-doc' G_AGI $package_to_test -s - # - Upgrade APT packages G_AGUG - - # - Automation Set NTPD mode - # Due to possible packages required, must be done here after APT cache updated - if (( $G_DIETPI_INSTALL_STAGE == 1 )); then - - /DietPi/dietpi/func/dietpi-set_software ntpd-mode $(grep -m1 '^[[:blank:]]*CONFIG_NTP_MODE=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') - - fi + # - Full upgrade on first run installs: https://github.com/MichaIng/DietPi/issues/3098 + (( $G_DIETPI_INSTALL_STAGE == 1 )) && G_AGDUG # Generate dir for dietpi-software installed "non-service" based control scripts mkdir -p /var/lib/dietpi/dietpi-software/services @@ -14514,11 +14505,11 @@ _EOF_ # DietPi-Automation if (( $G_DIETPI_INSTALL_STAGE == 1 )); then - # - Remove fake-hwclock, if real hwclock is available + # Remove fake-hwclock, if real hwclock is available # REMOVED: Needs further work as SBCs without RTC (XU4/Sparky SBC) are being flagged for this removal #hwclock &> /dev/null && G_AGP fake-hwclock - # - x86_64 microcode installation + # x86_64 microcode installation if (( $G_HW_ARCH == 10 )); then grep -qi 'vendor_id.*intel' /proc/cpuinfo && G_AGI intel-microcode @@ -14526,20 +14517,20 @@ _EOF_ fi - # - Custom 1st run Script (Local file) + # Custom 1st run Script (Local file) local run_custom_script=0 if [[ -f '/boot/Automation_Custom_Script.sh' ]]; then cp /boot/Automation_Custom_Script.sh /root/AUTO_CustomScript.sh run_custom_script=1 - # - Custom 1st run Script (Online file) - elif [[ $AUTOINSTALL_CUSTOMSCRIPTURL != '0' ]]; then + # Custom 1st run Script (Online file) + elif [[ $AUTOINSTALL_CUSTOMSCRIPTURL ]]; then INSTALL_URL_ADDRESS=$AUTOINSTALL_CUSTOMSCRIPTURL G_CHECK_URL "$INSTALL_URL_ADDRESS" - #Get script and execute + # Get script and execute wget "$INSTALL_URL_ADDRESS" -O /root/AUTO_CustomScript.sh run_custom_script=1 @@ -14579,24 +14570,25 @@ _EOF_ #///////////////////////////////////////////////////////////////////////////////////// # First Run / Automation functions Vars (eg: on a fresh install) #///////////////////////////////////////////////////////////////////////////////////// - AUTOINSTALL_ENABLED=0 - AUTOINSTALL_SSHINDEX=0 - AUTOINSTALL_FILESERVERINDEX=0 - AUTOINSTALL_LOGGINGINDEX=0 - AUTOINSTALL_WEBSERVERINDEX=0 - AUTOINSTALL_AUTOSTARTTARGET=0 - AUTOINSTALL_CUSTOMSCRIPTURL=0 - FirstRun_Automation_Init(){ # Get settings - AUTOINSTALL_ENABLED=$(grep -m1 '^[[:blank:]]*AUTO_SETUP_AUTOMATED=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') - AUTOINSTALL_AUTOSTARTTARGET=$(grep -m1 '^[[:blank:]]*AUTO_SETUP_AUTOSTART_TARGET_INDEX=' /DietPi/dietpi.txt | sed 's/^[^=]*=//' ) - AUTOINSTALL_SSHINDEX=$(grep -m1 '^[[:blank:]]*AUTO_SETUP_SSH_SERVER_INDEX=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') - AUTOINSTALL_FILESERVERINDEX=$(grep -m1 '^[[:blank:]]*AUTO_SETUP_FILE_SERVER_INDEX=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') - AUTOINSTALL_LOGGINGINDEX=$(grep -m1 '^[[:blank:]]*AUTO_SETUP_LOGGING_INDEX=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') - AUTOINSTALL_WEBSERVERINDEX=$(grep -m1 '^[[:blank:]]*AUTO_SETUP_WEB_SERVER_INDEX=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') - AUTOINSTALL_CUSTOMSCRIPTURL=$(grep -m1 '^[[:blank:]]*AUTO_SETUP_CUSTOM_SCRIPT_EXEC=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') + AUTOINSTALL_ENABLED=$(sed -n '/^[[:blank:]]*AUTO_SETUP_AUTOMATED=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) + AUTOINSTALL_AUTOSTARTTARGET=$(sed -n '/^[[:blank:]]*AUTO_SETUP_AUTOSTART_TARGET_INDEX=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) + AUTOINSTALL_SSHINDEX=$(sed -n '/^[[:blank:]]*AUTO_SETUP_SSH_SERVER_INDEX=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) + AUTOINSTALL_FILESERVERINDEX=$(sed -n '/^[[:blank:]]*AUTO_SETUP_FILE_SERVER_INDEX=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) + AUTOINSTALL_LOGGINGINDEX=$(sed -n '/^[[:blank:]]*AUTO_SETUP_LOGGING_INDEX=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) + AUTOINSTALL_WEBSERVERINDEX=$(sed -n '/^[[:blank:]]*AUTO_SETUP_WEB_SERVER_INDEX=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) + AUTOINSTALL_CUSTOMSCRIPTURL=$(sed -n '/^[[:blank:]]*AUTO_SETUP_CUSTOM_SCRIPT_EXEC=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) + AUTOINSTALL_TIMESYNCMODE=$(sed -n '/^[[:blank:]]*CONFIG_NTP_MODE=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) + # Else set defaults + [[ $AUTOINSTALL_ENABLED ]] || AUTOINSTALL_ENABLED=0 + [[ $AUTOINSTALL_AUTOSTARTTARGET ]] || AUTOINSTALL_AUTOSTARTTARGET=0 + [[ $AUTOINSTALL_SSHINDEX ]] || AUTOINSTALL_SSHINDEX=0 + [[ $AUTOINSTALL_FILESERVERINDEX ]] || AUTOINSTALL_FILESERVERINDEX=0 + [[ $AUTOINSTALL_LOGGINGINDEX ]] || AUTOINSTALL_LOGGINGINDEX=0 + [[ $AUTOINSTALL_WEBSERVERINDEX ]] || AUTOINSTALL_WEBSERVERINDEX=0 + [[ $AUTOINSTALL_TIMESYNCMODE ]] || AUTOINSTALL_TIMESYNCMODE=2 } @@ -14614,7 +14606,7 @@ _EOF_ while read -r software_id do - # - Flag for installation + # Flag for installation if [[ ${aSOFTWARE_NAME[$software_id]} ]]; then aSOFTWARE_INSTALL_STATE[$software_id]=1 @@ -14633,7 +14625,10 @@ _EOF_ INDEX_WEBSERVER_TARGET=$AUTOINSTALL_WEBSERVERINDEX # Re-flag RAMlog for install, if enabled, ensures AUTO_SETUP_RAMLOG_MAXSIZE gets applied - (( $INDEX_LOGGING_TARGET == -1 || $INDEX_LOGGING_TARGET == -2 )) && aSOFTWARE_INSTALL_STATE[103]=1 + [[ $INDEX_LOGGING_TARGET == -[12] ]] && aSOFTWARE_INSTALL_STATE[103]=1 + + # Set time sync mode + /DietPi/dietpi/func/dietpi-set_software ntpd-mode $AUTOINSTALL_TIMESYNCMODE } @@ -14890,10 +14885,10 @@ _EOF_ # Generate Whiptail menu list, of all items in specific software type, based on category else - # - Prewarnings - Linux + # Prewarnings - Linux if (( $input_mode == 1 )); then - # Inform User that DietPi software will automatically install additional linux software when required. + # Inform User that DietPi software will automatically install additional linux software when required. if (( ! $USER_LINUX_AUTOINSTALL_PROMPT_DISPLAYED )); then G_WHIP_MSG 'DietPi will automatically install additional Linux software on the next screen, when required (eg: Desktop LXDE will install ALSA + Xserver).\n\nThis means you only need to select the software you actually require.' @@ -16000,16 +15995,16 @@ Do you wish to continue with DietPi as a pure minimal image?'; then # 1st run dietpi-software if (( $G_DIETPI_INSTALL_STAGE == 1 )); then - # - Load all automation vars + # Load all automation vars FirstRun_Automation_Init - # - Global PW - # Automation, apply as per dietpi.txt + # Global PW + # - Automation, apply as per dietpi.txt if (( $AUTOINSTALL_ENABLED )); then /DietPi/dietpi/func/dietpi-set_software passwords "$GLOBAL_PW" - # Prompt change global password and login passwords for root and dietpi users + # - Prompt change global password and login passwords for root and dietpi users else /DietPi/dietpi/func/dietpi-set_software passwords @@ -16017,10 +16012,10 @@ Do you wish to continue with DietPi as a pure minimal image?'; then fi - # - Disable serial? Must stay enabled for the following: - # XU4: HC1/HC2 fail to boot into kernel without: https://github.com/MichaIng/DietPi/issues/2038#issuecomment-416089875 - # RockPro64: Fails to boot into kernel without - # NanoPi Neo Air: Required for end users/debugging/setting up WiFi without automation + # Disable serial? Must stay enabled for the following: + # - XU4: HC1/HC2 fail to boot into kernel without: https://github.com/MichaIng/DietPi/issues/2038#issuecomment-416089875 + # - RockPro64: Fails to boot into kernel without + # - NanoPi Neo Air: Required for end users/debugging/setting up WiFi without automation if grep -q '^[[:blank:]]*CONFIG_SERIAL_CONSOLE_ENABLE=1' /DietPi/dietpi.txt && (( $G_HW_MODEL != 11 && $G_HW_MODEL != 42 && $G_HW_MODEL != 64 )) && G_WHIP_YESNO 'Serial console is currently enabled, would you like to disable it?\n - Disabling serial console will reduce memory consumption slightly\n - If you are unsure on what serial console is, it is safe to disable it'; then @@ -16031,7 +16026,7 @@ Do you wish to continue with DietPi as a pure minimal image?'; then fi - # Prevent continue if no Network or NTPD is not completed: https://github.com/MichaIng/DietPi/issues/786 + # Prevent continue if no network or time sync is not completed: https://github.com/MichaIng/DietPi/issues/786 Check_Internet_and_NTPD # Apply 1st run automation From 6dd9b175284006a19edafe25cf32b6b0bb87b960 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 15 Sep 2019 19:44:05 +0200 Subject: [PATCH 137/184] v6.26 + CHANGELOG | General: Full/dist APT upgrades are now performed on first run installs + CHANGELOG | Amiberry: RPi4 support and binaries have been added --- CHANGELOG.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 97327850eb..f7147e4123 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,7 @@ Changes / Improvements / Optimisations: - General | Support for Debian Jessie has now been fully dropped from DietPi code. Jessie systems are moved to the "jessie-support" Git branch and will stay on v6.25. Critical bugs, if reported, may still be fixed, but DietPi-Software related issues and new features will not be handled anymore by the DietPi code team. However, everyone is free to open pull requests against the jessie-support branch: https://github.com/MichaIng/DietPi/tree/jessie-support - General | Initial support and definitions for Debian Bullseye, the new Debian testing version, have been added to DietPi code. You can now create Bullseye systems via DietPi-PREP: https://github.com/MichaIng/DietPi/issues/3009 - General | DietPi scripts, i.e. dietpi-software, will not overwrite you custom permissions in /mnt/dietpi_userdata anymore. Instead required permissions are now only applied for individual software titles that are being installed. Besides saving you time to re-apply custom permission, this as well enhances security in some cases where software installers/archives apply/contain stricter per-file/dir permissions. Many thanks to @JJGO and @johnvick for suggesting this enhancement: https://github.com/MichaIng/DietPi/issues/2641 +- General | On first boot, when DietPi-Software finishes the initial setup, it is now assured that all APT packages, including firmware, are upgraded by performing an "apt-get dist-upgrade"/"apt full-upgrade". Since it includes upgrades regardless of underlying dependency and conflict changes, which in rare cases can perform unwanted removals, we do not do this on regualar DietPi-Update/Software runs. But on first boot, without additional packages installed yet, it is safe. Many thanks to @cmessin1 for doing this request: https://github.com/MichaIng/DietPi/issues/3098 - RPi | The haveged daemon has been replaced with rng-tools, an alternative which does not work on all devices, but has been proven to work on RPi, is default on Raspbian and uses less RAM on idle. - DietPi-Globals | The environment variable $G_USER_INPUTS has been renamed to $G_INTERACTIVE, which describes better what it does. When setting this to "0", DietPi scripts will run non-interactively, i.e. all whiptail dialog prompts and other tasks that require manual user input are skipped. Note that this is not required when running scripts from cron jobs or systemd units, since those have no STDIN attached which makes DietPi scripts run non-interactively automatically. Scripts will stay backwards-compatible, thus respect $G_USER_INPUTS for a while, but please adjust your scripts or docs where you make use of it. Many thanks to @AtkLordOverAll for contributing this change: https://github.com/MichaIng/DietPi/pull/3041 - DietPi-Banner/NordVPN: DietPi-NordVPN has a new input command to print the current VPN connection state: "dietpi-nordvpn status". This has been implemented as well into DietPi-Banner to optionally show NordVPN connection state on login automatically. Many thanks to @svh1985 for implementing this feature: https://github.com/MichaIng/DietPi/pull/3084 @@ -19,7 +20,7 @@ Changes / Improvements / Optimisations: - DietPi-Software | OpenVPN: Rsyslog is not installed anymore together with OpenVPN server. Logs are available via "journalctl -u openvpn", all system logs via "journalctl". If you require persistent logs, uninstall DietPi-RAMlog via dietpi-software and make the journal boot persistent via: mkdir /var/log/journal - DietPi-Software | Gogs: On ARMv7 and x86_64 now the latest version from GitHub is installed. Reinstalls will upgrade the version while preserving existing settings. Many thanks to @LazyLama for doing this suggestion: https://github.com/MichaIng/DietPi/issues/2999 - DietPi-Software | Webmin: Install is now done via official APT repository to allow easier updates. To apply this to all systems, it is reinstalled on DietPi-Update to v6.26. Additionally the dependency on rsyslog has been removed. The Webmin logging panel still depends on rsyslog, but the overhead shall not be applied to all systems by default. Instead users can now decide themselves, whether they need to see system logs on Webmin, or not, and in case apply custom logging settings as well. -- DietPi-Software | Amiberry: Enabled experimental support for Odroid XU4. +- DietPi-Software | Amiberry: Enabled support for RPi4 and Odroid XU4. Thanks to @midwan for providing the binaries: https://github.com/MichaIng/DietPi/issues/3104 Bug Fixes: - General | Removed an obsolete OpenMediaVault cron job and binary that was leftover on at least one of our images (NanoPi NEO2) and is not part of the current OMV packages, thus save to remove in every case. Many thanks to @kt1024 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2994 From 5db4a3305cc27a611df5f9869e5470c89436ecb8 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 15 Sep 2019 22:30:29 +0200 Subject: [PATCH 138/184] v6.26 (#3110) + DietPi-Software | myMPD: Update install steps to match current version: https://github.com/MichaIng/DietPi/issues/3097 + DietPi-Software | myMPD: Do not run service as "dietpi" group. Since it only reads but not writes media files, it is sufficient with "dietpi" as supplementary group. + DietPi-Software | myMPD: Add libmediainfo0v5 to pre-reqs. It is pulled with libmediainfo-dev, but same as with libmpdclient-dev and libmpdclient2 we need to have the library stay installed if user uninstalls -dev packages, e.g. via DietPi-Cleaner. + DietPi-Software | Do not prompt via G_WHIP when Download_Install() updates a config file, but print via G_DIETPI-NOTIFY() only instead. If it is a config file where custom user changes are expected, we create a G_BACKUP_FP() anyway which as well prints related info. + DietPi-Patch | myMPD: Move systemd unit to new location (matching current release) and do not start as "dietpi" group anymore, which is only required for software titles that write media files: https://github.com/MichaIng/DietPi/issues/3097 --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 47 ++++++++++++++---------------------------- dietpi/patch_file | 14 +++++++++++++ 3 files changed, 30 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f7147e4123..d5190acdef 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -21,6 +21,7 @@ Changes / Improvements / Optimisations: - DietPi-Software | Gogs: On ARMv7 and x86_64 now the latest version from GitHub is installed. Reinstalls will upgrade the version while preserving existing settings. Many thanks to @LazyLama for doing this suggestion: https://github.com/MichaIng/DietPi/issues/2999 - DietPi-Software | Webmin: Install is now done via official APT repository to allow easier updates. To apply this to all systems, it is reinstalled on DietPi-Update to v6.26. Additionally the dependency on rsyslog has been removed. The Webmin logging panel still depends on rsyslog, but the overhead shall not be applied to all systems by default. Instead users can now decide themselves, whether they need to see system logs on Webmin, or not, and in case apply custom logging settings as well. - DietPi-Software | Amiberry: Enabled support for RPi4 and Odroid XU4. Thanks to @midwan for providing the binaries: https://github.com/MichaIng/DietPi/issues/3104 +- DietPi-Software | myMPD: Updated install steps to avoid deprecations of the current upstream version. As well the service will not run as primary group "dietpi" anymore, which is only required for software that creates media files. Many thanks to @jcorporation (developer of myMPD) for providing this information as well as a smooth build script that updates old instances gracefully: https://github.com/MichaIng/DietPi/issues/3097 Bug Fixes: - General | Removed an obsolete OpenMediaVault cron job and binary that was leftover on at least one of our images (NanoPi NEO2) and is not part of the current OMV packages, thus save to remove in every case. Many thanks to @kt1024 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2994 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 910b364094..f07fba63f1 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -2867,7 +2867,7 @@ Package: *php7.3*\nPin: release *\nPin-Priority: -1' > /etc/apt/preferences.d/di # Download file if [[ $DEPS_LIST ]]; then - # - Download as background thread if dependencies are to be installed + # Download as background thread if dependencies are to be installed G_THREAD_START wget "$url" -O $file G_AGI $DEPS_LIST DEPS_LIST='' @@ -2882,16 +2882,16 @@ Package: *php7.3*\nPin: release *\nPin-Priority: -1' > /etc/apt/preferences.d/di # Process downloaded file if [[ $type == dps_index ]]; then - # - Pre-create dir + # Pre-create dir local fp_dir=${target%/*} [[ -d $fp_dir ]] || G_RUN_CMD mkdir -p "$fp_dir" - [[ -f $target ]] && G_WHIP_MSG "[ INFO ] Updating file: $target" + [[ -f $target ]] && G_DIETPI-NOTIFY 2 "Updating file: $target" G_RUN_CMD mv $file "$target" elif [[ $type == 'deb' ]]; then - # - Allow error on first attempt, giving APT fix a change to resolve e.g. dependencies + # Allow error on first attempt, giving APT fix a change to resolve e.g. dependencies G_INTERACTIVE=0 G_ERROR_HANDLER_INFO_ONLY=1 G_RUN_CMD dpkg --force-hold,confdef,confold -i $file (( $G_ERROR_HANDLER_EXITCODE_RETURN )) && G_DIETPI-NOTIFY 2 'Trying automated APT fix' && G_AGF @@ -3556,12 +3556,11 @@ _EOF_ Banner_Installing # Sourcebuild pre-reqs: https://github.com/jcorporation/myMPD#dependencies - DEPS_LIST='libmpdclient2 cmake cppcheck pkg-config libmpdclient-dev libssl-dev libmediainfo-dev' - + DEPS_LIST='libmpdclient2 libmediainfo0v5 cmake cppcheck pkg-config libmpdclient-dev libssl-dev libmediainfo-dev' Download_Install 'https://github.com/jcorporation/myMPD/archive/master.zip' cd myMPD-master - G_RUN_CMD ./mkrelease.sh + G_RUN_CMD ./build.sh releaseinstall cd /tmp/$G_PROGRAM_NAME rm -R myMPD-master @@ -8006,34 +8005,19 @@ _EOF_ Banner_Configuration # Add user to "dietpi" group - usermod -a -G dietpi mympd - # - Add to new "render" group on Buster - (( $G_DISTRO > 4 )) && usermod -a -G render mympd - - # Run service as "dietpi" group - mkdir -p /etc/systemd/systemd/mympd.service.d - echo -e '[Service]\nGroup=dietpi' > /etc/systemd/systemd/mympd.service.d/dietpi-group.conf + usermod -aG dietpi mympd + # Add to new "render" group on Buster + (( $G_DISTRO > 4 )) && usermod -aG render mympd # Adjust config file on fresh install # - On reinstall /etc/mympd/mympd.conf.dist will be created, so use its existence as reinstall flag - if [[ ! -f '/etc/mympd/mympd.conf.dist' ]]; then + if [[ ! -f '/etc/mympd.conf.dist' ]]; then - G_CONFIG_INJECT 'webport[[:blank:]]*=' 'webport = 1333' /etc/mympd/mympd.conf - G_CONFIG_INJECT 'ssl[[:blank:]]*=' 'ssl = false' /etc/mympd/mympd.conf + G_CONFIG_INJECT 'webport[[:blank:]]*=' 'webport = 1333' /etc/mympd.conf + G_CONFIG_INJECT 'ssl[[:blank:]]*=' 'ssl = false' /etc/mympd.conf fi - # Symlink music/libary dir to DietPi music dir - if [[ $(readlink /usr/share/mympd/htdocs/library) != $G_FP_DIETPI_USERDATA/$FOLDER_MUSIC ]]; then - - rm -Rf /usr/share/mympd/htdocs/library - ln -sf $G_FP_DIETPI_USERDATA/$FOLDER_MUSIC /usr/share/mympd/htdocs/library - - fi - - # Permissions - chown -R mympd:dietpi /var/lib/mympd - fi software_id=121 # Roon Bridge @@ -12466,14 +12450,13 @@ _EOF_ if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then #apt-mark auto libmpdclient2 cmake cppcheck pkg-config libmpdclient-dev libssl-dev libmediainfo-dev - if [[ -f '/usr/lib/systemd/system/mympd.service' ]]; then + if [[ -f '/lib/systemd/system/mympd.service' ]]; then systemctl unmask mympd - systemctl disable mympd - rm /usr/lib/systemd/system/mympd.service + systemctl disable --now mympd + rm /lib/systemd/system/mympd.service fi - [[ -d '/etc/systemd/system/mympd.service.d' ]] && rm -R /etc/systemd/system/mympd.service.d getent passwd mympd &> /dev/null && userdel -rf mympd command -v mympd &> /dev/null && rm $(command -v mympd) rm -Rf /{etc,var/lib,usr/share}/mympd diff --git a/dietpi/patch_file b/dietpi/patch_file index 05e92e188e..7fcfc5cd31 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2235,6 +2235,20 @@ Do you want to keep PulseAudio installed?' || apt-mark auto pulseaudio G_AGA G_AGI --reinstall aml-libs-odroid mali450-odroid libump-odroid xf86-video-fbturbo-odroid + fi + # myMPD: https://github.com/MichaIng/DietPi/pull/3110 + if grep -q '^aSOFTWARE_INSTALL_STATE\[148\]=2' /DietPi/dietpi/.installed; then + + # NB: On Debian Buster by default /lib is a symlink to /usr/lib, thus the below fails as both files are the same. However it does not hurt and assures no obsolete service file will be left (after uninstall). + if [[ -f '/usr/lib/systemd/system/mympd.service' ]]; then + + mv /usr/lib/systemd/system/mympd.service /lib/systemd/system/mympd.service 2> /dev/null + systemctl daemon-reload + + fi + [[ -f '/etc/systemd/systemd/mympd.service.d/dietpi-group.conf' ]] && rm /etc/systemd/systemd/mympd.service.d/dietpi-group.conf + [[ -d '/etc/systemd/systemd/mympd.service.d' ]] && rmdir --ignore-fail-on-non-empty /etc/systemd/systemd/mympd.service.d + fi # Webmin: https://github.com/MichaIng/DietPi/commit/ec55d49a488fd9cb1dbb18cbfa067b5d1d1a974e /DietPi/dietpi/dietpi-software reinstall 115 From 77191076267cdddc4a55397920afd011d1a25b8a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 16 Sep 2019 10:25:55 +0200 Subject: [PATCH 139/184] v6.26 (#3092) + DietPi-Software | Kodi: Fix Kodi install on RPi Buster, since archive.raspbian.org does not yet contain a Buster-compatible package. Use a 3rd-party repo for RPi1-3 for now and a custom compiled package for RPi4, to have full GPU acceleration. + DietPi-Software | Kodi: start_kodi will now run plain kodi binary with --standalone argument. kodi-rpi4 and kodi-standalone are shell wrappers only, that do nothing that we want or require. + DietPi-Software | Kodi: fbset seems to be not required for the custom Buster+RPi4-compatible Kodi 18 builds, thus only install on RPi+Stretch --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 56 +++++++++++++++++++++++++++++++----------- dietpi/misc/start_kodi | 6 ++--- 3 files changed, 46 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d5190acdef..e4937a4719 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -34,6 +34,7 @@ Bug Fixes: - DietPi-Config | Resolved an issue on RPi where headless mode did not disable all video outputs and framebuffer as intended, since the used config.txt setting has been removed with recent firmware versions. - DietPi-Software | Resolved an issue where the script tells you that SQLite will be installed as pre-req, while actually a desktop is required and LXDE will be installed. - DietPi-Software | X11/Kodi on Odroid C2: Resolved an issue on Odroid C2 where Kodi failed to start. GPU drivers and X11 config will be updated during DietPi-Update to cover this issue. Many thanks to @alexeylutskov for reporting this issue and testing the fix: https://github.com/MichaIng/DietPi/issues/3028 +- DietPi-Software | Kodi: Resolved an issue where Kodi failed on RPi Buster and RPi4. Many thanks to @GulyFMG, @derdershat and @jonyskids for reporting this issue, searching and testing workarounds: https://github.com/MichaIng/DietPi/issues/3031 - DietPi-Software | Gitea: Resolved an issue where install fails on ARMv7 systems. Many thanks to @maschiw for reporting this issue: https://github.com/MichaIng/DietPi/issues/2959 - DietPi-Software | Node-RED: Resolved an issue where install fails due to missing data dir creation. Many thanks to @Orfait for reporting this issue: https://github.com/MichaIng/DietPi/issues/2975 - DietPi-Software | Node-RED: Resolved an issue where user creation fails if "gpio" group is not present. Many thanks to @marcobrianza for reporting this issue: https://github.com/MichaIng/DietPi/issues/2975#issuecomment-513917360 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index f07fba63f1..602ea938f5 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3669,28 +3669,56 @@ _EOF_ Banner_Installing - # Odroids - if (( $G_HW_MODEL > 9 )) && (( $G_HW_MODEL < 20 )); then + # CEC support + libcurl3-gnutls required for C2, but lets apply to all: https://github.com/MichaIng/DietPi/issues/446 + local package_list='libcec4 libcurl3-gnutls' - local package_list='kodi-odroid' + # NFS support + (( $G_DISTRO < 5 )) && package_list+=' libnfs8' || package_list+=' libnfs12' + + # RPi4: https://github.com/MichaIng/DietPi/issues/3031 + if (( $G_HW_MODEL == 4 )); then + + DEPS_LIST=$package_list + no_check_url=1 Download_Install 'https://transfer.sh/X7gZH/kodi-rpi4_18.4.0-1_armhf.deb' - # Everything else else - local package_list='kodi' + # Odroids + if [[ $G_HW_MODEL == 1[0-9] ]]; then - # RPi: Kodi 18 requires fbset to start with custom screen resolution: https://dietpi.com/phpbb/viewtopic.php?p=17550#p17550 - (( $G_HW_MODEL < 10 )) && package_list+=' fbset' + package_list+=' kodi-odroid' - fi + # Everything else + else - # CEC support + libcurl3-gnutls required for C2, but lets apply to all: https://github.com/MichaIng/DietPi/issues/446 - package_list+=' libcec4 libcurl3-gnutls' + package_list+=' kodi' - # NFS support - (( $G_DISTRO < 5 )) && package_list+=' libnfs8' || package_list+=' libnfs12' + # RPi1/2/3 + if (( $G_HW_MODEL < 10 )); then - G_AGI $package_list + # - Buster: https://github.com/MichaIng/DietPi/issues/3031 + if (( $G_DISTRO > 4 )); then + + INSTALL_URL_ADDRESS='http://pipplware.pplware.pt/pipplware/key.asc' + G_CHECK_URL "$INSTALL_URL_ADDRESS" + curl -sSL "$INSTALL_URL_ADDRESS" | apt-key add - + echo 'deb http://pipplware.pplware.pt/pipplware/dists/buster/main/binary /' > /etc/apt/sources.list.d/dietpi-kodi.list + G_AGUP + + # - Stretch: fbset required to start with custom screen resolution: https://dietpi.com/phpbb/viewtopic.php?p=17550#p17550 + else + + package_list+=' fbset' + + fi + + fi + + fi + + G_AGI $package_list + + fi fi @@ -4784,7 +4812,7 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior else Download_Install "https://dietpi.com/downloads/binaries/stretch/netdata_$G_HW_ARCH_DESCRIPTION.7z" - dpkg --force-hold,confdef,confnew -i netdata{-core,-plugins-bash,-web,}_*.deb + dpkg --force-hold,confdef,confold -i netdata{-core,-plugins-bash,-web,}_*.deb G_AGF rm netdata* diff --git a/dietpi/misc/start_kodi b/dietpi/misc/start_kodi index 657128d012..3bf8394a0f 100644 --- a/dietpi/misc/start_kodi +++ b/dietpi/misc/start_kodi @@ -17,16 +17,16 @@ #//////////////////////////////////// # Import DietPi-Globals -------------------------------------------------------------- # G_HW_MODEL required only - G_HW_MODEL=$(sed -n 1p /DietPi/dietpi/.hw_model) + G_HW_MODEL=$(mawk 'NR==1 {print}' /DietPi/dietpi/.hw_model) # Import DietPi-Globals -------------------------------------------------------------- #///////////////////////////////////////////////////////////////////////////////////// # Main Loop #///////////////////////////////////////////////////////////////////////////////////// - # Raspberry Pi + # RPi if (( $G_HW_MODEL < 10 )); then - kodi-standalone + kodi --standalone # Everything else # - From desktop From cdcb87a10c355d3f09b3099737321bc39161f989 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 16 Sep 2019 13:16:37 +0200 Subject: [PATCH 140/184] v6.26 + DietPi-Software | WiFi Hotspot: Unmask service on install and use our custom compiled binaries (+libssl1.0.0 package) only for RTL8188C* devices + if there is no RTL-specific APT package available in repo (e.g. ARMbian) + on supported architectures only (e.g. not x86_64) + DietPi-Software | WiFi Hotspot: Allow install on VM, e.g. for testing reasons, since it is possible to use USB WiFi dongles attached to host on VM guests + DietPi-Software | Fail2Ban: Adjust our default jail.conf - "name", "bantime" and "port" variables are not handled by route ban action. Instead "blocktype" can be used to define the route type. By default "unreachable" is used, which sends still an answer to blocked requests, thus we use "blackhole" to send to answer at all. + DietPi-Software | Fail2Ban: Remove the obsolete sysvinit service to avoid any interference and possible confusion, e.g. since /etc/default/fail2ban has no effect on the systemd unit. + DietPi-Software | Minor coding --- dietpi/dietpi-software | 187 ++++++++++++++++++++++------------------- 1 file changed, 100 insertions(+), 87 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 602ea938f5..2c021e39ab 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -211,6 +211,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it USER_EMONHUB_APIKEY_COMPLETED=0 USER_EMONHUB_APIKEY_CURRENT=0 WIFIHOTSPOT_RTL8188C_DEVICE=0 + WIFIHOTSPOT_RTL8188C_PACKAGE=0 USER_LINUX_AUTOINSTALL_PROMPT_DISPLAYED=0 # PHP version specific directories, APT package-, module- and command names @@ -1271,8 +1272,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=8 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1207#p1207' - # - VM - aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,20]=0 #------------------ software_id=61 @@ -1281,8 +1280,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=8 aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=1529#p1529' - # - VM - aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,20]=0 # System stats #-------------------------------------------------------------------------------- @@ -1554,8 +1551,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_NAME[$software_id]='Fail2Ban' aSOFTWARE_DESC[$software_id]='prevents brute-force attacks with ip ban' - aSOFTWARE_CATEGORY_INDEX[$software_id]=12 aSOFTWARE_TYPE[$software_id]=0 + aSOFTWARE_CATEGORY_INDEX[$software_id]=12 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=452#p452' # Webserver stacks @@ -2298,10 +2295,19 @@ DietPi-Software will decrypt and use it for software installs. You can change it fi # Software that requires LibSSL1.0.0 + # - WiFi Hotspot (60, our custom compiled RTL8188C* binaries only) + # Check for RTL8188C* device, which requires a different driver: https://github.com/pritambaral/hostapd-rtl871xdrv#why + if (( ${aSOFTWARE_INSTALL_STATE[60]} == 1 )) && lsusb | grep -qi 'RTL8188C'; then + + WIFIHOTSPOT_RTL8188C_DEVICE=1 + # Some repos (e.g. ARMbian) provide special packages + apt-cache show hostapd-realtek &> /dev/null && WIFIHOTSPOT_RTL8188C_PACKAGE=1 + + fi # - Jackett (147) software_id=126 if (( ${aSOFTWARE_INSTALL_STATE[37]} == 1 || - ${aSOFTWARE_INSTALL_STATE[60]} == 1 || + ( ${aSOFTWARE_INSTALL_STATE[60]} == 1 && $WIFIHOTSPOT_RTL8188C_DEVICE && ! $WIFIHOTSPOT_RTL8188C_PACKAGE && $G_HW_ARCH < 4 ) || ${aSOFTWARE_INSTALL_STATE[134]} == 1 || ${aSOFTWARE_INSTALL_STATE[147]} == 1 )); then @@ -4352,28 +4358,32 @@ _EOF_ mkdir -p /etc/fail2ban [[ -f '/etc/fail2ban/jail.conf' ]] || cat << _EOF_ > /etc/fail2ban/jail.conf [DEFAULT] +enabled = true ignoreip = 127.0.0.1/8 ignorecommand = -bantime = 600 -findtime = 600 -maxretry = 3 backend = systemd -enabled = true filter = %(__name__)s -port = 0:65535 +findtime = 600 +maxretry = 3 +bantime = 600 banaction = route -action_ = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s"] -action = %(action_)s - -[sshd] -port = ssh +action = %(banaction)s[blocktype=blackhole] [dropbear] -port = ssh + +[sshd] _EOF_ G_AGI python3-systemd fail2ban + # Remove obsolete sysvinit service and traces + rm -f /etc/{init.d,default}/fail2ban + update-rc.d -f fail2ban remove + + # Failsafe + G_RUN_CMD systemctl unmask fail2ban + G_RUN_CMD systemctl enable --now fail2ban + fi software_id=74 # InfluxDB @@ -4635,53 +4645,61 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior Banner_Installing DEPS_LIST='hostapd isc-dhcp-server iptables libnl-3-200' - Download_Install 'https://dietpi.com/downloads/binaries/all/hostapd_2.5_all.zip' - # - Check for RTL8188C* device, use the patched binary I compiled: https://github.com/pritambaral/hostapd-rtl871xdrv#why - if lsusb | grep -qi 'RTL8188C' || (( $G_HW_MODEL == 70 )); then #Force RTL for allo provided WiFi dongle + # RTL8188C* device if RTL package is available + if (( $WIFIHOTSPOT_RTL8188C_DEVICE && $WIFIHOTSPOT_RTL8188C_PACKAGE )); then - WIFIHOTSPOT_RTL8188C_DEVICE=1 + G_AGI ${DEPS_LIST/hostapd/hostapt-realtek} - fi + # Else use our compiled binaries (for all but x86_64) + elif (( $WIFIHOTSPOT_RTL8188C_DEVICE && $G_HW_ARCH < 4 )); then - # Which binary to install - local filename_hostapd='' - local filename_hostapd_cli='' + Download_Install 'https://dietpi.com/downloads/binaries/all/hostapd_2.5_all.zip' - # - armv6 - if (( $G_HW_ARCH == 1 )); then + # Which binary to install + local filename_hostapd='' + local filename_hostapd_cli='' - filename_hostapd='hostapd-nl80211-armv6' - (( $WIFIHOTSPOT_RTL8188C_DEVICE )) && filename_hostapd='hostapd-rtl8188c-armv6' - filename_hostapd_cli='hostapd_cli-armv6' + # ARMv6 + if (( $G_HW_ARCH == 1 )); then - # - armv7+ - elif (( $G_HW_ARCH == 2 )); then + filename_hostapd='hostapd-rtl8188c-armv6' + filename_hostapd_cli='hostapd_cli-armv6' - filename_hostapd='hostapd-nl80211-armv7' - (( $WIFIHOTSPOT_RTL8188C_DEVICE )) && filename_hostapd='hostapd-rtl8188c-armv7' - filename_hostapd_cli='hostapd_cli-armv7' + # ARMv7 + elif (( $G_HW_ARCH == 2 )); then - # - arm64 - elif (( $G_HW_ARCH == 3 )); then + filename_hostapd='hostapd-rtl8188c-armv7' + filename_hostapd_cli='hostapd_cli-armv7' - filename_hostapd='hostapd-nl80211-arm64' - (( $WIFIHOTSPOT_RTL8188C_DEVICE )) && filename_hostapd='hostapd-rtl8188c-arm64' - filename_hostapd_cli='hostapd_cli-arm64' + # ARMv8 + elif (( $G_HW_ARCH == 3 )); then - fi + filename_hostapd='hostapd-rtl8188c-arm64' + filename_hostapd_cli='hostapd_cli-arm64' + + fi - mv "$filename_hostapd" /usr/sbin/hostapd - mv "$filename_hostapd_cli" /usr/sbin/hostapd_cli + mv "$filename_hostapd" /usr/sbin/hostapd + mv "$filename_hostapd_cli" /usr/sbin/hostapd_cli + chmod +x /usr/sbin/hostapd{,_cli} + + rm hostapd-* + + # In all other cases install the default package. + # NB: Debian Stretch ships an older version then our own compiled binaries, but many device/firmware repos (RPi, Meveric, ARMbian) ship newer ones even for Stretch, thus we should not overwrite them anymore. + else - chmod +x /usr/sbin/hostapd - chmod +x /usr/sbin/hostapd_cli + G_AGI $DEPS_LIST - rm hostapd-* + fi - # Enable wifi modules + # Enable WiFi modules /DietPi/dietpi/func/dietpi-set_hardware wifimodules enable + # Unmask hostapd service: https://github.com/MichaIng/DietPi/issues/2962 + G_RUN_CMD systemctl unmask hostapd + fi software_id=61 # Tor Hotspot @@ -9596,10 +9614,10 @@ If no WireGuard (auto)start is included, but you require it, please do the follo Banner_Configuration - local eth_index=$(sed -n 1p /DietPi/dietpi/.network) - local wifi_index=$(sed -n 2p /DietPi/dietpi/.network) + local eth_index=$(mawk 'NR==1 {print}' /DietPi/dietpi/.network) + local wifi_index=$(mawk 'NR==2 {print}' /DietPi/dietpi/.network) - # - DHCPD Config + # DHCPD Config G_BACKUP_FP /etc/dhcp/dhcpd.conf cat << _EOF_ > /etc/dhcp/dhcpd.conf ddns-update-style none; @@ -9617,16 +9635,16 @@ subnet 192.168.42.0 netmask 255.255.255.0 { } _EOF_ - # - Assign wlan as interface for dhcp server. + # Assign detected WLAN interface echo "INTERFACESv4=\"wlan$wifi_index\"" > /etc/default/isc-dhcp-server - # - Remove all entries below wlan, so we can recreate them. + # Remove all entries below wlan, so we can recreate them sed -i '/allow-hotplug wlan/q0' /etc/network/interfaces - # - Enable up wlan - sed -i "/allow-hotplug wlan/c\allow-hotplug wlan$wifi_index" /etc/network/interfaces + # Enable up wlan + G_CONFIG_INJECT 'allow-hotplug wlan' "allow-hotplug wlan$wifi_index" /etc/network/interfaces - # - Add wifi settings to network interfaces config + # Add WiFi settings to network interfaces config cat << _EOF_ >> /etc/network/interfaces iface wlan$wifi_index inet static address 192.168.42.1 @@ -9639,46 +9657,46 @@ wireless-power off up iptables-restore < /etc/iptables.ipv4.nat _EOF_ - # - Assign static IP for wlan now + # Assign static IP for wlan now ip a add 192.168.42.1 dev wlan$wifi_index - # - Create access point config + # Create access point config G_BACKUP_FP /etc/hostapd/hostapd.conf cat << _EOF_ > /etc/hostapd/hostapd.conf interface=wlan$wifi_index driver=nl80211 -ssid=$(grep -m1 '^[[:blank:]]*SOFTWARE_WIFI_HOTSPOT_SSID=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') +ssid=$(sed -n '/^[[:blank:]]*SOFTWARE_WIFI_HOTSPOT_SSID=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) hw_mode=g -channel=$(grep -m1 '^[[:blank:]]*SOFTWARE_WIFI_HOTSPOT_CHANNEL=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') +channel=$(sed -n '/^[[:blank:]]*SOFTWARE_WIFI_HOTSPOT_CHANNEL=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) macaddr_acl=0 auth_algs=1 ignore_broadcast_ssid=0 wpa=2 -wpa_passphrase=$(grep -m1 '^[[:blank:]]*SOFTWARE_WIFI_HOTSPOT_KEY=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') +wpa_passphrase=$(sed -n '/^[[:blank:]]*SOFTWARE_WIFI_HOTSPOT_KEY=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP _EOF_ - # - Check for RTL8188C* device, use the patched driver with compiled binary: https://github.com/pritambaral/hostapd-rtl871xdrv#why + # Check for RTL8188C* device, use the patched driver with compiled binary: https://github.com/pritambaral/hostapd-rtl871xdrv#why (( $WIFIHOTSPOT_RTL8188C_DEVICE )) && G_CONFIG_INJECT 'driver=' 'driver=rtl871xdrv' /etc/hostapd/hostapd.conf - # - Enable access point config + # Enable access point config echo "DAEMON_CONF=\"/etc/hostapd/hostapd.conf\"" > /etc/default/hostapd - # - Enable IP forwarding + # Enable IP forwarding echo -e 'net.ipv4.ip_forward=1\nnet.ipv6.conf.all.forwarding=1\nnet.ipv6.conf.default.forwarding=1' > /etc/sysctl.d/dietpi-wifihotspot.conf sysctl net.ipv4.ip_forward=1 net.ipv6.conf.all.forwarding=1 net.ipv6.conf.default.forwarding=1 - # - Apply iptables + # Apply IP tables iptables -t nat -A POSTROUTING -o eth$eth_index -j MASQUERADE iptables -A FORWARD -i eth$eth_index -o wlan$wifi_index -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -A FORWARD -i wlan$wifi_index -o eth$eth_index -j ACCEPT - # - Save IP tables, applied during ifup in /etc/network/interfaces. + # Save IP tables, applied during ifup in /etc/network/interfaces iptables-save > /etc/iptables.ipv4.nat - # - RPi 3/4 Onboard WiFi: Enable N support + # RPi3/4 onboard WiFi: Enable N support (( ( $G_HW_MODEL == 3 || $G_HW_MODEL == 4 ) && ! $WIFIHOTSPOT_RTL8188C_DEVICE )) && G_CONFIG_INJECT 'ieee80211n=' 'ieee80211n=1' /etc/hostapd/hostapd.conf fi @@ -13392,35 +13410,32 @@ _EOF_ fi - software_id=60 + software_id=60 # WiFi Hotspot if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then Banner_Uninstalling - #apt-mark auto libssl1.0.0 &> /dev/null + #apt-mark auto libnl-3-200 libssl1.0.0 &> /dev/null G_AGP hostapd isc-dhcp-server - rm /etc/dhcp/dhcpd.conf &> /dev/null - rm /etc/hostapd/hostapd.conf &> /dev/null - rm /etc/default/isc-dhcp-server &> /dev/null - rm /etc/default/hostapd &> /dev/null - rm /etc/iptables.ipv4.nat &> /dev/null - # - remove binary (used a -f trigger to detect wifi hotspot mode in dietpi-config). - rm /usr/sbin/hostapd &> /dev/null - rm /usr/sbin/hostapd_cli &> /dev/null + [[ -f '/etc/dhcp/dhcpd.conf' ]] && rm /etc/dhcp/dhcpd.conf + [[ -f '/etc/hostapd/hostapd.conf' ]] && rm /etc/hostapd/hostapd.conf + [[ -f '/etc/default/isc-dhcp-server' ]] && rm /etc/default/isc-dhcp-server + [[ -f '/etc/etc/default/hostapd' ]] && rm /etc/default/hostapd + [[ -f '/etc/iptables.ipv4.nat' ]] && rm /etc/iptables.ipv4.nat + # Remove binary (used a -f trigger to detect wifi hotspot mode in dietpi-config). + [[ -f '/usr/sbin/hostapd' ]] && rm /usr/sbin/hostapd + [[ -f '/usr/sbin/hostapd_cli' ]] && rm /usr/sbin/hostapd_cli # IP forwarding - [[ -f /etc/sysctl.d/dietpi-wifihotspot.conf ]] && rm /etc/sysctl.d/dietpi-wifihotspot.conf + [[ -f '/etc/sysctl.d/dietpi-wifihotspot.conf' ]] && rm /etc/sysctl.d/dietpi-wifihotspot.conf - #Set Wlan back to inactive and ready for use with dietpi-config. - local wifi_index=$(sed -n 2p /DietPi/dietpi/.network) - - # - Remove all entries below wlan, so we can recreate them. + # Set WiFi interface back to inactive and ready for use with dietpi-config. + local wifi_index=$(mawk 'NR==2 {print}' /DietPi/dietpi/.network) + # - Remove all entries below wlan, so we can recreate them sed -i '/allow-hotplug wlan/q0' /etc/network/interfaces - - # - Disable wlan + # - Disable sed -i "/allow-hotplug wlan/c\#allow-hotplug wlan$wifi_index" /etc/network/interfaces - - # - Add default wifi settings to network interfaces config + # - Add default WiFi settings to network interfaces config cat << _EOF_ >> /etc/network/interfaces iface wlan$wifi_index inet dhcp address 192.168.0.101 @@ -13430,11 +13445,9 @@ wireless-power off wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf #dns-nameservers 8.8.8.8 8.8.4.4 _EOF_ - # - Flush IP tables iptables -F iptables -t nat -F - iptables-save > /etc/iptables.ipv4.nat fi From 4d6ccbeee47b54247613f880a03339ff8a72f24d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 16 Sep 2019 13:24:04 +0200 Subject: [PATCH 141/184] v6.26 + DietPi-Services | Do not stop Fail2Ban during updates/installs etc. As long as network is up, brute-force protection must stay active, if installed --- dietpi/dietpi-services | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dietpi/dietpi-services b/dietpi/dietpi-services index d762fd4cbb..a49ab2fc6b 100644 --- a/dietpi/dietpi-services +++ b/dietpi/dietpi-services @@ -56,7 +56,6 @@ Available services: # Core --------------------------------------------------------------- # - Network - 'fail2ban' 'avahi-daemon' 'isc-dhcp-server' 'haproxy' @@ -208,15 +207,16 @@ Available services: aSERVICE_NAME+=('ssh') # OpenSSH Server # - Misc + aSERVICE_NAME+=('fail2ban') # Brute-force protection, which should not be stopped during updates/installs etc #aSERVICE_NAME+=('systemd-timesyncd') # Network time sync: DietPi stops this by default after success, may confuse user/prompt questions. - aSERVICE_NAME+=('dnsmasq') # https://github.com/MichaIng/DietPi/issues/1501 + aSERVICE_NAME+=('dnsmasq') # https://github.com/MichaIng/DietPi/issues/1501 aSERVICE_NAME+=('pihole-FTL') # https://github.com/MichaIng/DietPi/issues/1696 aSERVICE_NAME+=('openvpn') # https://github.com/MichaIng/DietPi/issues/1501 - aSERVICE_NAME+=('vncserver') # DietPi VNC Server - aSERVICE_NAME+=('nxserver') # NoMachine Server + aSERVICE_NAME+=('vncserver') # DietPi VNC Server + aSERVICE_NAME+=('nxserver') # NoMachine Server aSERVICE_NAME+=('xrdp') # XRDP Server - aSERVICE_NAME+=('amiberry') # DietPi Amiberry service - #aSERVICE_NAME+=('wg-quick@wg0') # WireGuard: Currently instantiated services are not supported + aSERVICE_NAME+=('amiberry') # DietPi Amiberry service + #aSERVICE_NAME+=('wg-quick@wg0') # WireGuard: Currently instantiated services are not supported # - DietPi aSERVICE_NAME+=('dietpi-nordvpn') # NordVPN install + client From f5086460d264ed794d024c8aed8bd454999c5b27 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 16 Sep 2019 13:28:02 +0200 Subject: [PATCH 142/184] v6.26 + DietPi-Patch | Enable service since it is not controlled by DietPi-Services anymore: https://github.com/MichaIng/DietPi/commit/4d6ccbeee47b54247613f880a03339ff8a72f24d --- dietpi/patch_file | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dietpi/patch_file b/dietpi/patch_file index 7fcfc5cd31..b4b78185e7 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2250,6 +2250,8 @@ Do you want to keep PulseAudio installed?' || apt-mark auto pulseaudio [[ -d '/etc/systemd/systemd/mympd.service.d' ]] && rmdir --ignore-fail-on-non-empty /etc/systemd/systemd/mympd.service.d fi + # Fail2Ban: Enable service since it is not controlled by DietPi-Services anymore: https://github.com/MichaIng/DietPi/commit/4d6ccbeee47b54247613f880a03339ff8a72f24d + grep -q '^aSOFTWARE_INSTALL_STATE\[73\]=2' /DietPi/dietpi/.installed && systemctl enable --now fail2ban # Webmin: https://github.com/MichaIng/DietPi/commit/ec55d49a488fd9cb1dbb18cbfa067b5d1d1a974e /DietPi/dietpi/dietpi-software reinstall 115 From 77602c20b3f13cec0394891a14e8e85f0aaee295 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 16 Sep 2019 13:37:14 +0200 Subject: [PATCH 143/184] v6.26 + CHANGELOG | WiFi Hotspot and Fail2Ban optimisations --- CHANGELOG.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e4937a4719..ffe24c6bdc 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -22,6 +22,8 @@ Changes / Improvements / Optimisations: - DietPi-Software | Webmin: Install is now done via official APT repository to allow easier updates. To apply this to all systems, it is reinstalled on DietPi-Update to v6.26. Additionally the dependency on rsyslog has been removed. The Webmin logging panel still depends on rsyslog, but the overhead shall not be applied to all systems by default. Instead users can now decide themselves, whether they need to see system logs on Webmin, or not, and in case apply custom logging settings as well. - DietPi-Software | Amiberry: Enabled support for RPi4 and Odroid XU4. Thanks to @midwan for providing the binaries: https://github.com/MichaIng/DietPi/issues/3104 - DietPi-Software | myMPD: Updated install steps to avoid deprecations of the current upstream version. As well the service will not run as primary group "dietpi" anymore, which is only required for software that creates media files. Many thanks to @jcorporation (developer of myMPD) for providing this information as well as a smooth build script that updates old instances gracefully: https://github.com/MichaIng/DietPi/issues/3097 +- DietPi-Software | WiFi Hotspot: Since on some systems, a hostapd service mask was found, it is now unmasked on install. As well our custom compiled binaries are now only installed on RTL8188C* devices where no special Realtek hostapd package is available. Many thanks to @symbios24 for reporting the service mask issue: https://github.com/MichaIng/DietPi/issues/2962 +- DietPi-Software | Fail2Ban is not handled by DietPi-Services anymore, since the brute-force protection shall stay active during updates, installs, backups etc. The service is now started by systemd on boot and stays active until shutdown. Additionally on fresh installs the default jail.conf is optimised for the set "route" ban action: "blackhole" is now the route type, which does not send any respond to blocked requests. Bug Fixes: - General | Removed an obsolete OpenMediaVault cron job and binary that was leftover on at least one of our images (NanoPi NEO2) and is not part of the current OMV packages, thus save to remove in every case. Many thanks to @kt1024 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2994 From 9488ce159fa5ebde498e4d2c51e650bec4b21151 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 16 Sep 2019 14:40:44 +0200 Subject: [PATCH 144/184] v6.26 + DietPi-Config | Toggle new "enable_tvout" config.txt setting on RPi, based on SDTV mode being selected or not. This is only required/effective on RPi4 but we apply it on all models regardless to allow e.g. switching SDcard --- dietpi/dietpi-config | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 10724c10eb..5be9676ef0 100644 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -826,10 +826,10 @@ A long (or insufficiently manufactured) cable may required a higher boost settin local current_value=$(grep -m1 '^[[:blank:]]*dtoverlay=vc4-' /DietPi/config.txt | sed 's/^[^=]*=//') # OpenGL check 1st if [[ ! $current_value ]]; then - # - FB + # Framebuffer current_value="$framebuffer_x X $framebuffer_y" - # - Check for headless + # Check for headless grep -q '^[[:blank:]]*AUTO_SETUP_HEADLESS=1' /DietPi/dietpi.txt && current_value='Headless' fi @@ -861,6 +861,7 @@ A long (or insufficiently manufactured) cable may required a higher boost settin TARGETMENUID=2 # Return to this menu + # Enable headless if chosen, else always disable if [[ $G_WHIP_RETURNED_VALUE == 'Headless' ]]; then G_WHIP_YESNO 'Using the Headless option will: @@ -881,10 +882,15 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the fi - # - Always disable composite by default - [[ $G_WHIP_RETURNED_VALUE == 'sdtv_mode'* ]] || sed -i '/sdtv_mode=/c\#sdtv_mode=0' /DietPi/config.txt + # Disable composite if not chosen + if ! [[ $G_WHIP_RETURNED_VALUE == 'sdtv_mode'* ]]; then - # - Always disable OpenGL by default + sed -i '/sdtv_mode=/c\#sdtv_mode=0' /DietPi/config.txt + sed -i '/enable_tvout=/c\#enable_tvout=0' /DietPi/config.txt + + fi + + # Disable OpenGL if not chosen [[ $G_WHIP_RETURNED_VALUE == 'vc4-'* ]] || /DietPi/dietpi/func/dietpi-set_hardware rpi-opengl disable if [[ $G_WHIP_RETURNED_VALUE == 'vc4-'* ]]; then @@ -897,7 +903,9 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the 'sdtv_mode'*) - sed -i "/sdtv_mode=/c\\$G_WHIP_RETURNED_VALUE" /DietPi/config.txt + # Enable SDTV on RPi4, apply to all RPi to allow SDcard switch + G_CONFIG_INJECT 'enable_tvout=' 'enable_tvout=1' /DietPi/config.txt + G_CONFIG_INJECT 'sdtv_mode=' "$G_WHIP_RETURNED_VALUE" /DietPi/config.txt framebuffer_x=720 framebuffer_y=576 @@ -961,7 +969,7 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the esac - # - Apply x/y + # Apply x/y G_CONFIG_INJECT 'framebuffer_width=' "framebuffer_width=$framebuffer_x" /DietPi/config.txt G_CONFIG_INJECT 'framebuffer_height=' "framebuffer_height=$framebuffer_y" /DietPi/config.txt G_CONFIG_INJECT 'SOFTWARE_CHROMIUM_RES_X=' "SOFTWARE_CHROMIUM_RES_X=$framebuffer_x" /DietPi/dietpi.txt From be075a3605969cdfecd02e183ae90353c71b575e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 16 Sep 2019 14:46:28 +0200 Subject: [PATCH 145/184] v6.26 + CHANGELOG | Resolved an issue on RPi4 where SDTV/composite video output did not happen when selecting the related resolution menu entries. --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index ffe24c6bdc..aa74638d88 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -34,6 +34,7 @@ Bug Fixes: - DietPi-Services | Resolved an issue where single service calls failed if their names contain certain special characters, like dots. Many thanks to @maartenlangeveld for reporting this issue: https://github.com/MichaIng/DietPi/issues/3059 - DietPi-Config | Resolved an issue on RPi where I2C baudrate was not applied correctly, thus selection was ineffective. Many thanks to @flashspys for reporting this issue: https://github.com/MichaIng/DietPi/issues/2966 - DietPi-Config | Resolved an issue on RPi where headless mode did not disable all video outputs and framebuffer as intended, since the used config.txt setting has been removed with recent firmware versions. +- DietPi-Config | Resolved an issue on RPi4 where SDTV/composite video output did not happen when selecting the related resolution menu entries. - DietPi-Software | Resolved an issue where the script tells you that SQLite will be installed as pre-req, while actually a desktop is required and LXDE will be installed. - DietPi-Software | X11/Kodi on Odroid C2: Resolved an issue on Odroid C2 where Kodi failed to start. GPU drivers and X11 config will be updated during DietPi-Update to cover this issue. Many thanks to @alexeylutskov for reporting this issue and testing the fix: https://github.com/MichaIng/DietPi/issues/3028 - DietPi-Software | Kodi: Resolved an issue where Kodi failed on RPi Buster and RPi4. Many thanks to @GulyFMG, @derdershat and @jonyskids for reporting this issue, searching and testing workarounds: https://github.com/MichaIng/DietPi/issues/3031 From 639ab50223f6c569ce159ee0ba5d8b81165af80f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 16 Sep 2019 15:00:03 +0200 Subject: [PATCH 146/184] v6.26 (#3087) + DietPi-PREP | Replace obsolete Rock64 GPU acceleration fix for Ayufan images with Ethernet fix for Rock64 and RockPro64: https://github.com/MichaIng/DietPi/issues/3066 + DietPi-PREP | Apply Meveric backports APT preference on Meveric images only. E.g. our official Odroid C1 image is not based on Meveric, thus APT preferences are obsolete. + DietPi-Patch | Rock(Pro)64: Apply workaround for kernel-related Ethernet issues: https://github.com/MichaIng/DietPi/issues/3066 --- CHANGELOG.txt | 1 + PREP_SYSTEM_FOR_DIETPI.sh | 25 ++++++++++++++++++------- dietpi/patch_file | 16 ++++++++++++++++ 3 files changed, 35 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index aa74638d88..e5356acbb5 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -28,6 +28,7 @@ Changes / Improvements / Optimisations: Bug Fixes: - General | Removed an obsolete OpenMediaVault cron job and binary that was leftover on at least one of our images (NanoPi NEO2) and is not part of the current OMV packages, thus save to remove in every case. Many thanks to @kt1024 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2994 - General | Resolved an issue where install of required APT packages for certain scripts could fail in the rare case that APT lists are outdated and old packages are not available in the repo anymore. Many thanks to @Paulisper for reporting this issue: https://github.com/MichaIng/DietPi/issues/2996 +- Rock64/RockPro64 | Resolved an issue where DietPi could not obtain the active network adapter and IP, if onboard Ethernet was used. This is because of a kernel-related bug, which seems to cause Ethernet connection instabilities as well in cases. A workaround is applied to all new Rock(Pro)64 images and via DietPi-Update. Many thanks to @svh1985 for reporting this issue, as well as searching and testing the workaround: https://github.com/MichaIng/DietPi/issues/3066 - DietPi-Login | Resolved an issue during first run setup, where DietPi-Software was called with mostly wrong whiptail menu dimensions. This lead to info prompts and menus being quite small, in particular the "Install" menu entry, that one needs to select, being only visible when navigating to the bottom. Many thanks to @pbecks1963 for reporting this issue: https://github.com/MichaIng/DietPi/issues/3053 - DietPi-NordVPN | Resolved an issue where the server menu could have wrong entries or even fail, if foreign files were placed inside the config directory. Many thanks to @svh1985 for reporting this issue and implementing a fix: https://github.com/MichaIng/DietPi/pull/3047 - DietPi-Run_NTPD | Resolved an issue where changing time sync mode or mirror, from within time sync error prompt, led to a concurrent script execution. Many thanks to @Sopor for reporting this issue: https://github.com/MichaIng/DietPi/issues/3010 diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index 8daff4ab43..1be0f2ee4e 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -1458,7 +1458,7 @@ _EOF_ echo 'blacklist bmp085' > /etc/modprobe.d/bmp085.conf - # - Sparky SBC ONLY: + # - Sparky SBC: elif (( $G_HW_MODEL == 70 )); then # Install latest kernel @@ -1518,7 +1518,7 @@ _EOF_ # - Disable RPi camera to add modules blacklist /DietPi/dietpi/func/dietpi-set_hardware rpi-camera disable - # - PINE64 (and possibily others): Cursor fix for FB + # - Pine A64 (and possibily others): Cursor fix for FB elif (( $G_HW_MODEL == 40 )); then mkdir -p /etc/bashrc.d @@ -1535,13 +1535,24 @@ _EOF_ # - Ensure WiFi module pre-exists G_CONFIG_INJECT '8723bs' '8723bs' /etc/modules - # - Rock64, remove HW accell config, as it's not currently functional: https://github.com/MichaIng/DietPi/issues/2086 - elif (( $G_HW_MODEL == 43 )); then + # - Rock(Pro)64: Apply workaround for kernel-related Ethernet issues: https://github.com/MichaIng/DietPi/issues/3066 + elif [[ $G_HW_MODEL == 4[23] ]]; then - [[ -f '/etc/X11/xorg.conf.d/20-armsoc.conf' ]] && rm /etc/X11/xorg.conf.d/20-armsoc.conf + local identifier='ff540000' + (( $G_HW_MODEL == 43 )) && identifier='fe300000' - # - Odroids FFMPEG fix. Prefer debian.org over Meveric for backports: https://github.com/MichaIng/DietPi/issues/1273 + https://github.com/MichaIng/DietPi/issues/1556#issuecomment-369463910 - elif (( $G_HW_MODEL > 9 && $G_HW_MODEL < 15 )); then + if [[ -f '/boot/boot.cmd' ]] && ! grep -q "$identifier" /boot/boot.cmd; then + + sed -i "/^fdt resize/{s/$/\ +fdt rm /ethernet@$identifier rockchip,bugged_tx_coe\ +fdt rm /ethernet@$identifier snps,force_thresh_dma_mode\ +fdt set /ethernet@$identifier snps,txpbl <0x21>/;q}" /boot/boot.cmd + mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr + + fi + + # - Odroids FFmpeg fix for Meveric images. Prefer debian.org over Meveric for backports: https://github.com/MichaIng/DietPi/issues/1273 + https://github.com/MichaIng/DietPi/issues/1556#issuecomment-369463910 + elif [[ $G_HW_MODEL == 1[0-5] ]] && ls /etc/apt/sources.list.d/meveric*.list &> /dev/null; then rm -f /etc/apt/preferences.d/meveric* cat << _EOF_ > /etc/apt/preferences.d/dietpi-meveric-backports diff --git a/dietpi/patch_file b/dietpi/patch_file index b4b78185e7..a4c8e1c8a1 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2160,6 +2160,22 @@ A backup will be created to "/etc/mympd/mympd.conf.bak_DDMMYYY_N" from where you fi sed -i '/hdmi_ignore_composite/d' /DietPi/config.txt + # Rock(Pro)64: Apply workaround for kernel-related Ethernet issues: https://github.com/MichaIng/DietPi/issues/3066 + elif [[ $G_HW_MODEL == 4[23] ]]; then + + local identifier='ff540000' + (( $G_HW_MODEL == 43 )) && identifier='fe300000' + + if [[ -f '/boot/boot.cmd' ]] && ! grep -q "$identifier" /boot/boot.cmd; then + + sed -i "/^fdt resize/{s/$/\ +fdt rm /ethernet@$identifier rockchip,bugged_tx_coe\ +fdt rm /ethernet@$identifier snps,force_thresh_dma_mode\ +fdt set /ethernet@$identifier snps,txpbl <0x21>/;q}" /boot/boot.cmd + mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr + + fi + fi #------------------------------------------------------------------------------- # Reinstalls and software install changes From e8ca4adaabf67b91aee09e2e751732d64b356e8e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 16 Sep 2019 16:09:38 +0200 Subject: [PATCH 147/184] v6.26 + DietPi-CloudShell | Coding: Update to our current coding standards --- dietpi/dietpi-cloudshell | 297 ++++++++++++++------------------------- 1 file changed, 109 insertions(+), 188 deletions(-) diff --git a/dietpi/dietpi-cloudshell b/dietpi/dietpi-cloudshell index 5ee8e8e1c4..f9e38a61d7 100644 --- a/dietpi/dietpi-cloudshell +++ b/dietpi/dietpi-cloudshell @@ -133,7 +133,7 @@ # Converts a byte int to string, in human readable bit format. # - for network data transmission rate (LAN, WLAN, ...) # - 1MB = 8Mbit | 1Mbit = 0.125MB - BIT_PRINT_CONVERSION(){ + BIT_PRINT_CONVERSION(){ local return_value=0 local decimal_count=1 @@ -148,7 +148,7 @@ # - MBit elif (( $1 < 1000000000 )); then - return_value="$(bc -l <<< "scale=$decimal_count; $1 * 8 / 1000 / 1000") Mbit" + return_value="$(bc -l <<< "scale=$decimal_count; $1 * 8 / 1000 / 1000") Mbit" # - GBit else @@ -861,7 +861,7 @@ Run_Intro(){ - #'--------------------------' + #'--------------------------' clear local aAnimation=( @@ -915,20 +915,19 @@ done - #delete[] array - unset aAnimation - unset aBar + # delete[] array + unset aAnimation aBar sleep 0.1 } - #Top banner + # Top banner BANNER_PRINT=0 BANNER_MODE=0 Update_Banner(){ - #Banner Modes + # Banner Modes if (( $BANNER_MODE == 0 )); then BANNER_PRINT="DietPi - Cloudshell v$DIETPI_CLOUDSHELL_VERSION" @@ -991,21 +990,21 @@ } - #$1 $2 = Storage index's to update and display (must be a range of 1 , eg: 0-1 1-2 3-4) + # $1 $2 = Storage index's to update and display (must be a range of 1 , eg: 0-1 1-2 3-4) Update_Scene_1(){ local index_1=$1 local index_2=$2 - #Update data + # Update data Obtain_STORAGE $index_1 $index_2 - #Clear screen + # Clear screen clear - #Banner + # Banner echo -e "$C_RESET $BANNER_PRINT" - # + echo -e "$C_RESET${aCOLOUR[$USER_COLOUR_INDEX]}$C_REVERSE ${STORAGE_NAME[$index_1]}" echo -e "$C_RESET${STORAGE_PERCENT[$index_1]}" echo -e "$C_RESET${aCOLOUR[$USER_COLOUR_INDEX]} Used: $C_RESET${STORAGE_USED[$index_1]} / ${STORAGE_TOTAL[$index_1]}" @@ -1017,18 +1016,18 @@ } - #DietPi + # DietPi Update_Scene_4(){ - #Update data + # Update data Obtain_DIETPIINFO - #Clear screen + # Clear screen clear - #Banner + # Banner echo -e "$C_RESET $BANNER_PRINT" - # + echo -e "$C_RESET${aCOLOUR[$USER_COLOUR_INDEX]}$C_REVERSE DietPi: " echo -e "$C_RESET${aCOLOUR[$USER_COLOUR_INDEX]} Version ${aCOLOUR[$USER_COLOUR_INDEX]}:$C_RESET $DIETPI_VERSION_CURRENT" echo -e "$C_RESET${aCOLOUR[$USER_COLOUR_INDEX]} Updates ${aCOLOUR[$USER_COLOUR_INDEX]}:$C_RESET $DIETPI_UPDATE_AVAILABLE" @@ -1039,18 +1038,18 @@ } - #NETWORK DETAILS + # NETWORK DETAILS Update_Scene_5(){ - #Update data + # Update data Obtain_NETWORK_DETAILS - #Clear screen + # Clear screen clear - #Banner + # Banner echo -e "$C_RESET $BANNER_PRINT" - # + echo -e "$C_RESET${aCOLOUR[$USER_COLOUR_INDEX]}$C_REVERSE Network Details: " echo -e "$C_RESET${aCOLOUR[$USER_COLOUR_INDEX]} IP : $C_RESET$NETWORK_DETAILS_IP_INT" echo -e "$C_RESET${aCOLOUR[$USER_COLOUR_INDEX]} Mode : $C_RESET$NETWORK_DETAILS_MODE" @@ -1062,10 +1061,10 @@ } - #NETWORK USAGE + # NETWORK USAGE Update_Scene_6(){ - #Update data + # Update data Obtain_NETWORK_USAGE # - Convert usage values into human readable format. Run before clearing screen due to additional processing (delay) @@ -1089,14 +1088,13 @@ fi - #Clear screen + # Clear screen clear - #Banner + # Banner # - Banner does not fit this scene (>= 9 lines) #echo -e "$C_RESET $BANNER_PRINT" - # echo -e "$C_RESET${aCOLOUR[$USER_COLOUR_INDEX]}$C_REVERSE Network Usage (TOTAL): " echo -e "$C_RESET${aCOLOUR[$USER_COLOUR_INDEX]} Sent : $C_RESET$total_sent_output" echo -e "$C_RESET${aCOLOUR[$USER_COLOUR_INDEX]} Recieved : $C_RESET$total_recieved_output" @@ -1111,18 +1109,18 @@ } - #Memory + # Memory Update_Scene_7(){ - #Update data + # Update data Obtain_MEMORY - #Clear screen + # Clear screen clear - #Banner + # Banner echo -e "$C_RESET $BANNER_PRINT" - # + echo -e "$C_RESET${aCOLOUR[$USER_COLOUR_INDEX]}$C_REVERSE Memory Usage (RAM): " echo -e "$C_RESET$MEMORY_PERCENT" echo -e "$C_RESET${aCOLOUR[$USER_COLOUR_INDEX]} Used: $C_RESET$MEMORY_USED MB / $MEMORY_TOTAL MB" @@ -1134,18 +1132,18 @@ } - #Pi-hole + # Pi-hole Update_Scene_8(){ - #Update data + # Update data Obtain_PIHOLE - #Clear screen + # Clear screen clear - #Banner + # Banner echo -e "$C_RESET $BANNER_PRINT" - # + echo -e "$C_RESET${aCOLOUR[$USER_COLOUR_INDEX]}$C_REVERSE Pi-hole stats (TODAY): " echo -e "$C_RESET${aCOLOUR[$USER_COLOUR_INDEX]} Ads Blocked: $C_RESET$PIHOLE_TOTAL_ADS" echo -e "$C_RESET${aCOLOUR[$USER_COLOUR_INDEX]} DNS Queries: $C_RESET$PIHOLE_QUERY_COUNT" @@ -1160,18 +1158,10 @@ #///////////////////////////////////////////////////////////////////////////////////// # Settings File #///////////////////////////////////////////////////////////////////////////////////// - #Define Location + # Define Location FILEPATH_SETTINGS='/DietPi/dietpi/.dietpi-cloudshell' - Read_Settings_File(){ - - if [[ -f $FILEPATH_SETTINGS ]]; then - - . $FILEPATH_SETTINGS - - fi - - } + Read_Settings_File(){ [[ -f $FILEPATH_SETTINGS ]] && . $FILEPATH_SETTINGS; } Write_Settings_File(){ @@ -1189,20 +1179,20 @@ BLANK_SCREEN_TIME_HOUR_END=$BLANK_SCREEN_TIME_HOUR_END _EOF_ - #Add enabled scenes + # Add enabled scenes for ((i=0; i<$MAX_SCENES; i++)) do - echo -e "aEnabledScenes[$i]=${aEnabledScenes[$i]}" >> $FILEPATH_SETTINGS + echo "aEnabledScenes[$i]=${aEnabledScenes[$i]}" >> $FILEPATH_SETTINGS done - #Add Drive Paths and Names + # Add Drive Paths and Names for ((i=0; i<$MAX_STORAGE; i++)) do - echo -e "STORAGE_PATH[$i]='${STORAGE_PATH[$i]}'" >> $FILEPATH_SETTINGS - echo -e "STORAGE_NAME[$i]='${STORAGE_NAME[$i]}'" >> $FILEPATH_SETTINGS + echo "STORAGE_PATH[$i]='${STORAGE_PATH[$i]}'" >> $FILEPATH_SETTINGS + echo "STORAGE_NAME[$i]='${STORAGE_NAME[$i]}'" >> $FILEPATH_SETTINGS done @@ -1214,32 +1204,24 @@ _EOF_ Init(){ #-------------------------------------------------------------------------------- - #Storage array + # Storage array Init_STORAGE #-------------------------------------------------------------------------------- - #Load Settings file. + # Load Settings file. Read_Settings_File #-------------------------------------------------------------------------------- - #VM disable CPU scene - if (( $G_HW_MODEL == 20 )); then - - aEnabledScenes[0]=0 - - fi + # VM disable CPU scene + (( $G_HW_MODEL == 20 )) && aEnabledScenes[0]=0 #-------------------------------------------------------------------------------- - #Check and disable scenes if software is not installed: - # 6 Pi-hole - if [[ ! -f /etc/pihole/gravity.list ]]; then - - aEnabledScenes[8]=0 - - fi + # Check and disable scenes if software is not installed: + # - 6 Pi-hole + [[ -f '/etc/pihole/gravity.list' ]] || aEnabledScenes[8]=0 #-------------------------------------------------------------------------------- - #Ensure we have at least 1 Scene enabled in the settings file. + # Ensure we have at least 1 Scene enabled in the settings file. local enabled_scene=0 for ((i=0; i<$MAX_SCENES; i++)) do @@ -1253,7 +1235,7 @@ _EOF_ done - #No Scenes selected! Override user setting and enable at least 1 scene (dietpi) + # No Scenes selected! Override user setting and enable at least 1 scene (dietpi) if (( $enabled_scene == 0 )); then aEnabledScenes[4]=1 @@ -1261,7 +1243,7 @@ _EOF_ fi #-------------------------------------------------------------------------------- - #Update DietPi network shared data: https://github.com/MichaIng/DietPi/issues/359 + # Update DietPi network shared data: https://github.com/MichaIng/DietPi/issues/359 /DietPi/dietpi/func/obtain_network_details } @@ -1269,15 +1251,15 @@ _EOF_ #///////////////////////////////////////////////////////////////////////////////////// # Start/Stop Control for Menu #///////////////////////////////////////////////////////////////////////////////////// - #0=tty1 1=current + # 0=tty1 1=current OUTPUT_DISPLAY_INDEX=0 Menu_Stop(){ - #Service if started. + # Service if started. systemctl stop dietpi-cloudshell - #Kill all , excluding Menu. + # Kill all , excluding Menu. ps ax | grep '[d]ietpi-cloudshell [1-9]' | mawk '{print $1}' > $FP_TEMP while read -r line do @@ -1290,7 +1272,7 @@ _EOF_ Menu_Start(){ - #Are we starting on the current screen? (eg: from tty1) + # Are we starting on the current screen? (eg: from tty1) local output_current_screen=0 if [[ $(tty) == '/dev/tty1' ]]; then @@ -1326,32 +1308,24 @@ _EOF_ Init_Term_Options - #Start Intro - if (( $RUN_INTRO )); then - - Run_Intro + # Start Intro + (( $RUN_INTRO )) && Run_Intro - fi - - #Set Nice to +10 (not critical) + # Set Nice to +10 (not critical) renice -n 10 $$ &> /dev/null - #Start display updates - while true + # Start display updates + while : do - if (( $BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED )); then - - RUN_BLANK_SCREEN_AT_SPECIFIC_TIME + (( $BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED )) && RUN_BLANK_SCREEN_AT_SPECIFIC_TIME - fi - - #Disable updates when screen is blanked + # Disable updates when screen is blanked if (( $BLANK_SCREEN_ACTIVE )); then sleep 60 - #Update enabled scenes + # Update enabled scenes else if (( ${aEnabledScenes[$SCENE_CURRENT]} )); then @@ -1380,20 +1354,16 @@ _EOF_ fi - #Apply refresh rate delay + # Apply refresh rate delay sleep $REFRESH_RATE fi - #Scene Switcher + # Scene Switcher ((SCENE_CURRENT++)) - #Cap - if (( $SCENE_CURRENT >= $MAX_SCENES )); then - - SCENE_CURRENT=0 - - fi + # Cap + (( $SCENE_CURRENT >= $MAX_SCENES )) && SCENE_CURRENT=0 fi @@ -1410,56 +1380,39 @@ _EOF_ Menu_Exit(){ G_WHIP_SIZE_X_MAX=50 - G_WHIP_YESNO "Exit $G_PROGRAM_NAME?" - if (( $? == 0 )); then + if G_WHIP_YESNO "Exit $G_PROGRAM_NAME?"; then - #Save changes + # Save changes Write_Settings_File - #exit + # exit TARGETMENUID=-1 else - #Return to Main Menu + # Return to Main Menu TARGETMENUID=0 fi } - #TARGETMENUID=0 + # TARGETMENUID=0 Menu_Main(){ TARGETMENUID=0 local temp_output_text='Fahrenheit' - if (( $TEMPERATURE_OUTPUT_TYPE == 1 )); then - - temp_output_text='Celsius' - - fi + (( $TEMPERATURE_OUTPUT_TYPE == 1 )) && temp_output_text='Celsius' local target_output_text='Main Screen (tty1)' - if (( $OUTPUT_DISPLAY_INDEX == 1 )); then - - target_output_text='Current screen or terminal' - - fi + (( $OUTPUT_DISPLAY_INDEX == 1 )) && target_output_text='Current screen or terminal' local bitbyte_output_text='Bit (Kbit, Mbit, Gbit)' - if (( $NETWORK_USAGE_CURRENT_OUTPUT_TYPE == 1 )); then - - bitbyte_output_text='Byte (KB, MB, GB)' - - fi + (( $NETWORK_USAGE_CURRENT_OUTPUT_TYPE == 1 )) && bitbyte_output_text='Byte (KB, MB, GB)' local autoscreenoff='Disabled' - if (( $BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED )); then - - autoscreenoff='Enabled' - - fi + (( $BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED )) && autoscreenoff='Enabled' G_WHIP_MENU_ARRAY=( @@ -1556,7 +1509,7 @@ _EOF_ } - #TARGETMENUID=1 + # TARGETMENUID=1 Menu_Colour(){ #Return to main menu @@ -1579,7 +1532,7 @@ _EOF_ } - #TARGETMENUID=2 + # TARGETMENUID=2 Menu_UpdateRate(){ #Return to main menu @@ -1600,36 +1553,26 @@ _EOF_ ) G_WHIP_DEFAULT_ITEM=$REFRESH_RATE - G_WHIP_MENU 'Please select the desired delay, between scene changes and updates.' - if (( $? == 0 )); then - - REFRESH_RATE=$G_WHIP_RETURNED_VALUE - - fi + G_WHIP_MENU 'Please select the desired delay, between scene changes and updates.' && REFRESH_RATE=$G_WHIP_RETURNED_VALUE } - #TARGETMENUID=3 + # TARGETMENUID=3 Menu_SceneSelection(){ - #Return to main menu - TARGETMENUID=0 + TARGETMENUID=0 # Return to main menu - #Get on/off whilptail status + # Get on/off whilptail status local aWhip_OnOff_Status=() for ((i=0; i<$MAX_SCENES; i++)) do - #On/Off status + # On/Off status aWhip_OnOff_Status[$i]='on' - if (( ! ${aEnabledScenes[$i]} )); then - - aWhip_OnOff_Status[$i]='off' - - fi + (( ${aEnabledScenes[$i]} )) || aWhip_OnOff_Status[$i]='off' done - #Define options + # Define options local index=0 G_WHIP_CHECKLIST_ARRAY=() index=0;G_WHIP_CHECKLIST_ARRAY+=($index 'CPU: Temperatures, Usage, frequency and more.' "${aWhip_OnOff_Status[$index]}") @@ -1642,8 +1585,7 @@ _EOF_ index=7;G_WHIP_CHECKLIST_ARRAY+=($index 'Memory: Stats for RAM and Swapfile usage.' "${aWhip_OnOff_Status[$index]}") index=8;G_WHIP_CHECKLIST_ARRAY+=($index 'Pi-hole: Stats for Pi-hole. Total Ads blocked etc.' "${aWhip_OnOff_Status[$index]}") - G_WHIP_CHECKLIST 'Please use the spacebar to toggle which scenes are active.' - if (( $? == 0 )); then + if G_WHIP_CHECKLIST 'Please use the spacebar to toggle which scenes are active.'; then # - Reset all scenes to 0 for ((i=0; i<$MAX_SCENES; i++)) @@ -1654,7 +1596,7 @@ _EOF_ fi - #Delete[] array + # Delete[] array unset aWhip_OnOff_Status # - Enable required scenes @@ -1667,18 +1609,13 @@ _EOF_ } - #TARGETMENUID=4 + # TARGETMENUID=4 Menu_BlankScreenAtTime(){ - #Return to main menu - TARGETMENUID=0 + TARGETMENUID=0 # Return to main menu local blank_screen_at_specific_time_enabled_text='Disabled' - if (( $BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED )); then - - blank_screen_at_specific_time_enabled_text='Enabled' - - fi + (( $BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED )) && blank_screen_at_specific_time_enabled_text='Enabled' G_WHIP_MENU_ARRAY=( @@ -1695,11 +1632,7 @@ _EOF_ if [[ $G_WHIP_RETURNED_VALUE == 'Toggle' ]];then ((BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED++)) - if (( $BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED > 1 )); then - - BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED=0 - - fi + (( $BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED > 1 )) && BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED=0 elif [[ $G_WHIP_RETURNED_VALUE == 'Start time' ]];then @@ -1712,12 +1645,7 @@ _EOF_ done G_WHIP_DEFAULT_ITEM=$BLANK_SCREEN_TIME_HOUR_START - G_WHIP_MENU 'Please select which hour (24h) you would like the screen to power off.' - if (( $? == 0 )); then - - BLANK_SCREEN_TIME_HOUR_START=$G_WHIP_RETURNED_VALUE - - fi + G_WHIP_MENU 'Please select which hour (24h) you would like the screen to power off.' && BLANK_SCREEN_TIME_HOUR_START=$G_WHIP_RETURNED_VALUE elif [[ $G_WHIP_RETURNED_VALUE == 'End time' ]];then @@ -1730,12 +1658,7 @@ _EOF_ done G_WHIP_DEFAULT_ITEM=$BLANK_SCREEN_TIME_HOUR_END - G_WHIP_MENU 'Please select which hour (24h) you would like the screen to power on.' - if (( $? == 0 )); then - - BLANK_SCREEN_TIME_HOUR_END=$G_WHIP_RETURNED_VALUE - - fi + G_WHIP_MENU 'Please select which hour (24h) you would like the screen to power on.' && BLANK_SCREEN_TIME_HOUR_END=$G_WHIP_RETURNED_VALUE fi @@ -1745,11 +1668,10 @@ _EOF_ } - #TARGETMENUID=5 + # TARGETMENUID=5 Menu_Storage(){ - #Return to main menu - TARGETMENUID=0 + TARGETMENUID=0 # Return to main menu G_WHIP_MENU_ARRAY=() @@ -1780,22 +1702,18 @@ _EOF_ # MAIN #///////////////////////////////////////////////////////////////////////////////////// #----------------------------------------------------------------------------------- - #Init + # Init Init #----------------------------------------------------------------------------------- - #Run menu + # Run menu if (( $INPUT == 0 )); then - #Start Menu + # Start Menu while (( $TARGETMENUID >= 0 )); do clear - if (( $TARGETMENUID == 0 )); then - - Menu_Main - - elif (( $TARGETMENUID == 1 )); then + if (( $TARGETMENUID == 1 )); then Menu_Colour @@ -1815,12 +1733,16 @@ _EOF_ Menu_Storage + else + + Menu_Main + fi done #----------------------------------------------------------------------------------- - #Run DietPi-Cloudshell + # Run DietPi-Cloudshell elif (( $INPUT > 0 )); then Run_Cloudshell @@ -1828,12 +1750,11 @@ _EOF_ fi #----------------------------------------------------------------------------------- - #Clean up temp files + # Clean up temp files [[ -f $FP_TEMP ]] && rm $FP_TEMP #----------------------------------------------------------------------------------- - #Delete[] Global arrays - unset aCOLOUR - unset aEnabledScenes + # Delete[] Global arrays + unset aCOLOUR aEnabledScenes Destroy_STORAGE #----------------------------------------------------------------------------------- exit From 253e0249a2b54b6873138c382ab63accfd091a22 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 17 Sep 2019 07:24:31 +0200 Subject: [PATCH 148/184] META | DietPi-Survey_report: Check if $BENCH_VERSION is integer before value --- .meta/dietpi-survey_report | 60 +++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index e0b5d65d88..766fa21846 100644 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -6,8 +6,8 @@ #----------------------------------------------------------- # Globals - benchmarks #----------------------------------------------------------- - # NB: PLEASE ENSURE HW_MODEL INDEX ENTRIES MATCH : PREP, dietpi-obtain_hw_model, dietpi-survey_results, - # NBB: DO NOT REORDER INDEX's. These are now fixed and will never change (due to survey results etc) + # NB: PLEASE ENSURE HW_MODEL INDEX ENTRIES MATCH : PREP, dietpi-obtain_hw_model, dietpi-survey_results, + # NBB: DO NOT REORDER INDEX's. These are now fixed and will never change (due to survey results etc) aHW_NAME=() aHW_NAME[0]='Raspberry Pi 1 256M' aHW_NAME[1]='Raspberry Pi 1/Zero 512M' @@ -56,11 +56,11 @@ aHW_NAME[71]='Beagle Bone Black' aHW_NAME[72]='ROCK Pi 4' - # - Core Benchmarks + # Core Benchmarks aBENCH_CPU_INDEX=() aBENCH_RAM_INDEX=() aBENCH_ROOTFS_INDEX=() - # - Optional benchmarks + # Optional benchmarks aBENCH_LAN_INDEX=() aBENCH_CUSTOMFS_INDEX=() @@ -73,7 +73,7 @@ declare -A aBENCH_CPU_TEMP_START declare -A aBENCH_CPU_TEMP_END - # - Optional benchmarks + # Optional benchmarks declare -A aBENCH_CUSTOMFS_WRITE declare -A aBENCH_CUSTOMFS_READ declare -A aBENCH_NET_LAN_SPEED @@ -332,9 +332,9 @@ aSOFTWARE_NAME[168]=168 aSOFTWARE_NAME[169]='Google AIY' - # - v6.14 (earliest version that uploads to ssh.dietpi.com) + # v6.14 (earliest version that uploads to ssh.dietpi.com) aSOFTWARE_NAME6_14=() - # - v6.15 + # v6.15 aSOFTWARE_NAME6_15=() for i in ${!aSOFTWARE_NAME[@]} do @@ -345,7 +345,7 @@ done aSOFTWARE_NAME6_15[148]='myMPD' - # - v6.16 + v6.17 + v6.18 + # v6.16 + v6.17 + v6.18 aSOFTWARE_NAME6_16=() aSOFTWARE_NAME6_17=() aSOFTWARE_NAME6_18=() @@ -359,7 +359,7 @@ done aSOFTWARE_NAME6_18[168]='Nextcloud Talk' - # - v6.19 + v6.20 + # v6.19 + v6.20 aSOFTWARE_NAME6_19=() aSOFTWARE_NAME6_20=() for i in ${!aSOFTWARE_NAME6_18[@]} @@ -374,7 +374,7 @@ aSOFTWARE_NAME6_20[171]='DietPi-NordVPN' aSOFTWARE_NAME6_20[172]='WireGuard' - # - v6.21 + v6.22 + v6.23 + # v6.21 + v6.22 + v6.23 aSOFTWARE_NAME6_21=() aSOFTWARE_NAME6_22=() aSOFTWARE_NAME6_23=() @@ -390,7 +390,7 @@ aSOFTWARE_NAME6_23[174]='GIMP' aSOFTWARE_NAME6_23[175]='XFCE Power Manager' - # - v6.24 + v6.25 + # v6.24 + v6.25 aSOFTWARE_NAME6_24=() aSOFTWARE_NAME6_25=() for i in ${!aSOFTWARE_NAME6_23[@]} @@ -402,7 +402,7 @@ done aSOFTWARE_NAME6_25[176]='Mycroft AI' - # - v6.26 + # v6.26 aSOFTWARE_NAME6_26=() for i in ${!aSOFTWARE_NAME6_25[@]} do @@ -438,11 +438,11 @@ . $file - # - Add bench to array + # Add bench to array if [[ $BENCH_HW_MODEL =~ ^[0-9]+$ ]]; then - # - CPU - # Remove decimal places + # CPU + # - Remove decimal places BENCH_CPU_TEMP_START=${BENCH_CPU_TEMP_START%%.*} BENCH_CPU_TEMP_END=${BENCH_CPU_TEMP_END%%.*} if [[ ${BENCH_CPU%%.*} =~ ^[0-9]+$ && $BENCH_CPU_TEMP_START =~ ^-?[0-9]+$ && $BENCH_CPU_TEMP_END =~ ^-?[0-9]+$ ]]; then @@ -459,8 +459,8 @@ fi - # - RootFS - # Remove decimal places + # RootFS + # - Remove decimal places BENCH_ROOTFS_WRITE=${BENCH_ROOTFS_WRITE%%.*} BENCH_ROOTFS_READ=${BENCH_ROOTFS_READ%%.*} if [[ $BENCH_ROOTFS_WRITE =~ ^[0-9]+$ && $BENCH_ROOTFS_READ =~ ^[0-9]+$ ]]; then @@ -471,12 +471,12 @@ fi - # - RAM + # RAM # - https://github.com/MichaIng/DietPi/issues/2715 | nullify this score and ignore it in min/max/avg processing. - # Remove decimal places + # - Remove decimal places BENCH_RAM_WRITE=${BENCH_RAM_WRITE%%.*} BENCH_RAM_READ=${BENCH_RAM_READ%%.*} - if (( $BENCH_VERSION > 1 )) && [[ $BENCH_RAM_WRITE =~ ^[0-9]+$ && $BENCH_RAM_READ =~ ^[0-9]+$ ]]; then + if [[ $BENCH_VERSION =~ ^[0-9]+$ && $BENCH_RAM_WRITE =~ ^[0-9]+$ && $BENCH_RAM_READ =~ ^[0-9]+$ ]] && (( $BENCH_VERSION > 1 )); then aBENCH_RAM_WRITE[$BENCH_HW_MODEL,${aBENCH_RAM_INDEX[$BENCH_HW_MODEL]:=0}]=$BENCH_RAM_WRITE aBENCH_RAM_READ[$BENCH_HW_MODEL,${aBENCH_RAM_INDEX[$BENCH_HW_MODEL]}]=$BENCH_RAM_READ @@ -484,8 +484,8 @@ fi - # - Custom FS - # Remove decimal places + # Custom FS + # - Remove decimal places BENCH_CUSTOMFS_WRITE=${BENCH_CUSTOMFS_WRITE%%.*} BENCH_CUSTOMFS_READ=${BENCH_CUSTOMFS_READ%%.*} if [[ $BENCH_CUSTOMFS_WRITE =~ ^[0-9]+$ && $BENCH_CUSTOMFS_READ =~ ^[0-9]+$ ]]; then @@ -496,8 +496,8 @@ fi - # - LAN - # Remove decimal places + # LAN + # - Remove decimal places BENCH_NET_LAN_SPEED=${BENCH_NET_LAN_SPEED%%.*} if [[ $BENCH_NET_LAN_SPEED =~ ^[0-9]+$ ]]; then @@ -506,7 +506,7 @@ fi - # - Done, clear vars + # Done, clear vars unset BENCH_VERSION BENCH_HW_MODEL unset BENCH_CPU BENCH_CPU_TEMP_START BENCH_CPU_TEMP_END unset BENCH_ROOTFS_WRITE BENCH_ROOTFS_READ @@ -530,7 +530,7 @@ # - NB: HW_MODEL array based local default_min_value=100000 - # - CPU + # CPU for i in ${!aBENCH_CPU_INDEX[@]} do @@ -599,7 +599,7 @@ done - # - RootFS + # RootFS for i in ${!aBENCH_ROOTFS_INDEX[@]} do @@ -649,7 +649,7 @@ done - # - RAM + # RAM for i in ${!aBENCH_RAM_INDEX[@]} do @@ -699,7 +699,7 @@ done - # - LAN + # LAN for i in ${!aBENCH_LAN_INDEX[@]} do @@ -733,7 +733,7 @@ done - # - CustomFS + # CustomFS for i in ${!aBENCH_CUSTOMFS_INDEX[@]} do From 02a3e5b657c7f7efc3456a3a2bbab2f598d905eb Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 17 Sep 2019 07:33:04 +0200 Subject: [PATCH 149/184] v6.26 + DietPi-Software | Pi-hole: Replace spaces with tabs in Nginx config --- .conf/dps_93/nginx.pihole.conf | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.conf/dps_93/nginx.pihole.conf b/.conf/dps_93/nginx.pihole.conf index 501bec18e1..04b05b36bf 100644 --- a/.conf/dps_93/nginx.pihole.conf +++ b/.conf/dps_93/nginx.pihole.conf @@ -13,26 +13,26 @@ location ~ ^(?:/html|)/admin(?:$|/) { add_header X-Frame-Options "DENY"; # Standard PHP handler block try_files $uri $uri/ =404; - location ~ ^(?:/html|)/admin/.+\.php(?:$|/) { - fastcgi_pass php; - include snippets/fastcgi-php.conf; - } + location ~ ^(?:/html|)/admin/.+\.php(?:$|/) { + fastcgi_pass php; + include snippets/fastcgi-php.conf; + } } # Blocking page location ~ ^(?:/html|)/pihole(?:$|/) { # Block public access to blocking page by default - allow 127.0.0.0/8; - allow 192.168.0.0/16; - allow 10.0.0.0/8; - allow 172.16.0.0/12; - deny all; + allow 127.0.0.0/8; + allow 192.168.0.0/16; + allow 10.0.0.0/8; + allow 172.16.0.0/12; + deny all; # Standard PHP handler block - try_files $uri $uri/ =404; - location ~ ^(?:/html|)/pihole/.+\.php(?:$|/) { - fastcgi_pass php; - include snippets/fastcgi-php.conf; - } + try_files $uri $uri/ =404; + location ~ ^(?:/html|)/pihole/.+\.php(?:$|/) { + fastcgi_pass php; + include snippets/fastcgi-php.conf; + } } # Enable blocking page via 404 handler From 452254d84e91603b56643e47bc7ded6ae021b6a6 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 17 Sep 2019 08:45:23 +0200 Subject: [PATCH 150/184] v6.26 + DietPi-LetsEncrypt | Use any "certbot" binary found on the system $PATH. If not found, in menu mode offer to have it installed now. --- dietpi/dietpi-letsencrypt | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/dietpi/dietpi-letsencrypt b/dietpi/dietpi-letsencrypt index 2f2be25c6f..c7e17d3d51 100644 --- a/dietpi/dietpi-letsencrypt +++ b/dietpi/dietpi-letsencrypt @@ -32,9 +32,6 @@ # Globals #///////////////////////////////////////////////////////////////////////////////////// FP_LOGFILE='/var/log/dietpi-letsencrypt.log' - FP_BINARY='/usr/bin/certbot' - [[ -f $FP_BINARY ]] && LETSENCRYPT_INSTALLED=1 || LETSENCRYPT_INSTALLED=0 - # Add post-renewal tasks via systemd unit drop-in FP_RENEWAL='/etc/systemd/system/certbot.service.d' @@ -71,12 +68,12 @@ # If cert exists already, attempt renewal. This allows easy configuration update via "dietpi-letsencrypt 1" without using up limited certs per week. if [[ -f $fp_cert_dir'/cert.pem' ]]; then - $FP_BINARY renew + certbot renew local exit_code=$? else - $FP_BINARY $options --agree-tos --no-eff-email --rsa-key-size "$LETSENCRYPT_KEYSIZE" -m "$LETSENCRYPT_EMAIL" -d "$LETSENCRYPT_DOMAIN" + certbot $options --agree-tos --no-eff-email --rsa-key-size "$LETSENCRYPT_KEYSIZE" -m "$LETSENCRYPT_EMAIL" -d "$LETSENCRYPT_DOMAIN" local exit_code=$? fi @@ -97,12 +94,12 @@ # - Cert me up if [[ -f $fp_cert_dir'/cert.pem' ]]; then - $FP_BINARY renew + certbot renew local exit_code=$? else - $FP_BINARY certonly --webroot -w /var/www --agree-tos --no-eff-email --rsa-key-size "$LETSENCRYPT_KEYSIZE" -m "$LETSENCRYPT_EMAIL" -d "$LETSENCRYPT_DOMAIN" + certbot certonly --webroot -w /var/www --agree-tos --no-eff-email --rsa-key-size "$LETSENCRYPT_KEYSIZE" -m "$LETSENCRYPT_EMAIL" -d "$LETSENCRYPT_DOMAIN" local exit_code=$? fi @@ -219,12 +216,12 @@ _EOF_ # - Cert me up Nginx if [[ -f $fp_cert_dir'/cert.pem' ]]; then - $FP_BINARY renew + certbot renew local exit_code=$? else - $FP_BINARY $options --agree-tos --no-eff-email --rsa-key-size "$LETSENCRYPT_KEYSIZE" -m "$LETSENCRYPT_EMAIL" -d "$LETSENCRYPT_DOMAIN" + certbot $options --agree-tos --no-eff-email --rsa-key-size "$LETSENCRYPT_KEYSIZE" -m "$LETSENCRYPT_EMAIL" -d "$LETSENCRYPT_DOMAIN" local exit_code=$? fi @@ -254,12 +251,12 @@ _EOF_ /DietPi/dietpi/dietpi-services stop if [[ -f $fp_cert_dir'/cert.pem' ]]; then - $FP_BINARY renew + certbot renew local exit_code=$? else - $FP_BINARY certonly --standalone --staple-ocsp --agree-tos --no-eff-email --rsa-key-size "$LETSENCRYPT_KEYSIZE" -m "$LETSENCRYPT_EMAIL" -d "$LETSENCRYPT_DOMAIN" + certbot certonly --standalone --staple-ocsp --agree-tos --no-eff-email --rsa-key-size "$LETSENCRYPT_KEYSIZE" -m "$LETSENCRYPT_EMAIL" -d "$LETSENCRYPT_DOMAIN" local exit_code=$? fi @@ -545,24 +542,26 @@ Enabling HSTS will prevent access to applications which use a standalone webserv #----------------------------------------------------------------------------------- # Check installed - if (( ! $LETSENCRYPT_INSTALLED )); then + until command -v certbot &> /dev/null; then # Menu - if (( ! $INPUT )); then + if (( ! $INPUT )) && G_WHIP_YESNO '[WARNING] No CertBot binary found\n +Would you like to install CertBot now via "dietpi-software"?'; then - G_DIETPI-NOTIFY 1 "CertBot binary not found ( $FP_BINARY )" - G_DIETPI-NOTIFY 2 'Please install CertBot with DietPi-Software before running this program.' - read -p 'Press any key to continue...' + /DietPi/dietpi/dietpi-software install 92 else - echo "[FAILURE] CertBot binary not found ( $FP_BINARY ), please install it with DietPi-Software. Aborting..." | tee $FP_LOGFILE + echo '[FAILURE] No CertBot binary found, please install it with "dietpi-software". Aborting...' | tee $FP_LOGFILE + exit 1 fi + fi + #----------------------------------------------------------------------------------- # Menu - elif (( ! $INPUT )); then + if (( ! $INPUT )); then while (( $TARGETMENUID > -1 )); do From 9456c214a05931ce57d5d61b349814f61228dc0d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 17 Sep 2019 08:48:05 +0200 Subject: [PATCH 151/184] v6.26 + DietPi-LetsEncrypt | Syntax --- dietpi/dietpi-letsencrypt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-letsencrypt b/dietpi/dietpi-letsencrypt index c7e17d3d51..5734533472 100644 --- a/dietpi/dietpi-letsencrypt +++ b/dietpi/dietpi-letsencrypt @@ -542,7 +542,8 @@ Enabling HSTS will prevent access to applications which use a standalone webserv #----------------------------------------------------------------------------------- # Check installed - until command -v certbot &> /dev/null; then + until command -v certbot &> /dev/null + do # Menu if (( ! $INPUT )) && G_WHIP_YESNO '[WARNING] No CertBot binary found\n @@ -557,7 +558,7 @@ Would you like to install CertBot now via "dietpi-software"?'; then fi - fi + done #----------------------------------------------------------------------------------- # Menu From 07e1b8482a8529ea4e612d30724cf5e6777fbaf4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 17 Sep 2019 12:22:26 +0200 Subject: [PATCH 152/184] v6.26 (#3114) + DietPi-Config | Run "setupcon --save" after new keyboard layout has been chosen, to force font and cached script renewal. With this, no reboot is required and on Buster, the "console-setup" service fails do this on boot in cases: https://github.com/MichaIng/DietPi/issues/2912#issuecomment-532100542 + DietPi-Config | Setting the timezone does not require any reboot and in case of locale, only prompt for reboot when user actually chooses one, thus does not cancel. + DietPi-FirstBoot | Run "setupcon --save" after new keyboard layout has been applied, to force font and cached script renewal. This solves an issue on Buster, where the "console-setup" service fails to do this on boot in cases: https://github.com/MichaIng/DietPi/issues/2912#issuecomment-532100542 + DietPi-Patch | Run "setupcon --save" to force font and cached console+keyboard script renewal. This solves an issue on Buster, where the "console-setup" service fails to do this on boot in cases: https://github.com/MichaIng/DietPi/issues/2912#issuecomment-532100542 + CHANGELOG | Resolved an issue on some Buster systems where console-setup fails on boot to apply keyboard layout and console settings --- CHANGELOG.txt | 1 + dietpi/dietpi-config | 12 ++++-------- dietpi/patch_file | 3 +++ rootfs/var/lib/dietpi/services/dietpi-firstboot.bash | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e5356acbb5..b84d25dfdb 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -28,6 +28,7 @@ Changes / Improvements / Optimisations: Bug Fixes: - General | Removed an obsolete OpenMediaVault cron job and binary that was leftover on at least one of our images (NanoPi NEO2) and is not part of the current OMV packages, thus save to remove in every case. Many thanks to @kt1024 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2994 - General | Resolved an issue where install of required APT packages for certain scripts could fail in the rare case that APT lists are outdated and old packages are not available in the repo anymore. Many thanks to @Paulisper for reporting this issue: https://github.com/MichaIng/DietPi/issues/2996 +- General | Resolved an issue on some Buster systems where console-setup fails on boot to apply keyboard layout and console settings. Many thanks to @jaxjexjox for reporting this issue: https://github.com/MichaIng/DietPi/issues/2912#issuecomment-532100542 - Rock64/RockPro64 | Resolved an issue where DietPi could not obtain the active network adapter and IP, if onboard Ethernet was used. This is because of a kernel-related bug, which seems to cause Ethernet connection instabilities as well in cases. A workaround is applied to all new Rock(Pro)64 images and via DietPi-Update. Many thanks to @svh1985 for reporting this issue, as well as searching and testing the workaround: https://github.com/MichaIng/DietPi/issues/3066 - DietPi-Login | Resolved an issue during first run setup, where DietPi-Software was called with mostly wrong whiptail menu dimensions. This lead to info prompts and menus being quite small, in particular the "Install" menu entry, that one needs to select, being only visible when navigating to the bottom. Many thanks to @pbecks1963 for reporting this issue: https://github.com/MichaIng/DietPi/issues/3053 - DietPi-NordVPN | Resolved an issue where the server menu could have wrong entries or even fail, if foreign files were placed inside the config directory. Many thanks to @svh1985 for reporting this issue and implementing a fix: https://github.com/MichaIng/DietPi/pull/3047 diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 5be9676ef0..8854afab2f 100644 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -2056,7 +2056,7 @@ Current setting: $user_frequency_min_text" && G_CONFIG_INJECT 'CONFIG_CPU_MIN_FR 'Locale' ": [$locale_current]" 'Timezone' ": [$(/;q}" /boot/boot.cmd fi #------------------------------------------------------------------------------- + # Run "setupcon --save" to force font and cached console+keyboard script renewal. This solves an issue on Buster, where the "console-setup" service fails to do this on boot in cases: https://github.com/MichaIng/DietPi/issues/2912#issuecomment-532100542 + setupcon --save + #------------------------------------------------------------------------------- # Reinstalls and software install changes if (( $G_DIETPI_INSTALL_STAGE == 2 )); then diff --git a/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash b/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash index 63d1526d3f..23a4e310ff 100755 --- a/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash +++ b/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash @@ -153,7 +153,7 @@ G_DIETPI-NOTIFY 2 "Setting Keyboard $autoinstall_keyboard. Please wait..." G_CONFIG_INJECT 'XKBLAYOUT=' "XKBLAYOUT=\"$autoinstall_keyboard\"" /etc/default/keyboard - #systemctl restart keyboard-setup + setupcon --save fi From eafdd3b7671fff2b4cfdc48d0949ee2cd434fe97 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 18 Sep 2019 16:58:22 +0200 Subject: [PATCH 153/184] v6.26 + DietPi-Patch | Certbot: Offer users to migrate from webroot authentication back to Apache/Nginx plugin --- dietpi/patch_file | 74 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 23 deletions(-) diff --git a/dietpi/patch_file b/dietpi/patch_file index f41aaca2be..bcf15ae104 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -178,14 +178,14 @@ G_WHIP_MSG 'Notice (locale):\n\nTo resolve broken locales, they have been reset to "en_GB.UTF-8".\n\nIf you had a different locale configured on this system, please use "dietpi-config" at a later date to re-configure.\n\nIn relation to that, DietPi does not use "/etc/environment" anymore, thus it is cleaned. In case you manually edited it, a backup was created: /mnt/dietpi_userdata/environment.bak' #------------------------------------------------------------------------------ - #Removed control from DietPi-Services: https://github.com/MichaIng/DietPi/issues/1501 + # Removed control from DietPi-Services: https://github.com/MichaIng/DietPi/issues/1501 systemctl enable --now dnsmasq &> /dev/null systemctl enable --now openvpn &> /dev/null #------------------------------------------------------------------------------- - #https://dietpi.com/phpbb/viewtopic.php?f=11&t=2772&p=10646#p10646 + # https://dietpi.com/phpbb/viewtopic.php?f=11&t=2772&p=10646#p10646 [[ -f '/etc/apt/sources.list.d/openmediavault.list' ]] && rm /etc/apt/sources.list.d/openmediavault.list #------------------------------------------------------------------------------- - #DietPi-Software removals: https://github.com/MichaIng/DietPi/issues/1491 + # DietPi-Software removals: https://github.com/MichaIng/DietPi/issues/1491 if [[ -f /DietPi/dietpi/.installed ]]; then sed -i '/^aSOFTWARE_INSTALL_STATE\[100\]=/c\aSOFTWARE_INSTALL_STATE\[100\]=0' /DietPi/dietpi/.installed # Grashopper (now pijuice) @@ -199,7 +199,7 @@ fi #------------------------------------------------------------------------------- - #Nodered lacks homedir, create it: https://github.com/MichaIng/DietPi/issues/1446#issuecomment-366370800 + # Nodered lacks homedir, create it: https://github.com/MichaIng/DietPi/issues/1446#issuecomment-366370800 if getent passwd nodered &> /dev/null && [[ ! -d '/home/nodered' ]]; then mkdir -p /home/nodered @@ -207,17 +207,19 @@ fi #------------------------------------------------------------------------------- - #Reinstalls: + # Reinstalls: # v6.20 NetData 1.9 #------------------------------------------------------------------------------- elif (( $G_DIETPI_VERSION_SUB == 2 )); then #------------------------------------------------------------------------------- - #Switch from rc.local to own postboot script: https://github.com/MichaIng/DietPi/issues/1376 - G_WHIP_MSG 'DietPi will not use "/etc/rc.local" for its own scripts anymore.\n\nHowever, in case you manually added something, we safe a backup to "/mnt/dietpi_userdata/rc.local.bak", from where you can copy & paste back to the cleaned "/etc/rc.local".\n\nIt will work as before.' - [[ -f '/etc/rc.local' ]] && mv /etc/rc.local /mnt/dietpi_userdata/rc.local.bak - cat << _EOF_ > /etc/rc.local + # Switch from rc.local to own postboot script: https://github.com/MichaIng/DietPi/issues/1376 + if [[ -f '/etc/rc.local' ]]; then + + G_WHIP_MSG 'DietPi will not use "/etc/rc.local" for its own scripts anymore.\n\nHowever, in case you manually added something, we safe a backup to "/mnt/dietpi_userdata/rc.local.bak", from where you can copy & paste back to the cleaned "/etc/rc.local".\n\nIt will work as before.' + mv /etc/rc.local /mnt/dietpi_userdata/rc.local.bak + cat << _EOF_ > /etc/rc.local #!/bin/sh -e # # rc.local @@ -233,7 +235,9 @@ exit 0 _EOF_ - chmod +x /etc/rc.local + chmod +x /etc/rc.local + + fi systemctl enable dietpi-postboot @@ -242,7 +246,7 @@ _EOF_ [[ -d '/var/lib/dietpi/postboot.d' ]] || mkdir /var/lib/dietpi/postboot.d cat << _EOF_ > /var/lib/dietpi/postboot.d/moode #!/bin/bash -#moOde additions +# moOde additions SQLDB=/var/local/www/db/moode-sqlite3.db # set cpu govenor @@ -255,13 +259,13 @@ _EOF_ fi #------------------------------------------------------------------------------- - G_DIETPI-NOTIFY 2 'Reducing getty count and resource usage:' + G_DIETPI-NOTIFY 2 'Reducing getty count and resource usage' systemctl mask getty-static #------------------------------------------------------------------------------- - # - Meveric, update repo to use our EU mirror: https://github.com/MichaIng/DietPi/issues/1519#issuecomment-368234302 + # Meveric, update repo to use our EU mirror: https://github.com/MichaIng/DietPi/issues/1519#issuecomment-368234302 sed -i 's@https://oph.mdrjr.net/meveric@http://fuzon.co.uk/meveric@' /etc/apt/sources.list.d/meveric* &> /dev/null #------------------------------------------------------------------------------- - #Remove any existing apt recommends settings, before applying ours: https://github.com/MichaIng/DietPi/issues/1482#issuecomment-368031044 + # Remove any existing apt recommends settings, before applying ours: https://github.com/MichaIng/DietPi/issues/1482#issuecomment-368031044 rm -f /etc/apt/apt.conf.d/*recommends* G_ERROR_HANDLER_COMMAND='/etc/apt/apt.conf.d/99-dietpi-norecommends' @@ -274,7 +278,7 @@ _EOF_ G_ERROR_HANDLER_EXITCODE=$? G_ERROR_HANDLER #------------------------------------------------------------------------------- - #Reinstalls: + # Reinstalls: # v6.5 Shairport-sync 3.1.7 # RPi Cam # Aria2 for .conf addition: https://github.com/MichaIng/DietPi/issues/1575#issuecomment-370248708 @@ -290,23 +294,21 @@ _EOF_ fi #------------------------------------------------------------------------------- - #Add certificate combining for Lighttpd to CertBot auto renewal: https://github.com/MichaIng/DietPi/pull/1553 + # Add certificate combining for Lighttpd to Certbot auto renewal: https://github.com/MichaIng/DietPi/pull/1553 if [[ -f '/DietPi/dietpi/.dietpi-letsencrypt' ]]; then - # - Switch Minio to new certbot.service.d/ hook: + # Switch Minio to new certbot.service.d/ hook: if grep -q '^aSOFTWARE_INSTALL_STATE\[158\]=2' /DietPi/dietpi/.installed; then [[ -f '/etc/systemd/system/certbot.service' ]] && rm /etc/systemd/system/certbot.service fi - # - Overall settings and config renewal: - /DietPi/dietpi/dietpi-letsencrypt 1 - # - Stop services, started during dietpi-letsencrypt execution: - /DietPi/dietpi/dietpi-services stop + # Overall settings and config renewal, skip DietPi-Services: + G_DIETPI_SERVICES_DISABLE=1 /DietPi/dietpi/dietpi-letsencrypt 1 fi #------------------------------------------------------------------------------- - #Sparky SBC kernel patches: Pro-Ject-S2 dac DSD native support on sparky, also other few dac ids. + # Sparky SBC kernel patches: Pro-Ject-S2 dac DSD native support on sparky, also other few dac ids. if (( $G_HW_MODEL == 70 )); then G_RUN_CMD wget https://raw.githubusercontent.com/sparky-sbc/sparky-test/master/pro-ject-s2/snd-usb-audio.ko -O /lib/modules/$(uname -r)/kernel/sound/usb/snd-usb-audio.ko @@ -314,7 +316,7 @@ _EOF_ fi #------------------------------------------------------------------------------- - #GNU key management required for some APT installs via additional repos: https://github.com/MichaIng/DietPi/issues/1388 + # GNU key management required for some APT installs via additional repos: https://github.com/MichaIng/DietPi/issues/1388 G_AGI dirmngr #------------------------------------------------------------------------------- # Odroids FFmpeg decendency fix: https://github.com/MichaIng/DietPi/issues/1556#issuecomment-369463910 @@ -2271,6 +2273,32 @@ Do you want to keep PulseAudio installed?' || apt-mark auto pulseaudio fi # Fail2Ban: Enable service since it is not controlled by DietPi-Services anymore: https://github.com/MichaIng/DietPi/commit/4d6ccbeee47b54247613f880a03339ff8a72f24d grep -q '^aSOFTWARE_INSTALL_STATE\[73\]=2' /DietPi/dietpi/.installed && systemctl enable --now fail2ban + # Certbot: https://github.com/MichaIng/DietPi/issues/3111 + if grep -q '^aSOFTWARE_INSTALL_STATE\[92\]=2' /DietPi/dietpi/.installed; then + + # Apache + if grep -q '^aSOFTWARE_INSTALL_STATE\[83\]=2' /DietPi/dietpi/.installed; then + + G_AGI python3-certbot-apache + grep -q '^[[:blank:]]*authenticator[[:blank:]]*=[[:blank:]]*webroot' /etc/letsencrypt/renewal/*.conf 2> /dev/null && + G_WHIP_YESNO '[Certbot] Switch back to native Apache authentication method\n +Your Certbot authenticates with the "webroot" method, while you have an Apache webserver installed. This was required some time ago due to a sudden change by Let'\''s Encrypt, which made the Apache authentication method fail. +Meanwhile, with current Certbot version, this bug has been fixed and we got some reports where the webroot method does not work reliable instead, leaving you with an expired HTTPS certificate in cases.\n +Would you like to switch back to the Apache authentication method now?' && certbot renew --force-renewal -a apache + + # Nginx + elif grep -q '^aSOFTWARE_INSTALL_STATE\[85\]=2' /DietPi/dietpi/.installed; then + + G_AGI python3-certbot-nginx + grep -q '^[[:blank:]]*authenticator[[:blank:]]*=[[:blank:]]*webroot' /etc/letsencrypt/renewal/*.conf 2> /dev/null && + G_WHIP_YESNO '[Certbot] Switch back to native Nginx authentication method\n +Your Certbot authenticates with the "webroot" method, while you have an Nginx webserver installed. This was required some time ago due to a sudden change by Let'\''s Encrypt, which made the Nginx authentication method fail. +Meanwhile, with current Certbot version, this bug has been fixed and we got some reports where the webroot method does not work reliable instead, leaving you with an expired HTTPS certificate in cases.\n +Would you like to switch back to the Nginx authentication method now?' && certbot renew --force-renewal -a nginx + + fi + + fi # Webmin: https://github.com/MichaIng/DietPi/commit/ec55d49a488fd9cb1dbb18cbfa067b5d1d1a974e /DietPi/dietpi/dietpi-software reinstall 115 From e62ba9f6399b151b6dbeeba786d042d3e13a73db Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 21 Sep 2019 18:30:31 +0200 Subject: [PATCH 154/184] v6.26 + DietPi-Software | WireGuard: Enable support for RPi 1/Zero (ARMv6) via Raspbian Bullseye repo. Install from Bullseye on all devices since this repo can be considered more stable than "Sid". + DietPi-Software | WireGuard: On RPi, add an /etc/kernel/postinst.d script to rebuild the WireGuard kernel module automatically on kernel upgrades. This is otherwise not done on RPi. --- dietpi/dietpi-software | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 2c021e39ab..48d45b1425 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -1781,8 +1781,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_NAME[$software_id]='WireGuard' aSOFTWARE_DESC[$software_id]='an extremely simple yet fast and modern VPN' - aSOFTWARE_CATEGORY_INDEX[$software_id]=16 aSOFTWARE_TYPE[$software_id]=0 + aSOFTWARE_CATEGORY_INDEX[$software_id]=16 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=16308#p16308' # Required to ask for public domain/IP and desired VPN server port aSOFTWARE_REQUIRES_USERINPUT[$software_id]=1 @@ -1793,14 +1793,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,$i]=0 done - # - ARMv6 - aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0 - # + RPi/Odroids/x86_64 | ARMv6 disabled - if (( $G_HW_MODEL < 13 || $G_HW_MODEL == 14 || $G_HW_ARCH == 10 )); then - - aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,$G_HW_MODEL]=1 - - fi + # + RPi/Odroids/x86_64 + (( $G_HW_MODEL < 13 || $G_HW_MODEL == 14 || $G_HW_ARCH == 10 )) && aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,$G_HW_MODEL]=1 # Advanced Networking #-------------------------------------------------------------------------------- @@ -4577,17 +4571,23 @@ _EOF_ # Since G_AGUG does not upgrade packages with changed dependencies, in case of kernel image meta packages, those need to be installed+upgraded via G_AGI. G_AGI $kernel_packages # apt-get install overrides hold state - # Add Debian "sid" repo, which contains the WireGuard packages - echo 'deb https://deb.debian.org/debian/ sid main' > /etc/apt/sources.list.d/dietpi-wireguard.list - # - Disable sid repo via priority "-1", to prevent any accidental package upgrades: https://github.com/MichaIng/DietPi/issues/2568 - # - Enable but set sid WireGuard package priorities low enough to install only if not available in main repo(s) - echo -e 'Package: *\nPin: release n=sid\nPin-Priority: -1\n -Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Priority: 100' > /etc/apt/preferences.d/dietpi-wireguard + # Add Bullseye repo, which contains the WireGuard packages + if (( $G_DISTRO < 6 )); then - # RPi: Install debian-archive-keyring, currently version 2018.1 from sid branch: https://packages.debian.org/de/sid/debian-archive-keyring - (( $G_HW_MODEL < 10 )) && Download_Install 'https://dietpi.com/downloads/binaries/rpi/debian-archive-keyring.deb' + # Raspbian or Debian? + local url='http://raspbian.raspberrypi.org/raspbian/' + (( $G_HW_MODEL > 9 )) && url='https://deb.debian.org/debian/' - G_AGUP + echo "deb $url bullseye main" > /etc/apt/sources.list.d/dietpi-wireguard.list + + # Disable repo via priority "-1", to prevent any accidental package upgrades: https://github.com/MichaIng/DietPi/issues/2568 + # Enable but set WireGuard package priorities low enough to install only if not available in main repo(s) + echo -e 'Package: *\nPin: release n=bullseye\nPin-Priority: -1\n +Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=bullseye\nPin-Priority: 100' > /etc/apt/preferences.d/dietpi-wireguard + + G_AGUP + + fi # Check for existing WireGuard install local existing_install=0 @@ -4600,6 +4600,9 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior # If existing install, reconfigure to rebuild WireGuard kernel module against current kernel + headers (( $existing_install )) && G_RUN_CMD dpkg-reconfigure wireguard-dkms + # On RPi, the kernel module rebuild is not triggered by kernel upgrades, thus add this task manually + (( $G_HW_MODEL > 9 )) || echo -e '#!/bin/dash\ndpkg-reconfigure wireguard-dkms' > /etc/kernel/postinst.d/dietpi-wireguard + unset kernel_packages existing_install fi @@ -13352,6 +13355,7 @@ _EOF_ [[ -d '/etc/wireguard' ]] && rm -R /etc/wireguard [[ -f '/etc/apt/sources.list.d/dietpi-wireguard.list' ]] && rm /etc/apt/sources.list.d/dietpi-wireguard.list [[ -f '/etc/apt/preferences.d/dietpi-wireguard' ]] && rm /etc/apt/preferences.d/dietpi-wireguard + [[ -f '/etc/kernel/postinst.d/dietpi-wireguard' ]] && rm /etc/kernel/postinst.d/dietpi-wireguard fi From eeb81e0cd6eca0b3ec35eda3b966a51851067621 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 21 Sep 2019 18:41:40 +0200 Subject: [PATCH 155/184] v6.26 + CHANGELOG | WireGuard: Support for RPi1 + RPi Zero (ARMv6 models) has been enabled by switching to Bullseye as source repo --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b84d25dfdb..58ff51b860 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -24,6 +24,7 @@ Changes / Improvements / Optimisations: - DietPi-Software | myMPD: Updated install steps to avoid deprecations of the current upstream version. As well the service will not run as primary group "dietpi" anymore, which is only required for software that creates media files. Many thanks to @jcorporation (developer of myMPD) for providing this information as well as a smooth build script that updates old instances gracefully: https://github.com/MichaIng/DietPi/issues/3097 - DietPi-Software | WiFi Hotspot: Since on some systems, a hostapd service mask was found, it is now unmasked on install. As well our custom compiled binaries are now only installed on RTL8188C* devices where no special Realtek hostapd package is available. Many thanks to @symbios24 for reporting the service mask issue: https://github.com/MichaIng/DietPi/issues/2962 - DietPi-Software | Fail2Ban is not handled by DietPi-Services anymore, since the brute-force protection shall stay active during updates, installs, backups etc. The service is now started by systemd on boot and stays active until shutdown. Additionally on fresh installs the default jail.conf is optimised for the set "route" ban action: "blackhole" is now the route type, which does not send any respond to blocked requests. +- DietPi-Software | WireGuard: Support for RPi1 + RPi Zero (ARMv6 models) has been enabled by switching to Bullseye as source repo, which is available for Raspbian as well. Additionally on RPi, the WireGuard kernel module is now rebuilt automatically after kernel package upgrades. Many thanks to @johnnyt83 for suggestion RPi1/Zero support and his efforts to test the source build: https://github.com/MichaIng/DietPi/issues/2997 Bug Fixes: - General | Removed an obsolete OpenMediaVault cron job and binary that was leftover on at least one of our images (NanoPi NEO2) and is not part of the current OMV packages, thus save to remove in every case. Many thanks to @kt1024 for reporting this issue: https://github.com/MichaIng/DietPi/issues/2994 From 5789594e1d0e041dd8bc17751e036f4148397ad1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 21 Sep 2019 18:46:07 +0200 Subject: [PATCH 156/184] v6.26 + DietPi-Patch | WireGuard: Enable auto-rebuild after kernel upgrades on RPi --- dietpi/patch_file | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dietpi/patch_file b/dietpi/patch_file index bcf15ae104..e77cd71548 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2299,6 +2299,8 @@ Would you like to switch back to the Nginx authentication method now?' && certbo fi fi + # WireGuard: Enable auto-rebuild after kernel upgrades on RPi + (( $G_HW_MODEL < 10 )) && command -v wg &> /dev/null && grep -q '^aSOFTWARE_INSTALL_STATE\[172\]=2' /DietPi/dietpi/.installed && echo -e '#!/bin/dash\ndpkg-reconfigure wireguard-dkms' > /etc/kernel/postinst.d/dietpi-wireguard # Webmin: https://github.com/MichaIng/DietPi/commit/ec55d49a488fd9cb1dbb18cbfa067b5d1d1a974e /DietPi/dietpi/dietpi-software reinstall 115 From ffd426b674670d51cdeaf81e5a78ea38d0244c3d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 21 Sep 2019 21:18:22 +0200 Subject: [PATCH 157/184] v6.26 + DietPi-FS_partition_resize | Minor coding --- .../dietpi/services/fs_partition_resize.sh | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/rootfs/var/lib/dietpi/services/fs_partition_resize.sh b/rootfs/var/lib/dietpi/services/fs_partition_resize.sh index 9c97873159..fa0e3e6f07 100644 --- a/rootfs/var/lib/dietpi/services/fs_partition_resize.sh +++ b/rootfs/var/lib/dietpi/services/fs_partition_resize.sh @@ -27,24 +27,19 @@ fi - # Resize partition, only if drive actually contains a partition table + # Maximize partition, only if drive actually contains a partition table if [[ $TARGET_PARTITION == [0-9] ]]; then - # - Failsafe: Sync changes to disk before touching partitions + # Failsafe: Sync changes to disk before touching partitions sync - # - GPT detection | Modified version of ayufan-rock64 resize script - if sfdisk $TARGET_DRIVE -l | grep -qi 'disklabel type: gpt'; then + # GPT detection | Modified version of ayufan-rock64 resize script: # Move GPT alternate header to end of disk + sfdisk $TARGET_DRIVE -l | grep -qi 'disklabel type: gpt' && sgdisk -e $TARGET_DRIVE - # Move GPT alternate header to end of disk - sgdisk -e $TARGET_DRIVE - - fi - - # - Maximize partition size + # Maximize partition size sfdisk $TARGET_DRIVE -fN$TARGET_PARTITION --no-reread <<< ',+,,,' - # - Reread partition table + # Reread partition table partprobe $TARGET_DRIVE else @@ -53,7 +48,7 @@ fi - # Resize file system + # Maximize file system resize2fs $TARGET_DEV exit 0 From 7591d8168f39ef74215f457e161b4584e3c96102 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 21 Sep 2019 21:20:49 +0200 Subject: [PATCH 158/184] v6.26 + DietPi-PREP | "parted" is only used by DietPi-Drive_Manager. Actually it could be removed from requirements and instead installed by DietPi-Drive_Manager ondemand, when formatting a drive. --- PREP_SYSTEM_FOR_DIETPI.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index 1be0f2ee4e..353e935d48 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -739,7 +739,7 @@ _EOF_ 'locales' # Support locales, necessary for DietPi scripts, as we use en_GB.UTF8 as default language 'nano' # Simple text editor 'p7zip' # .7z wrapper - 'parted' # Drive partitioning, required by DietPi-Boot + DietPi-Drive_Manager + 'parted' # Drive partitioning, required by DietPi-Drive_Manager 'procps' # "kill", "ps", "pgrep", "sysctl", used by several DietPi scripts 'psmisc' # "killall", used by several DietPi scripts 'resolvconf' # Network nameserver handler + depandant for "ifupdown" (network interface handler) => "iproute2" ("ip" command) From 716e885b05b9c08448bfb5e2d6ef5d3f8750587a Mon Sep 17 00:00:00 2001 From: sal666 Date: Mon, 23 Sep 2019 13:37:11 +0200 Subject: [PATCH 159/184] v6.26 (#3119) + DietPi-Imager | Change formula to get starting sector of the root partition Current method of obtaining starting sector of root partition is making some assumptions that are not always met. When running fdisk you can't assume that the following is always true: - root partition is the last partition of the disk - fdisk will not display any warning (like 'Partition table entries are not in disk order.') --- .meta/dietpi-imager | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.meta/dietpi-imager b/.meta/dietpi-imager index 7899e6cadf..67cf0f51e5 100755 --- a/.meta/dietpi-imager +++ b/.meta/dietpi-imager @@ -188,7 +188,7 @@ Do you want to overwrite or backup the existing file to $OUTPUT_IMG_NAME.bak?" | done # Estimate minimum end sector - PART_START=$(fdisk -l -o Start $FP_SOURCE | tail -1) # 512 byte sectors + PART_START=$(fdisk -l -o Device,Start $FP_SOURCE | grep "^$FP_ROOT_DEV" | mawk '{print $2}') # 512 byte sectors PART_END=$(( $PART_START + $FS_SIZE )) G_DIETPI-NOTIFY 2 "Shrinking root partition to: $(( $FS_SIZE / 2048 + 1 )) MiB" From 213c78d457fbce3f2b956502566d0bf5943a965d Mon Sep 17 00:00:00 2001 From: sal666 Date: Mon, 23 Sep 2019 13:47:04 +0200 Subject: [PATCH 160/184] v6.26 (#3125) DietPi-Imager | lsblk with option -d will not print slave devices, avoiding the need of a subsequent grep --- .meta/dietpi-imager | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.meta/dietpi-imager b/.meta/dietpi-imager index 67cf0f51e5..f1e1649d72 100755 --- a/.meta/dietpi-imager +++ b/.meta/dietpi-imager @@ -51,7 +51,7 @@ if [[ $G_WHIP_RETURNED_VALUE == 'Drive' ]]; then # Detect drives and list for selection - G_WHIP_MENU_ARRAY=($(lsblk -npo NAME,SIZE | grep '^/')) + G_WHIP_MENU_ARRAY=($(lsblk -dnpo NAME,SIZE)) # - Visually separate dev name and space for ((i=1;i<${#G_WHIP_MENU_ARRAY[@]};i+=2)); do G_WHIP_MENU_ARRAY[$i]=": ${G_WHIP_MENU_ARRAY[$i]}"; done [[ $G_WHIP_MENU_ARRAY ]] && G_WHIP_MENU 'Please select the drive you wish to create the image from:' || Exit_On_Fail From 1df744cf579ccc3d48ce01afd2a90c2b00e9d6d0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 23 Sep 2019 14:32:34 +0200 Subject: [PATCH 161/184] v6.26 + DietPi-Software | Remove SDL2 from install options. Instead download and install together with Amiberry only, as we ship very tailored SDL2 builds with minimum dependencies. Add new libSDL2 download for Buster builds. --- dietpi/dietpi-software | 97 +++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 63 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 48d45b1425..d90a11b98a 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -1033,11 +1033,11 @@ DietPi-Software will decrypt and use it for software installs. You can change it software_id=108 aSOFTWARE_NAME[$software_id]='Amiberry' - aSOFTWARE_DESC[$software_id]='amiga emulator' + aSOFTWARE_DESC[$software_id]='Optimised Amiga emulator for ARM-based SoCs' aSOFTWARE_TYPE[$software_id]=0 aSOFTWARE_CATEGORY_INDEX[$software_id]=5 aSOFTWARE_ONLINEDOC_URL[$software_id]='p=64#p64' - aSOFTWARE_REQUIRES_XSERVERXORG[$software_id]=1 + (( $G_DISTRO < 5 )) && aSOFTWARE_REQUIRES_XSERVERXORG[$software_id]=1 aSOFTWARE_REQUIRES_ALSA[$software_id]=1 # RPi only for ((i=10; i<=$MAX_G_HW_MODEL; i++)) @@ -1967,16 +1967,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=1 #------------------ - software_id=140 - - aSOFTWARE_NAME[$software_id]='SDL2' - aSOFTWARE_DESC[$software_id]='simple direct layer 2' - aSOFTWARE_CATEGORY_INDEX[$software_id]=4 - aSOFTWARE_TYPE[$software_id]=1 - SOFTWARE_REQUIRES_XSERVERXORG[$software_id]=1 - # - ARMv8 - aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,3]=0 - #------------------ software_id=150 aSOFTWARE_NAME[$software_id]='Mono' @@ -2323,15 +2313,6 @@ DietPi-Software will decrypt and use it for software installs. You can change it fi - # Software that requires SDL2: - software_id=140 - if (( ${aSOFTWARE_INSTALL_STATE[108]} == 1 )); then - - aSOFTWARE_INSTALL_STATE[$software_id]=1 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed" - - fi - # Software that requires Python-Pip: https://github.com/MichaIng/DietPi/issues/784 # - OctoPrint (153) # - HTPC Manager (155) @@ -3769,7 +3750,36 @@ _EOF_ G_BACKUP_FP $G_FP_DIETPI_USERDATA/amiberry/conf/autostart.uae DEPS_LIST='libmpg123-0 libxml2 mpeg2dec libmpeg2-4' - (( $G_DISTRO < 5 )) && DEPS_LIST+=' libsndio6.1' || DEPS_LIST+=' libsndio7.0' + # For Stretch, SDL2 was compiled with libsndio support and dependency + if (( $G_DISTRO < 5 )); then + + DEPS_LIST+=' libsndio6.1' + # ARMv6 + if (( $G_HW_ARCH == 1 )); then + + INSTALL_URL_ADDRESS='https://dietpi.com/downloads/binaries/all/sdl2-armv6_stretch.7z' + + # ARMv7 FKMS: ./configure --disable-video-rpi --enable-video-kmsdrm + elif (( $G_HW_ARCH == 2 )); then + + INSTALL_URL_ADDRESS='https://dietpi.com/downloads/binaries/all/sdl2-armv7_stretch.7z' + + # RPi 2/3 Enable fkms OpenGL + (( $G_HW_MODEL < 10 )) && /DietPi/dietpi/func/dietpi-set_hardware rpi-opengl vc4-fkms-v3d + + fi + + Download_Install "$INSTALL_URL_ADDRESS" sdl2 + dpkg -i sdl2/*.deb + rm -R sdl2 + + # For Buster, SDL2 was compiled with minimum dependencies + else + + Download_Install "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/libSDL2_$G_HW_ARCH_DESCRIPTION.7z" /usr/local/lib + + fi + Download_Install 'https://dietpi.com/downloads/binaries/all/amiberry_v2.25.7z' $G_FP_DIETPI_USERDATA fi @@ -6401,39 +6411,6 @@ Mycroft AI requires at least 2 GiB memory on first start. We will now increase y fi - software_id=140 # SDL2 - if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then - - Banner_Installing - - # X86_64 - if (( $G_HW_ARCH == 10 )); then - - # G_AGI libsdl2-2.0-0 libsdl2-image-2.0-0 libsdl2-ttf-2.0-0 libsdl2-net-2.0-0 libsdl2-mixer-2.0-0 - INSTALL_URL_ADDRESS='https://dietpi.com/downloads/binaries/all/sdl2-x86_64_stretch.7z' - - # ARMv6 - elif (( $G_HW_ARCH == 1 )); then - - INSTALL_URL_ADDRESS='https://dietpi.com/downloads/binaries/all/sdl2-armv6_stretch.7z' - - # ARMv7 FKMS: - # ./configure --disable-video-rpi --enable-video-kmsdrm - elif (( $G_HW_ARCH == 2 )); then - - INSTALL_URL_ADDRESS='https://dietpi.com/downloads/binaries/all/sdl2-armv7_stretch.7z' - - # - RPi 2/3 Enable fkms OpenGL - (( $G_HW_MODEL < 10 )) && /DietPi/dietpi/func/dietpi-set_hardware rpi-opengl vc4-fkms-v3d - - fi - - Download_Install "$INSTALL_URL_ADDRESS" sdl2 - dpkg -i sdl2/*.deb - rm -R sdl2 - - fi - software_id=150 # Mono runtime if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then @@ -12735,14 +12712,6 @@ _EOF_ fi - software_id=140 - if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then - - Banner_Uninstalling - G_AGP libsdl2 libsdl2-image libsdl2-mixer libsdl2-net libsdl2-ttf libsmpeg2 - - fi - software_id=141 if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then @@ -13753,6 +13722,8 @@ _EOF_ [[ -d $G_FP_DIETPI_USERDATA/amiberry ]] && rm -R $G_FP_DIETPI_USERDATA/amiberry # Autostart index: If currently Amiberry, revert to console login [[ -f '/DietPi/dietpi/.dietpi-autostart_index' && $( Date: Tue, 24 Sep 2019 14:21:35 +0200 Subject: [PATCH 162/184] v6.26 + DietPi-Software | Xserver: On RK3399 switch to Mali and X.org packages + config provided by Rockchip --- .conf/dps_6/xorg_rk3399.conf | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.conf/dps_6/xorg_rk3399.conf b/.conf/dps_6/xorg_rk3399.conf index 6d5af3e616..377be5c559 100644 --- a/.conf/dps_6/xorg_rk3399.conf +++ b/.conf/dps_6/xorg_rk3399.conf @@ -1,8 +1,23 @@ -Section "Device" +# DietPi X.org config +# All credits go to Rockchip: https://github.com/rockchip-linux/rk-rootfs-build/blob/master/overlay/etc/X11/xorg.conf.d/20-modesetting.conf +Section "Device" Identifier "Rockchip Graphics" Driver "modesetting" - Option "AccelMethod" "glamor" + Option "AccelMethod" "exa" +# Option "AccelMethod" "glamor" Option "DRI" "2" + Option "FlipFB" "always" +EndSection + +Section "Screen" + Identifier "Default Screen" + Device "Rockchip Graphics" + Monitor "Default Monitor" +EndSection +### Valid values for rotation are "normal", "left", "right" +Section "Monitor" + Identifier "Default Monitor" + Option "Rotate" "normal" EndSection From cf11aac4fbb7475bd92d0cae23ccad1fb034612a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 24 Sep 2019 15:51:32 +0200 Subject: [PATCH 163/184] v6.26 + DietPi-Software | Xserver: On ASUS TB switch to Mali and X.org packages + config provided by Rockchip --- .conf/dps_6/xorg_asustb.conf | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/.conf/dps_6/xorg_asustb.conf b/.conf/dps_6/xorg_asustb.conf index 806419f7a1..377be5c559 100644 --- a/.conf/dps_6/xorg_asustb.conf +++ b/.conf/dps_6/xorg_asustb.conf @@ -1,20 +1,23 @@ -Section "Device" +# DietPi X.org config +# All credits go to Rockchip: https://github.com/rockchip-linux/rk-rootfs-build/blob/master/overlay/etc/X11/xorg.conf.d/20-modesetting.conf +Section "Device" Identifier "Rockchip Graphics" Driver "modesetting" - Option "AccelMethod" "glamor" + Option "AccelMethod" "exa" +# Option "AccelMethod" "glamor" Option "DRI" "2" - + Option "FlipFB" "always" EndSection -Section "Screen" - - Identifier "Default Screen" - SubSection "Display" - - Depth 24 - Modes "1920x1080" "1280x1024" "1024x768" "800x600" - - EndSubSection +Section "Screen" + Identifier "Default Screen" + Device "Rockchip Graphics" + Monitor "Default Monitor" +EndSection +### Valid values for rotation are "normal", "left", "right" +Section "Monitor" + Identifier "Default Monitor" + Option "Rotate" "normal" EndSection From 464990fee7c0cbc415bc8e41ba27dfe0303c1ae0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 24 Sep 2019 16:22:15 +0200 Subject: [PATCH 164/184] v6.26 + DietPi-Software | Xserver: Install new Buster-compatible Mali drivers for RK3399 boards and ASUS TB. Testing required! + DietPi-Software | Amiberry: Enable Buster support by installing the new Buster-compatible Mali drivers for ASUS TB and since it does not depend on X11 anymore, install Odroid XU4 Mali drivers separately as well. Testing required! --- dietpi/dietpi-software | 165 +++++++++++++++++++++++++---------------- 1 file changed, 102 insertions(+), 63 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index d90a11b98a..bdc64c66f5 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -1911,22 +1911,22 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_NAME[$software_id]='ALSA' aSOFTWARE_DESC[$software_id]='linux sound system' - aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=1 + aSOFTWARE_CATEGORY_INDEX[$software_id]=3 #------------------ software_id=6 aSOFTWARE_NAME[$software_id]='Xserver' aSOFTWARE_DESC[$software_id]='linux display system' - aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=1 + aSOFTWARE_CATEGORY_INDEX[$software_id]=3 #------------------ software_id=151 aSOFTWARE_NAME[$software_id]='Nvidia' aSOFTWARE_DESC[$software_id]='display driver' - aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_TYPE[$software_id]=1 + aSOFTWARE_CATEGORY_INDEX[$software_id]=3 aSOFTWARE_REQUIRES_XSERVERXORG[$software_id]=1 # Native PC only for ((i=0; i<=$MAX_G_HW_MODEL; i++)) @@ -1943,22 +1943,22 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_NAME[$software_id]='FFmpeg' aSOFTWARE_DESC[$software_id]='audio & visual libary' - aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=1 + aSOFTWARE_CATEGORY_INDEX[$software_id]=4 #------------------ software_id=8 aSOFTWARE_NAME[$software_id]='Java' aSOFTWARE_DESC[$software_id]='OpenJDK + JRE libary' - aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=1 + aSOFTWARE_CATEGORY_INDEX[$software_id]=4 #------------------ software_id=9 aSOFTWARE_NAME[$software_id]='Node.js' aSOFTWARE_DESC[$software_id]='javascript runtime' - aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=1 + aSOFTWARE_CATEGORY_INDEX[$software_id]=4 #------------------ software_id=130 @@ -1971,8 +1971,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_NAME[$software_id]='Mono' aSOFTWARE_DESC[$software_id]='runtime libraries and repo' - aSOFTWARE_CATEGORY_INDEX[$software_id]=4 aSOFTWARE_TYPE[$software_id]=1 + aSOFTWARE_CATEGORY_INDEX[$software_id]=4 #------------------ software_id=126 @@ -2038,8 +2038,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_NAME[$software_id]='Build-Essentials' aSOFTWARE_DESC[$software_id]='common packages for compile' - aSOFTWARE_CATEGORY_INDEX[$software_id]=6 aSOFTWARE_TYPE[$software_id]=1 + aSOFTWARE_CATEGORY_INDEX[$software_id]=6 #------------------ software_id=17 @@ -2050,10 +2050,10 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------ software_id=170 - aSOFTWARE_NAME[$software_id]='Unrar' + aSOFTWARE_NAME[$software_id]='UnRAR' aSOFTWARE_DESC[$software_id]='unarchiver for .rar files' - aSOFTWARE_CATEGORY_INDEX[$software_id]=6 aSOFTWARE_TYPE[$software_id]=1 + aSOFTWARE_CATEGORY_INDEX[$software_id]=6 # Text Editors #-------------------------------------------------------------------------------- @@ -2359,7 +2359,7 @@ DietPi-Software will decrypt and use it for software installs. You can change it fi - # Software that requires unrar + # Software that requires UnRAR # - rTorrent # - Medusa # - SABnzbd @@ -3746,11 +3746,9 @@ _EOF_ Banner_Installing - # Backup existing autostart.uae for user - G_BACKUP_FP $G_FP_DIETPI_USERDATA/amiberry/conf/autostart.uae - + # Pre-reqs DEPS_LIST='libmpg123-0 libxml2 mpeg2dec libmpeg2-4' - # For Stretch, SDL2 was compiled with libsndio support and dependency + # For Stretch, SDL2 was compiled with X11 + libsndio support and dependency if (( $G_DISTRO < 5 )); then DEPS_LIST+=' libsndio6.1' @@ -3773,13 +3771,48 @@ _EOF_ dpkg -i sdl2/*.deb rm -R sdl2 - # For Buster, SDL2 was compiled with minimum dependencies + # For Buster, SDL2 was compiled with minimum dependencies: No X11 required, thus GPU drivers need to be installed/enabled separately else + # GPU drivers + # - RPi + if (( $G_HW_MODEL < 10 )); then + + /DietPi/dietpi/func/dietpi-set_hardware rpi-opengl vc4-fkms-v3d + + # - Odroid XU4: http://fuzon.co.uk/meveric/pool/main/s/setup-odroid/ + elif (( $G_HW_MODEL == 11 )); then + + G_AGI malit628-odroid + + # - ASUS TB: https://github.com/rockchip-linux/rk-rootfs-build/tree/master/packages/armhf + elif (( $G_HW_MODEL == 52 )); then + + # Mali-T760 driver libraries + Download_Install 'https://dietpi.com/downloads/binaries/asus/libmali.deb' + cd /usr/lib/arm-linux-gnueabihf + ln -sf libMali.so libEGL.so.1.1.0 + ln -sf libMali.so libEGL.so + ln -sf libMali.so libEGL.so.1.0.0 + ln -sf libMali.so libEGL.so.1.4 + ln -sf libMali.so libGLESv2.so + ln -sf libMali.so libGLESv2.so.2.0 + ln -sf libMali.so libGLESv2.so.2.0.0 + ln -sf libMali.so libGLESv1_CM.so + ln -sf libMali.so libGLESv1_CM.so.1 + ln -sf libMali.so libGLESv1_CM.so.1.1 + cd /tmp/$G_PROGRAM_NAME + + fi + + # libSDL2 Download_Install "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/libSDL2_$G_HW_ARCH_DESCRIPTION.7z" /usr/local/lib fi + # Amiberry + # - Backup existing autostart.uae for user + G_BACKUP_FP $G_FP_DIETPI_USERDATA/amiberry/conf/autostart.uae Download_Install 'https://dietpi.com/downloads/binaries/all/amiberry_v2.25.7z' $G_FP_DIETPI_USERDATA fi @@ -5987,32 +6020,51 @@ Mycroft AI requires at least 2 GiB memory on first start. We will now increase y Banner_Installing - # Xserver Prereqs (ALL) + # Xserver + generic Mesa OpenGL libraries and utilities G_AGI xserver-xorg xinit xcompmgr xterm dbus-x11 xfonts-base x11-xserver-utils x11-utils libgl1-mesa-dri mesa-utils mesa-utils-extra - # - Improve performance on all desktops and devices (eg: removes window lag in desktops) by limiting compositions + # Improve performance on all desktops and devices (eg: removes window lag in desktops) by limiting compositions dps_index=$software_id Download_Install 'xcompmgr.desktop' /etc/xdg/autostart/xcompmgr.desktop - # - Disable DPMS and all screen blanking + # Disable DPMS and all screen blanking dps_index=$software_id Download_Install '99-dietpi-dpms_off.conf' /etc/X11/xorg.conf.d/99-dietpi-dpms_off.conf - # Odroid N1 - if (( $G_HW_MODEL == 14 )); then + # RK3399: https://github.com/rockchip-linux/rk-rootfs-build/tree/master/packages/arm64 + # - Odroid N1, RockPro64, NanoPC T4, Firefly RK3399, ROCK Pi 4 + if (( $G_HW_CPUID == 3 )); then + + # Mali-T864 driver libraries + Download_Install 'https://dietpi.com/downloads/binaries/rk3399/libmali.deb' + cd /usr/lib/aarch64-linux-gnu + ln -sf libMali.so libEGL.so.1.1.0 + ln -sf libMali.so libEGL.so + ln -sf libMali.so libEGL.so.1.0.0 + ln -sf libMali.so libEGL.so.1.4 + ln -sf libMali.so libGLESv2.so + ln -sf libMali.so libGLESv2.so.2.0 + ln -sf libMali.so libGLESv2.so.2.0.0 + ln -sf libMali.so libGLESv1_CM.so + ln -sf libMali.so libGLESv1_CM.so.1 + ln -sf libMali.so libGLESv1_CM.so.1.1 + cd /tmp/$G_PROGRAM_NAME - DEPS_LIST='libmali-rk-midgard-t86x-r14p0 xserver-xorg-video-armsoc-rk3399-odroid' + # X.org packages and config + Download_Install 'https://dietpi.com/downloads/binaries/rk3399/xserver.7z' xserver + dpkg --force-hold,confdef,confold -i xserver/*.deb G_BACKUP_FP /etc/X11/xorg.conf - dps_index=$software_id Download_Install 'xorg_n1.conf' /etc/X11/xorg.conf + dps_index=$software_id Download_Install 'xorg_rk3399.conf' /etc/X11/xorg.conf - # Odroid C2 + # Odroid C2: http://fuzon.co.uk/meveric/pool/main/s/setup-odroid/ elif (( $G_HW_MODEL == 12 )); then DEPS_LIST='aml-libs-odroid mali450-odroid libump-odroid xf86-video-fbturbo-odroid' G_BACKUP_FP /etc/X11/xorg.conf dps_index=$software_id Download_Install 'xorg_c2.conf' /etc/X11/xorg.conf - # Odroid XU4 + # Odroid XU4: http://fuzon.co.uk/meveric/pool/main/s/setup-odroid/ elif (( $G_HW_MODEL == 11 )); then + # xf86-video-armsoc-odroid creates an xorg.conf G_AGI firmware-samsung xf86-video-armsoc-odroid malit628-odroid # Pine A64 @@ -6024,40 +6076,28 @@ Mycroft AI requires at least 2 GiB memory on first start. We will now increase y G_BACKUP_FP /etc/X11/xorg.conf dps_index=$software_id Download_Install 'xorg_pine64.conf' /etc/X11/xorg.conf - # RK3399 - # elif (( $G_HW_MODEL == 42 || $G_HW_MODEL == 68 )); then - - # /usr/lib/xorg/Xorg: symbol lookup error: /usr/lib/xorg/modules/libglamoregl.so: undefined symbol: gbm_create_device - # Retry with kernel/uboot from Ubuntu image??? - - #dps_index=$software_id Download_Install 'xorg_rk3399.conf' /etc/X11/xorg.conf - #dps_index=$software_id Download_Install '50-dietpi-rk3399.rules' /etc/udev/rules.d/50-rk3399.rules - - ##wget https://github.com/rockchip-linux/libmali/raw/29mirror/lib/aarch64-linux-gnu/libmali-midgard-t86x-r14p0-x11-fbdev.so -O /usr/lib/aarch64-linux-gnu/libMali.so - ##wget https://github.com/rockchip-linux/libmali/raw/29mirror/lib/aarch64-linux-gnu/libmali-midgard-t86x-r14p0-fbdev.so -O /usr/lib/aarch64-linux-gnu/libMali.so - ##wget https://github.com/rockchip-linux/libmali/raw/29mirror/lib/aarch64-linux-gnu/libmali-midgard-t86x-r14p0-gbm.so -O /usr/lib/aarch64-linux-gnu/libMali.so #works but no GLES - #wget https://github.com/rockchip-linux/libmali/raw/29mirror/lib/aarch64-linux-gnu/libmali-midgard-t86x-r14p0.so -O /usr/lib/aarch64-linux-gnu/libMali.so - #rm $(ls /usr/lib/aarch64-linux-gnu/libGLESv2.*) - #rm $(ls /usr/lib/aarch64-linux-gnu/libEGL.*) - #ln -sf /usr/lib/aarch64-linux-gnu/libMali.so /usr/lib/aarch64-linux-gnu/libEGL.so.1 - #ln -sf /usr/lib/aarch64-linux-gnu/libMali.so /usr/lib/aarch64-linux-gnu/libEGL.so.1.0.0 - #ln -sf /usr/lib/aarch64-linux-gnu/libMali.so /usr/lib/aarch64-linux-gnu/libGLESv2.so.2 - #ln -sf /usr/lib/aarch64-linux-gnu/libMali.so /usr/lib/aarch64-linux-gnu/libGLESv2.so.2.0.0 - #ln -sf /usr/lib/aarch64-linux-gnu/libMali.so /usr/lib/aarch64-linux-gnu/libgbm.so.1 - #ln -sf /usr/lib/aarch64-linux-gnu/libMali.so /usr/lib/aarch64-linux-gnu/libgbm.so.1.0.0 - #ln -sf /usr/lib/aarch64-linux-gnu/libMali.so /usr/lib/aarch64-linux-gnu/libmali.so - #ln -sf /usr/lib/aarch64-linux-gnu/libMali.so /usr/lib/aarch64-linux-gnu/libMaliOpenCL.so - #ln -sf /usr/lib/aarch64-linux-gnu/libMali.so /usr/lib/aarch64-linux-gnu/libOpenCL.so - - # ASUS TB: On Stretch, install our prepared drivers archive - # - On Buster, new t76x driver packages require testing: https://packages.debian.org/buster/libegl1 - elif (( $G_HW_MODEL == 52 && $G_DISTRO == 4 )); then - - Download_Install 'https://dietpi.com/downloads/binaries/asus/ASUSTB_GPU.7z' gpu_drivers - dpkg --force-hold,confdef,confnew -i gpu_drivers/*.deb - G_AGF - rm -R gpu_drivers + # ASUS TB: https://github.com/rockchip-linux/rk-rootfs-build/tree/master/packages/armhf + elif (( $G_HW_MODEL == 52 )); then + + # Mali-T760 driver libraries + Download_Install 'https://dietpi.com/downloads/binaries/asus/libmali.deb' + cd /usr/lib/arm-linux-gnueabihf + ln -sf libMali.so libEGL.so.1.1.0 + ln -sf libMali.so libEGL.so + ln -sf libMali.so libEGL.so.1.0.0 + ln -sf libMali.so libEGL.so.1.4 + ln -sf libMali.so libGLESv2.so + ln -sf libMali.so libGLESv2.so.2.0 + ln -sf libMali.so libGLESv2.so.2.0.0 + ln -sf libMali.so libGLESv1_CM.so + ln -sf libMali.so libGLESv1_CM.so.1 + ln -sf libMali.so libGLESv1_CM.so.1.1 + cd /tmp/$G_PROGRAM_NAME + # X.org packages and config + Download_Install 'https://dietpi.com/downloads/binaries/asus/xserver.7z' xserver + dpkg --force-hold,confdef,confold -i xserver/*.deb + G_BACKUP_FP /etc/X11/xorg.conf dps_index=$software_id Download_Install 'xorg_asustb.conf' /etc/X11/xorg.conf fi @@ -6492,20 +6532,19 @@ Mycroft AI requires at least 2 GiB memory on first start. We will now increase y fi - software_id=170 # Unrar + software_id=170 # UnRAR if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then Banner_Installing - # Raspbian, only "unrar-free" available in repos + # On Raspbian, only "unrar-free" is available in repos, but does not support all rar formats, thus we use "unrar" [non-free] from Debian repo if (( $G_HW_MODEL < 10 )); then - #G_AGI unrar-free # Does not support all rar formats, better use "unrar-nonfree" from Debian repo Download_Install "https://dietpi.com/downloads/binaries/rpi/unrar-armhf-$G_DISTRO_NAME.deb" else - G_AGI unrar # https://github.com/MichaIng/DietPi/issues/176#issuecomment-240101365 + G_AGI unrar fi @@ -14357,7 +14396,7 @@ _EOF_ fi - software_id=170 + software_id=170 # UnRAR if (( aSOFTWARE_INSTALL_STATE[$software_id] == -1 )); then Banner_Uninstalling From 3853e123401470ec209d69c00e937fb21e72ed5f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 25 Sep 2019 12:10:26 +0200 Subject: [PATCH 165/184] v6.26 + DietPi-PREP | armbian-tools- is not required by default. It contains Bluetooth firmware update utilities + services for two specific BT chip families. Those as well do some TTY assumptions that are not necessarily true or wanted and override the MAC address, which IMO should not be done without user knowledge. --- PREP_SYSTEM_FOR_DIETPI.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index 353e935d48..58f5912692 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -831,12 +831,11 @@ _EOF_ local apackages=( - "armbian-tools-$DISTRO_TARGET_NAME" 'linux-dtb-' 'linux-u-' 'linux-image-' - "linux-$DISTRO_TARGET_NAME" - 'sunxi' + "linux-$DISTRO_TARGET_NAME-" + 'sunxi-tools' ) @@ -870,7 +869,6 @@ _EOF_ elif (( $G_HW_MODEL == 14 )); then G_AGI linux-image-arm64-odroid-n1 - #G_AGI libdrm-rockchip1 # Not currently on meveric's repo # Odroid C2 elif (( $G_HW_MODEL == 12 )); then From a968231fbdea5cd091c8ab02d3d0b8a39a0083c3 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 25 Sep 2019 13:17:58 +0200 Subject: [PATCH 166/184] v6.26 + CHANGELOG | Rockchip GPU support re-added --- CHANGELOG.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 58ff51b860..335db3e90a 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,6 +6,7 @@ Changes / Improvements / Optimisations: - General | Initial support and definitions for Debian Bullseye, the new Debian testing version, have been added to DietPi code. You can now create Bullseye systems via DietPi-PREP: https://github.com/MichaIng/DietPi/issues/3009 - General | DietPi scripts, i.e. dietpi-software, will not overwrite you custom permissions in /mnt/dietpi_userdata anymore. Instead required permissions are now only applied for individual software titles that are being installed. Besides saving you time to re-apply custom permission, this as well enhances security in some cases where software installers/archives apply/contain stricter per-file/dir permissions. Many thanks to @JJGO and @johnvick for suggesting this enhancement: https://github.com/MichaIng/DietPi/issues/2641 - General | On first boot, when DietPi-Software finishes the initial setup, it is now assured that all APT packages, including firmware, are upgraded by performing an "apt-get dist-upgrade"/"apt full-upgrade". Since it includes upgrades regardless of underlying dependency and conflict changes, which in rare cases can perform unwanted removals, we do not do this on regualar DietPi-Update/Software runs. But on first boot, without additional packages installed yet, it is safe. Many thanks to @cmessin1 for doing this request: https://github.com/MichaIng/DietPi/issues/3098 +- Rochchip | Experimental GPU acceleration support for RK3399 SoCs and ASUS Tinker Board has been re-enabled. - RPi | The haveged daemon has been replaced with rng-tools, an alternative which does not work on all devices, but has been proven to work on RPi, is default on Raspbian and uses less RAM on idle. - DietPi-Globals | The environment variable $G_USER_INPUTS has been renamed to $G_INTERACTIVE, which describes better what it does. When setting this to "0", DietPi scripts will run non-interactively, i.e. all whiptail dialog prompts and other tasks that require manual user input are skipped. Note that this is not required when running scripts from cron jobs or systemd units, since those have no STDIN attached which makes DietPi scripts run non-interactively automatically. Scripts will stay backwards-compatible, thus respect $G_USER_INPUTS for a while, but please adjust your scripts or docs where you make use of it. Many thanks to @AtkLordOverAll for contributing this change: https://github.com/MichaIng/DietPi/pull/3041 - DietPi-Banner/NordVPN: DietPi-NordVPN has a new input command to print the current VPN connection state: "dietpi-nordvpn status". This has been implemented as well into DietPi-Banner to optionally show NordVPN connection state on login automatically. Many thanks to @svh1985 for implementing this feature: https://github.com/MichaIng/DietPi/pull/3084 @@ -52,7 +53,7 @@ Bug Fixes: - DietPi-Software | TigerVNC: Resolved an issue on Debian Buster, where the VNC connection fails immediately due to an external bug, if no read-only password has been applied via vncpasswd. Many thanks to @Trunkzeh for reporting this issue and providing the workaround: https://github.com/MichaIng/DietPi/issues/3070 - DietPi-Software | TigerVNC: Resolved minor error messages on login and in logs: "No session for PID ...", "DE is (null); No desktop environnement set, fallback to LXDE", "Use of uninitialized value $proto in socket at /usr/bin/tigervncserver" - DietPi-Software | Netdata: Resolved an issue where install failed on Stretch systems. Many thanks to @Velociraptor85 for reporting this issue: https://github.com/MichaIng/DietPi/issues/3062 -- DietPi-Software | Amiberry: Resolved an issue where install failed on Buster due to changed library package version. Many thanks to @TuKo1982 for reporting this issue: https://github.com/MichaIng/DietPi/issues/3104 +- DietPi-Software | Amiberry: Resolved an issue where install failed on Buster due to changed library package version. The SDL2 library has been recompiled for Buster with minimal dependencies, thus X11 does not need to be installed anymore. Many thanks to @TuKo1982 for reporting this issue: https://github.com/MichaIng/DietPi/issues/3104 As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/XXXX From aff65eac69714f2447d7f7d858faeeb126633cec Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 25 Sep 2019 15:39:33 +0200 Subject: [PATCH 167/184] v6.26 + DietPi-Software | Amiberry: libSDL2 needs to be stored in tar archives, otherwise symlinks are not preserved --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index bdc64c66f5..ca7a4491c9 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3806,7 +3806,7 @@ _EOF_ fi # libSDL2 - Download_Install "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/libSDL2_$G_HW_ARCH_DESCRIPTION.7z" /usr/local/lib + Download_Install "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/libSDL2_$G_HW_ARCH_DESCRIPTION.tar.bz2" /usr/local/lib fi From 961457488072ebaa084d969fda63a22b11328eed Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 26 Sep 2019 14:05:18 +0200 Subject: [PATCH 168/184] v6.26 + DietPi-Globals | Minor coding --- dietpi/func/dietpi-globals | 65 ++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 34 deletions(-) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 43f1807eda..e4991f3bc9 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -1716,22 +1716,20 @@ $logfile_content } # Returns current CPU temp 'C - # print_full_info=1 # optional input to print full colour text output and temp warnings. + # - print_full_info=1 Optional input to print full colour text output and temp warnings G_OBTAIN_CPU_TEMP(){ - local cpu_temp_current='N/A' # We must always return a value, due to VM lacking this feature + benchmark online - [[ $print_full_info == [01] ]] || local print_full_info=0 - # Read CPU temp from file + local temp # - Sparky/Asus: Requires special case as in others array this would break other SBC temp readouts with 2 zones if (( $G_HW_MODEL == 70 || $G_HW_MODEL == 52 )); then - cpu_temp_current=$(= 150 )) && cpu_temp_current=$(mawk '{print $1/1000}' <<< $cpu_temp_current | xargs printf "%0.0f") + # 2/5 digit output? + (( $temp >= 150 )) && temp=$(mawk '{print $1/1000}' <<< $temp | xargs printf "%0.0f") - if (( $print_full_info )); then + if [[ $print_full_info == 1 ]]; then - local cpu_temp_current_f=$(( $cpu_temp_current * 9/5 + 32 )) - if (( $cpu_temp_current >= 70 )); then + local temp_f=$(( $temp * 9/5 + 32 )) + if (( $temp >= 70 )); then - cpu_temp_current="\e[1;31mWARNING: $cpu_temp_current'C : $cpu_temp_current_f'F (Reducing the life of your device)\e[0m" + temp="\e[1;31mWARNING: $temp'C : $temp_f'F (Reducing the life of your device)\e[0m" - elif (( $cpu_temp_current >= 60 )); then + elif (( $temp >= 60 )); then - cpu_temp_current="\e[38;5;202m$cpu_temp_current'C : $cpu_temp_current_f'F\e[90m (Running hot, not recommended)\e[0m" + temp="\e[38;5;202m$temp'C : $temp_f'F \e[90m(Running hot, not recommended)\e[0m" - elif (( $cpu_temp_current >= 50 )); then + elif (( $temp >= 50 )); then - cpu_temp_current="\e[1;33m$cpu_temp_current'C : $cpu_temp_current_f'F\e[90m (Running warm, but safe)\e[0m" + temp="\e[1;33m$temp'C : $temp_f'F \e[90m(Running warm, but safe)\e[0m" - elif (( $cpu_temp_current >= 40 )); then + elif (( $temp >= 40 )); then - cpu_temp_current="\e[1;32m$cpu_temp_current'C : $cpu_temp_current_f'F\e[90m (Optimal temperature)\e[0m" + temp="\e[1;32m$temp'C : $temp_f'F \e[90m(Optimal temperature)\e[0m" - elif (( $cpu_temp_current >= 30 )); then + elif (( $temp >= 30 )); then - cpu_temp_current="\e[1;36m$cpu_temp_current'C : $cpu_temp_current_f'F\e[90m (Cool runnings)\e[0m" + temp="\e[1;36m$temp'C : $temp_f'F \e[90m(Cool runnings)\e[0m" else - cpu_temp_current="\e[1;36m$cpu_temp_current'C : $cpu_temp_current_f'F\e[90m (Who put me in the freezer!)\e[0m" + temp="\e[1;36m$temp'C : $temp_f'F \e[90m(Who put me in the freezer!)\e[0m" fi @@ -1794,25 +1792,24 @@ $logfile_content fi - echo -e "$cpu_temp_current" + echo -e "$temp" } # Returns current CPU usage % G_OBTAIN_CPU_USAGE(){ - # - PS (inaccurate, but fast??) + # PS (inaccurate, but fast??) local cpu_usage=0 - local fp_temp='/tmp/.cpu_usage_cpuinfo' - ps -axo %cpu | sed '1d' | sed 's/ //' > $fp_temp - while read line; do + while read line + do - cpu_usage=$(echo "scale=1;$cpu_usage + $line" | bc -l) + cpu_usage=$(bc -l <<< "scale=1;$cpu_usage + $line") - done < "$fp_temp" + done <<< "$(ps -eo %cpu | sed -n '1!{s/^ //p}')" - # - ps returns usage of each core, so we devide the total by #n cores - cpu_usage=$(echo "scale=1;$cpu_usage / $G_HW_CPU_CORES" | bc -l) + # ps returns usage of each core, so we devide the total by #n cores + cpu_usage=$(bc -l <<< "scale=1;$cpu_usage / $G_HW_CPU_CORES") echo $cpu_usage From 7e984401a2a21054f04d1982e5eddfdbe56e0876 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 26 Sep 2019 15:01:03 +0200 Subject: [PATCH 169/184] v6.26 + DietPi-Software | Amiberry: Remove X11-based init for ASUS TB on Buster+ + DietPi-Software | Amiberry: Add missing libraries to Buster install, which are pulled on Stretch as X11 dependencies --- dietpi/dietpi-software | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index ca7a4491c9..e7c8bcbfae 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3748,10 +3748,12 @@ _EOF_ # Pre-reqs DEPS_LIST='libmpg123-0 libxml2 mpeg2dec libmpeg2-4' + # For Stretch, SDL2 was compiled with X11 + libsndio support and dependency if (( $G_DISTRO < 5 )); then DEPS_LIST+=' libsndio6.1' + # ARMv6 if (( $G_HW_ARCH == 1 )); then @@ -3771,9 +3773,12 @@ _EOF_ dpkg -i sdl2/*.deb rm -R sdl2 - # For Buster, SDL2 was compiled with minimum dependencies: No X11 required, thus GPU drivers need to be installed/enabled separately + # For Buster, SDL2 was compiled with minimum dependencies: No X11 required, thus GPU drivers and some libraries need to be installed/enabled separately else + # Libraries + DEPS_LIST+=' libpng16-16 libfreetype6' + # GPU drivers # - RPi if (( $G_HW_MODEL < 10 )); then @@ -8396,9 +8401,9 @@ _EOF_ fi # Service - # - On Asus TB we need to start it as X11 session + # - On Stretch Asus TB we need to start it as X11 session local xinit_start='' - (( $G_HW_MODEL == 52 )) && xinit_start="$(command -v xinit) " + (( $G_HW_MODEL == 52 && $G_DISTRO < 5 )) && xinit_start="$(command -v xinit) " cat << _EOF_ > /etc/systemd/system/amiberry.service [Unit] From 1e52d1348a678b422959f3cb12db30a6065f430b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 26 Sep 2019 21:50:52 +0200 Subject: [PATCH 170/184] v6.26 + DietPi-Update | Log update output to file by redirecting to subshell instead of piping, else G_ERROR_HANDLER cannot exit the script via "kill -INT $$": https://github.com/MichaIng/DietPi/issues/3127 + DietPi-Update | Minor coding and adding some info comments --- dietpi/dietpi-update | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/dietpi/dietpi-update b/dietpi/dietpi-update index 815b20ff85..616e86a391 100644 --- a/dietpi/dietpi-update +++ b/dietpi/dietpi-update @@ -10,15 +10,16 @@ #//////////////////////////////////// # # Info: + # - Location: /{DietPi,boot}/dietpi/dietpi-update # - Updates DietPi from Git or dietpi.com repo # - Uses patch_file for incremental online patching # - Uses pre-patch_file for critical fixes and update related changes # # Usage: - # - dietpi-update = Normal - # - dietpi-update 1 = noninteractive update - # - dietpi-update 2 = Check for updates. print server_version to /DietPi/dietpi/.update_available (-1=new image required) - # - dietpi-update -1 = Include reapplying the current subversion patch, e.g. to update dev branch + # - dietpi-update = Normal + # - dietpi-update 1 = noninteractive update + # - dietpi-update 2 = Check for updates. print server_version to /DietPi/dietpi/.update_available (-1=new image required) + # - dietpi-update -1 = Include reapplying the current subversion patch, e.g. to update dev branch #//////////////////////////////////// # Import DietPi-Globals -------------------------------------------------------------- @@ -48,9 +49,9 @@ UPDATE_REQUIRESNEWIMAGE=0 RUN_UPDATE=0 - GITOWNER_TARGET=$(grep -m1 '^[[:blank:]]*DEV_GITOWNER=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') + GITOWNER_TARGET=$(sed -n '/^[[:blank:]]*DEV_GITOWNER=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) GITOWNER_TARGET=${GITOWNER_TARGET:-MichaIng} - GITBRANCH_TARGET=$(grep -m1 '^[[:blank:]]*DEV_GITBRANCH=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') + GITBRANCH_TARGET=$(sed -n '/^[[:blank:]]*DEV_GITBRANCH=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) GITBRANCH_TARGET=${GITBRANCH_TARGET:-master} COREVERSION_SERVER=0 @@ -466,7 +467,8 @@ When DietPi applies updates, all system services will be temporarily stopped. Do # - Pre-estimate and override terminal size variables, since they cannot be estimated, if STOUT and STERR are redirected: https://github.com/MichaIng/DietPi/issues/2105 export G_WHIP_SIZE_X_OVERRIDE=$(tput cols) export G_WHIP_SIZE_Y_OVERRIDE=$(tput lines) - Run_Update 2>&1 | tee $FP_TMP_LOG + # - Log to file by redirecting to subshell instead of piping, else G_ERROR_HANDLER cannot exit the script via "kill -INT $$": https://github.com/MichaIng/DietPi/issues/3127 + Run_Update &> >(tee $FP_TMP_LOG); wait $! unset G_WHIP_SIZE_X_OVERRIDE G_WHIP_SIZE_Y_OVERRIDE # Mark 1st run update as completed @@ -488,6 +490,7 @@ When DietPi applies updates, all system services will be temporarily stopped. Do l_message='Syncing new DietPi scripts to disk' G_RUN_CMD /DietPi/dietpi/func/dietpi-ramdisk 1 > /DietPi/.ramdisk + # Start services only on finished install state, else dietpi-software will follow immediately (( $G_DIETPI_INSTALL_STAGE == 2 )) && /DietPi/dietpi/dietpi-services restart fi From a3c8cf05bf3aeebb657ea844d4b3601123ad0807 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 26 Sep 2019 21:54:59 +0200 Subject: [PATCH 171/184] v6.26 + CHANGELOG | DietPi-Update: Resolved an issue where the script did not exit on error --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 335db3e90a..fed3a3522d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -32,6 +32,7 @@ Bug Fixes: - General | Resolved an issue where install of required APT packages for certain scripts could fail in the rare case that APT lists are outdated and old packages are not available in the repo anymore. Many thanks to @Paulisper for reporting this issue: https://github.com/MichaIng/DietPi/issues/2996 - General | Resolved an issue on some Buster systems where console-setup fails on boot to apply keyboard layout and console settings. Many thanks to @jaxjexjox for reporting this issue: https://github.com/MichaIng/DietPi/issues/2912#issuecomment-532100542 - Rock64/RockPro64 | Resolved an issue where DietPi could not obtain the active network adapter and IP, if onboard Ethernet was used. This is because of a kernel-related bug, which seems to cause Ethernet connection instabilities as well in cases. A workaround is applied to all new Rock(Pro)64 images and via DietPi-Update. Many thanks to @svh1985 for reporting this issue, as well as searching and testing the workaround: https://github.com/MichaIng/DietPi/issues/3066 +- DietPi-Update | Resolved an issue where the script did not exit on error: https://github.com/MichaIng/DietPi/issues/3127 - DietPi-Login | Resolved an issue during first run setup, where DietPi-Software was called with mostly wrong whiptail menu dimensions. This lead to info prompts and menus being quite small, in particular the "Install" menu entry, that one needs to select, being only visible when navigating to the bottom. Many thanks to @pbecks1963 for reporting this issue: https://github.com/MichaIng/DietPi/issues/3053 - DietPi-NordVPN | Resolved an issue where the server menu could have wrong entries or even fail, if foreign files were placed inside the config directory. Many thanks to @svh1985 for reporting this issue and implementing a fix: https://github.com/MichaIng/DietPi/pull/3047 - DietPi-Run_NTPD | Resolved an issue where changing time sync mode or mirror, from within time sync error prompt, led to a concurrent script execution. Many thanks to @Sopor for reporting this issue: https://github.com/MichaIng/DietPi/issues/3010 From f563d9c8afab817a34d7ac329c24ff8df9c69a40 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 26 Sep 2019 23:28:16 +0200 Subject: [PATCH 172/184] v6.26 + DietPi-Software | Docker: Prevent install if kernel version got upgraded and old version overwritten or purged. In this case, where /lib/modules/$(uname -r) is missing, certain Docker service start tasks fail, which makes the APT call fail, leading to follow up errors during dietpi-software run. The user must first reboot to load the new kernel. This is mostly an issue on RPi, where kernel packages are not versioned, thus regular "apt-get upgrade" includes kernel upgrades and those overwrite/purge the old kernel module files. --- dietpi/dietpi-software | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index e7c8bcbfae..6e6d59750a 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -171,7 +171,7 @@ _EOF_ fi # If encryption has not yet been done, do it now! - elif GLOBAL_PW=$(grep -m1 '^[[:blank:]]*AUTO_SETUP_GLOBAL_PASSWORD=' /DietPi/dietpi.txt | sed 's/^[^=]*=//'); then + elif GLOBAL_PW=$(sed -n '/^[[:blank:]]*AUTO_SETUP_GLOBAL_PASSWORD=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt); then G_CONFIG_INJECT 'AUTO_SETUP_GLOBAL_PASSWORD=' 'AUTO_SETUP_GLOBAL_PASSWORD=Password has been encrypted and secured on rootFS' /DietPi/dietpi.txt openssl enc -e -a -md sha256 -aes-256-cbc $pbkdf2 -salt -pass pass:'DietPiRocks!' -out /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin <<< $GLOBAL_PW @@ -2199,6 +2199,16 @@ DietPi-Software will decrypt and use it for software installs. You can change it #------------------------------------------------------------------------- # Pre-req software, for items that do NOT have their own array aSOFTWARE_REQUIRES_SOFTWARENAME + # Prevent Docker install if kernel has just been upgraded and old one overwritten/purged: https://github.com/MichaIng/DietPi/issues/3126 + if [[ ${aSOFTWARE_INSTALL_STATE[162]} == 1 && ! -d /lib/modules/$(uname -r) ]]; then + + G_WHIP_MSG '[WARNING] Docker install will be deselected\n +It seems that your kernel version has just been upgraded. The mismatch between loaded and installed kernel versions would cause a failure during Docker install.\n +Please reselect Docker from dietpi-software after next reboot.' + aSOFTWARE_INSTALL_STATE[162]=0 + + fi + # Nextcloud extensions # - Nextcloud Talk software_id=114 @@ -5679,10 +5689,9 @@ If you want to update ${aSOFTWARE_NAME[$software_id]}, please use it's internal Banner_Installing + # Offical installer INSTALL_URL_ADDRESS='https://get.docker.com' G_CHECK_URL "$INSTALL_URL_ADDRESS" - - # Offical Docker installer wget "$INSTALL_URL_ADDRESS" -O DockerInstall.sh chmod +x DockerInstall.sh G_ERROR_HANDLER_COMMAND='./DockerInstall.sh' @@ -5691,6 +5700,7 @@ If you want to update ${aSOFTWARE_NAME[$software_id]}, please use it's internal do ./DockerInstall.sh + G_ERROR_HANDLER_EXITCODE=$? G_ERROR_HANDLER done From 3fd544aafc7ffba6a1586dc3e019cc9b45b02136 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 29 Sep 2019 17:06:15 +0200 Subject: [PATCH 173/184] v6.26 + DietPi-Software | For 3rd-party APT repos, if no Bullseye repo is available yet, apply Buster repo instead --- dietpi/dietpi-software | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 6e6d59750a..b48c34c397 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -1350,7 +1350,8 @@ DietPi-Software will decrypt and use it for software installs. You can change it aSOFTWARE_DESC[$software_id]='Build, ship, and run distributed applications' aSOFTWARE_CATEGORY_INDEX[$software_id]=9 aSOFTWARE_TYPE[$software_id]=0 - + # - Bullseye + aSOFTWARE_AVAIL_G_DISTRO[$software_id,6]=0 # Remote Access #-------------------------------------------------------------------------------- software_id=67 @@ -3636,8 +3637,8 @@ _EOF_ [[ -f '/etc/mopidy/mopidy.conf' ]] || dps_index=$software_id Download_Install 'mopidy.conf' /etc/mopidy/mopidy.conf curl -sSL "$INSTALL_URL_ADDRESS" | apt-key add - - # No Buster list available yet, use stretch.list always instead - wget https://apt.mopidy.com/stretch.list -O /etc/apt/sources.list.d/mopidy.list + # No bullseye.list available yet, use buster.list instead + wget https://apt.mopidy.com/${G_DISTRO_NAME/bullseye/buster}.list -O /etc/apt/sources.list.d/mopidy.list G_AGUP G_AGI mopidy gstreamer1.0-alsa @@ -4447,7 +4448,8 @@ _EOF_ G_CHECK_URL "$INSTALL_URL_ADDRESS" curl -sSL "$INSTALL_URL_ADDRESS" | apt-key add - - echo "deb https://repos.influxdata.com/debian/ $G_DISTRO_NAME stable" > /etc/apt/sources.list.d/influxdb.list + # Use Buster branch on Bullseye + echo "deb https://repos.influxdata.com/debian/ ${G_DISTRO_NAME/bullseye/buster} stable" > /etc/apt/sources.list.d/influxdb.list G_AGUP G_AGI influxdb @@ -6474,17 +6476,16 @@ Mycroft AI requires at least 2 GiB memory on first start. We will now increase y apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF # On RPi use separate Raspbian repo: https://github.com/MichaIng/DietPi/issues/1023 + # Use Buster branch on Bullseye if (( $G_HW_MODEL < 10 )); then - echo "deb https://download.mono-project.com/repo/debian/ raspbian$G_DISTRO_NAME main" > /etc/apt/sources.list.d/mono-xamarin.list + echo "deb https://download.mono-project.com/repo/debian/ raspbian${G_DISTRO_NAME/bullseye/buster} main" > /etc/apt/sources.list.d/mono-xamarin.list else - echo "deb https://download.mono-project.com/repo/debian/ $G_DISTRO_NAME main" > /etc/apt/sources.list.d/mono-xamarin.list + echo "deb https://download.mono-project.com/repo/debian/ ${G_DISTRO_NAME/bullseye/buster} main" > /etc/apt/sources.list.d/mono-xamarin.list fi - # - Buster: Revert to Stretch, since Buster is not yet available - sed -i 's/buster/stretch/g' /etc/apt/sources.list.d/mono-xamarin.list G_AGUP G_AGI mono-runtime mono-complete @@ -13601,13 +13602,8 @@ _EOF_ Banner_Uninstalling G_AGP emby-server embymagick - # - Pre v6.15 - if [[ -f '/etc/apt/sources.list.d/emby-server.list' ]]; then - - rm /etc/apt/sources.list.d/emby-server.list - G_AGUP - - fi + # Pre v6.15 + [[ -f '/etc/apt/sources.list.d/emby-server.list' ]] && rm /etc/apt/sources.list.d/emby-server.list fi @@ -13866,7 +13862,6 @@ _EOF_ Banner_Uninstalling G_AGP raspotify [[ -f '/etc/apt/sources.list.d/raspotify.list' ]] && rm /etc/apt/sources.list.d/raspotify.list - G_AGUP fi From 6f14fc0b8a77bfab1d46c65d8ebadd38d6b3c4bd Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 29 Sep 2019 17:08:34 +0200 Subject: [PATCH 174/184] v6.26 + DietPi-Patch | Mono: Use new Buster repo on Buster/Bullseye systems --- dietpi/patch_file | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dietpi/patch_file b/dietpi/patch_file index e77cd71548..12a3adab93 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -2301,6 +2301,8 @@ Would you like to switch back to the Nginx authentication method now?' && certbo fi # WireGuard: Enable auto-rebuild after kernel upgrades on RPi (( $G_HW_MODEL < 10 )) && command -v wg &> /dev/null && grep -q '^aSOFTWARE_INSTALL_STATE\[172\]=2' /DietPi/dietpi/.installed && echo -e '#!/bin/dash\ndpkg-reconfigure wireguard-dkms' > /etc/kernel/postinst.d/dietpi-wireguard + # Mono: Use new Buster repo on Buster/Bullseye systems + (( $G_DISTRO > 4 )) && [[ -f '/etc/apt/sources.list.d/mono-xamarin.list' ]] && sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/mono-xamarin.list # Webmin: https://github.com/MichaIng/DietPi/commit/ec55d49a488fd9cb1dbb18cbfa067b5d1d1a974e /DietPi/dietpi/dietpi-software reinstall 115 From b1e67f43acb60d3bc46254b3e600c83ccbea6c4a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 29 Sep 2019 18:18:09 +0200 Subject: [PATCH 175/184] v6.26 + DietPi-Globals | Minor coding --- dietpi/func/dietpi-globals | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index e4991f3bc9..9969deab76 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -1801,7 +1801,7 @@ $logfile_content # PS (inaccurate, but fast??) local cpu_usage=0 - while read line + while read -r line do cpu_usage=$(bc -l <<< "scale=1;$cpu_usage + $line") @@ -1924,28 +1924,23 @@ $logfile_content # 0=ok G_CHECK_USERDATA(){ - return_value=0 - + local return_value=0 local fp_actual=$G_FP_DIETPI_USERDATA - #Symlinked? + # Symlinked? if [[ -L $G_FP_DIETPI_USERDATA ]]; then - # - Check psyhical location exists and is mounted + # Check psyhical location exists and is mounted fp_actual=$(readlink -f $G_FP_DIETPI_USERDATA) - if ! df -P $fp_actual &> /dev/null; then - - return_value=1 - - fi + df -P $fp_actual &> /dev/null || return_value=1 fi G_DIETPI-NOTIFY $return_value "DietPi-Userdata validation: $fp_actual" - if (( $return_value >= 1 )); then + if (( $return_value )); then - G_WHIP_MSG "Error: DietPi-Userdata validation\n\nDietPi was unable to verify the existance of the userdata directory ($fp_actual).\n\nPlease ensure all previous external drives are connected and functional, before trying again.\n\nUnable to continue, exiting." - kill -INT $$ #kill all current scripts, excluding shell. + G_WHIP_MSG "[FAILED] DietPi-Userdata validation\n\nDietPi was unable to verify the existance of the userdata directory ($fp_actual).\n\nPlease ensure all previous external drives are connected and functional, before trying again.\n\nUnable to continue, exiting." + kill -INT $$ # kill all current scripts, excluding shell fi @@ -1966,7 +1961,7 @@ $logfile_content local exit_code=$? G_DIETPI-NOTIFY -1 $exit_code 'DietPi-Backup' - if (( $exit_code != 0 )); then + if (( $exit_code )); then # - Kill current scripts, excluding shell G_WHIP_MSG 'DietPi-Backup was unable to complete sucessfully. To avoid issues, the current program will now be terminated.\n - logfile = /var/log/dietpi-backup.log' From adc80406d04c03d35c28eaa8abeca6756f5341fc Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 29 Sep 2019 18:22:43 +0200 Subject: [PATCH 176/184] v6.26 + DietPi-Update | Minor: Remove unused variable --- dietpi/dietpi-update | 3 --- 1 file changed, 3 deletions(-) diff --git a/dietpi/dietpi-update b/dietpi/dietpi-update index 616e86a391..1a77ad79cb 100644 --- a/dietpi/dietpi-update +++ b/dietpi/dietpi-update @@ -46,7 +46,6 @@ SERVER_ONLINE=0 UPDATE_AVAILABLE=0 - UPDATE_REQUIRESNEWIMAGE=0 RUN_UPDATE=0 GITOWNER_TARGET=$(sed -n '/^[[:blank:]]*DEV_GITOWNER=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt) @@ -159,8 +158,6 @@ If this error persists, please report at: https://github.com/MichaIng/DietPi/iss # Update requires new image if (( $DIETPIUPDATE_VERSION_CORE < $COREVERSION_SERVER )); then - UPDATE_REQUIRESNEWIMAGE=1 - # Write "-1" to flag file for DietPi-Banner to show info about required new image echo '-1' > /DietPi/dietpi/.update_available From 1644b012a010d14314a9bc722c262fa97b8b05e0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 29 Sep 2019 18:34:58 +0200 Subject: [PATCH 177/184] v6.26 + DietPi-Software | Minor coding and fix wrong variable call --- dietpi/dietpi-software | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index b48c34c397..7293cc71b8 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -5628,7 +5628,7 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=bullseye\nPin- G_WHIP_MSG "[WARNING] Existing install found\n The ${aSOFTWARE_NAME[$software_id]} target install directory $G_FP_DIETPI_USERDATA/roonserver already exists. This will not be overwritten.\n -If the existing instance is broken or obsolete, please manually backup config files and data, then remove this directory and rerun "dietpi-software".\n +If the existing instance is broken or obsolete, please manually backup config files and data, then remove this directory and rerun \"dietpi-software\".\n If you want to update ${aSOFTWARE_NAME[$software_id]}, please use it's internal updater." fi @@ -7258,7 +7258,7 @@ Redirect permanent /.well-known/caldav /owncloud/remote.php/dav' > /etc/apache2/ # Move ownCloud configuration file in place and activate it owncloud_conf='/etc/lighttpd/conf-available/99-dietpi-owncloud.conf' - if [[ -f $owncloud ]]; then + if [[ -f $owncloud_conf ]]; then owncloud_conf+='.dietpi-new' G_WHIP_MSG "Existing ownCloud Lighttpd configuration found, will preserve the old one and save the new one for review and comparison to: $nextcloud_conf" @@ -14897,7 +14897,6 @@ _EOF_ if G_WHIP_INPUTBOX 'Please enter a software title/index to search (eg: desktop/cloud/media/torrent)'; then G_WHIP_CHECKLIST_ARRAY=() - local item_found=0 search_string=$G_WHIP_RETURNED_VALUE for i in ${!aSOFTWARE_NAME[@]} do @@ -14926,7 +14925,7 @@ _EOF_ done - (( ! $display_software_menu )) && G_WHIP_MSG "Search was unable to find any items for '$search_string'" + (( $display_software_menu )) || G_WHIP_MSG "Search was unable to find any items for '$search_string'" fi From c2844170a83e695aded030bf2159de7cfefe8a24 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 29 Sep 2019 18:35:51 +0200 Subject: [PATCH 178/184] v6.26 + DietPi-Cleaner | Fix wrong variable call --- dietpi/dietpi-cleaner | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-cleaner b/dietpi/dietpi-cleaner index 83d9e8bd17..57f4fb74e9 100644 --- a/dietpi/dietpi-cleaner +++ b/dietpi/dietpi-cleaner @@ -128,7 +128,7 @@ Further information:\n - https://dietpi.com/phpbb/viewtopic.php?f=8&t=5&p=623#p6 else - G_WHIP_MSG "$_PROGRAM_NAME could not be run as there are no enabled cleaners. Please go to cleaners, then select which you would like to enable." + G_WHIP_MSG "$G_PROGRAM_NAME could not be run as there are no enabled cleaners. Please go to cleaners, then select which you would like to enable." fi From a259f53e5f66e89f915a4f61aced3643955e53df Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 29 Sep 2019 18:51:01 +0200 Subject: [PATCH 179/184] v6.26 + DietPi-Backup | Fix wrong variable call, minor coding, wording and alignment --- dietpi/dietpi-backup | 178 +++++++++++++++++-------------------------- 1 file changed, 70 insertions(+), 108 deletions(-) diff --git a/dietpi/dietpi-backup b/dietpi/dietpi-backup index e0f5556c3e..8ea0daf79a 100644 --- a/dietpi/dietpi-backup +++ b/dietpi/dietpi-backup @@ -9,7 +9,7 @@ #//////////////////////////////////// # # Info: - # - filename /DietPi/dietpi/dietpi-backup + # - Filename: /{DietPi,boot}/dietpi/dietpi-backup # - Allows for a complete system back and restore of the linux filesystem (/) # # Usage: @@ -22,24 +22,19 @@ # - /DietPi/dietpi/dietpi-backup 1 /mnt/MyDirectoryTarget = Backup #//////////////////////////////////// - #Import DietPi-Globals --------------------------------------------------------------- + # Import DietPi-Globals -------------------------------------------------------------- . /DietPi/dietpi/func/dietpi-globals G_PROGRAM_NAME='DietPi-Backup' G_CHECK_ROOT_USER G_CHECK_ROOTFS_RW G_INIT - #Import DietPi-Globals --------------------------------------------------------------- + # Import DietPi-Globals -------------------------------------------------------------- - G_EXIT_CUSTOM(){ + # Cleaup left over tmp files + G_EXIT_CUSTOM(){ [[ -f $FP_FILTER_INCLUDE_EXCLUDE ]] && rm $FP_FILTER_INCLUDE_EXCLUDE; } - # Cleaup left over tmp files - [[ -f $FP_FILTER_INCLUDE_EXCLUDE ]] && rm $FP_FILTER_INCLUDE_EXCLUDE - - } - - #Grab Input - INPUT=0 - disable_error=1 G_CHECK_VALIDINT "$1" && INPUT=$1 + # Grab Input + disable_error=1 G_CHECK_VALIDINT "$1" && INPUT=$1 || INPUT=0 #///////////////////////////////////////////////////////////////////////////////////// # Backup System @@ -48,19 +43,19 @@ FP_LOG='/var/log/dietpi-backup.log' - #Backup Filepaths + # Backup Filepaths FP_SOURCE='/' FP_TARGET_BACKUP='/mnt/dietpi-backup' G_FP_DIETPI_USERDATA_ACTUAL=$(readlink -f /mnt/dietpi_userdata) - #file applied to successful backups (stored in "$FP_TARGET_BACKUP/$BACKUP_STATS_FILENAME" + # File applied to successful backups (stored in "$FP_TARGET_BACKUP/$BACKUP_STATS_FILENAME" BACKUP_STATS_FILENAME='.dietpi-backup_stats' - #Exclude/include file + # Exclude/include file FP_FILTER_INCLUDE_EXCLUDE='/tmp/.dietpi-backup_filter_inc_exc' FP_USER_FILTER_INCLUDE_EXCLUDE_BACKUP='/DietPi/dietpi/.dietpi-backup_inc_exc' - #Supported filesystems + # Supported filesystems TARGET_FILESYSTEM_TYPE=0 TARGET_DIRECTORY_SUPPORTED=0 aSUPPORTED_FILESYSTEMS=( @@ -74,19 +69,19 @@ ) - #rsync options + # rsync options RSYNC_RUN_OPTIONS_BACKUP="-aH --info=name0 --info=progress2 --delete --delete-excluded --exclude-from=$FP_FILTER_INCLUDE_EXCLUDE" RSYNC_RUN_OPTIONS_RESTORE="-aH --info=name0 --info=progress2 --delete-after --exclude-from=$FP_FILTER_INCLUDE_EXCLUDE" RSYNC_LOGGING_OPTIONS="-v --log-file=$FP_LOG" - #Date format for logs + # Date format for logs Print_Date(){ echo "$(date +"%d-%m-%Y %H:%M")"; } Create_Filter_Include_Exclude(){ - #Default - Include/Exclude + # Default - Include/Exclude cat << _EOF_ > $FP_FILTER_INCLUDE_EXCLUDE -#Global - Folders +# Global - Dirs - $FP_TARGET_BACKUP/ + $G_FP_DIETPI_USERDATA_ACTUAL/ + $G_FP_DIETPI_USERDATA/ @@ -99,14 +94,14 @@ - /tmp/ - /run/ -#Apt package cache (.deb) +# APT package cache (.deb) - /var/cache/apt/archives/ -#Manpages / Docs +# Manpages / Docs - /usr/share/man/ - /usr/share/doc/ -#Global - Files +# Global - Files - /var/swap - .swap* - $FP_LOG @@ -115,32 +110,24 @@ - fake-hwclock.data - *.tmp -#MS Windows specific +# MS Windows specific - Thumbs.db - desktop.ini _EOF_ - # - Add users filter list - if [[ -f $FP_USER_FILTER_INCLUDE_EXCLUDE_BACKUP ]]; then - - cat $FP_USER_FILTER_INCLUDE_EXCLUDE_BACKUP >> $FP_FILTER_INCLUDE_EXCLUDE - - fi + # Add users filter list + [[ -f $FP_USER_FILTER_INCLUDE_EXCLUDE_BACKUP ]] && cat $FP_USER_FILTER_INCLUDE_EXCLUDE_BACKUP >> $FP_FILTER_INCLUDE_EXCLUDE } Services_Stop(){ /DietPi/dietpi/dietpi-services stop - killall -w rsync &> /dev/null # :https://github.com/MichaIng/DietPi/issues/1869#issuecomment-400036370 + killall -w rsync &> /dev/null # https://github.com/MichaIng/DietPi/issues/1869#issuecomment-400036370 } - Services_Start(){ - - /DietPi/dietpi/dietpi-services start - - } + Services_Start(){ /DietPi/dietpi/dietpi-services start; } Run_Backup(){ @@ -148,33 +135,33 @@ _EOF_ G_DIETPI-NOTIFY 3 "$G_PROGRAM_NAME" "$RSYNC_MODE_TEXT" - #Check valid FS + # Check valid FS Check_Supported_Directory_Location - #Filesystem supported + # Filesystem supported if (( $TARGET_DIRECTORY_SUPPORTED )); then Services_Stop - #Generate target dir. + # Generate target dir. mkdir -p "$FP_TARGET_BACKUP" - #Error: Unable to create target folder. + # Error: Unable to create target folder. if [[ ! -d $FP_TARGET_BACKUP ]]; then G_WHIP_MSG "$RSYNC_MODE_TEXT Failed:\n\nUnable to create $FP_TARGET_BACKUP" - #Error: Rsync is already running + # Error: Rsync is already running elif pgrep 'rsync' &> /dev/null; then Error_Rsync_Already_Running else - #Start Backup + # Start Backup echo -e "DietPi-Backup Log File. $(date +"%d-%m-%Y_%H%M")\n\n" > $FP_LOG - #Generate Exclude/Include lists + # Generate Exclude/Include lists Create_Filter_Include_Exclude while : @@ -227,14 +214,14 @@ _EOF_ fi - # - done + # Done break done log=1 G_WHIP_VIEWFILE $FP_LOG - #return to main menu + # Return to main menu TARGETMENUID=0 fi @@ -251,15 +238,15 @@ _EOF_ G_DIETPI-NOTIFY 3 "$G_PROGRAM_NAME" "$RSYNC_MODE_TEXT" - #Check valid FS + # Check valid FS Check_Supported_Directory_Location - #Filesystem supported + # Filesystem supported if (( $TARGET_DIRECTORY_SUPPORTED )); then Services_Stop - #Error: Backup not found + # Error: Backup not found if [[ ! -f $FP_TARGET_BACKUP/$BACKUP_STATS_FILENAME ]]; then G_DIETPI-NOTIFY 2 "No Backup was found in $FP_TARGET_BACKUP" @@ -267,15 +254,15 @@ _EOF_ G_WHIP_MSG "$RSYNC_MODE_TEXT Failed:\n\n$FP_TARGET_BACKUP/$BACKUP_STATS_FILENAME does not exist\n\nHave you created a backup?" - #Error: Rsync is already running + # Error: Rsync is already running elif pgrep 'rsync' &> /dev/null; then Error_Rsync_Already_Running - #Restore + # Restore else - #Generate Exclude/Include lists + # Generate Exclude/Include lists Create_Filter_Include_Exclude G_DIETPI-NOTIFY 2 "$RSYNC_MODE_TEXT $FP_TARGET_BACKUP: in progress, please wait..." @@ -297,7 +284,7 @@ _EOF_ log=1 G_WHIP_VIEWFILE $FP_LOG - # - done + # Done TARGETMENUID=0 fi @@ -320,10 +307,10 @@ _EOF_ Error_DietpiUserdata_Directory - #Check location contains /mnt/ + # Check location contains /mnt/ elif [[ $FP_TARGET_BACKUP == '/mnt/'* ]]; then - #Generate the target directory if it doesnt exist. So we can check what filesystem it will be. + # Generate the target directory if it doesnt exist. So we can check what filesystem it will be. local directory_generated=0 if [[ ! -d $FP_TARGET_BACKUP ]]; then @@ -332,7 +319,7 @@ _EOF_ fi - TARGET_FILESYSTEM_TYPE=$(df -T $FP_TARGET_BACKUP | sed -n 2p | mawk '{print $2}') + TARGET_FILESYSTEM_TYPE=$(df -T $FP_TARGET_BACKUP | mawk 'NR == 2 {print $2}') for ((i=0; i<${#aSUPPORTED_FILESYSTEMS[@]}; i++)) do @@ -345,21 +332,13 @@ _EOF_ done - #Delete directory if tested - if (( $directory_generated )); then - - rm -R "$FP_TARGET_BACKUP" - - fi - - #Not ext2/3/4 - if (( ! $TARGET_DIRECTORY_SUPPORTED )); then + # Delete directory if tested + (( $directory_generated )) && rm -R "$FP_TARGET_BACKUP" - Error_Filesystem_Not_Supported + # Not ext2/3/4 + (( $TARGET_DIRECTORY_SUPPORTED )) || Error_Filesystem_Not_Supported - fi - - #Not inside /mnt + # Not inside /mnt else Error_Not_Mnt_Directory @@ -371,22 +350,11 @@ _EOF_ #///////////////////////////////////////////////////////////////////////////////////// # Settings File #///////////////////////////////////////////////////////////////////////////////////// - #Settings File FP_DIETPIBACKUP_SETTINGS='/DietPi/dietpi/.dietpi-backup_settings' - Write_Settings_File(){ - - cat << _EOF_ > $FP_DIETPIBACKUP_SETTINGS -FP_TARGET_BACKUP=$FP_TARGET_BACKUP -_EOF_ - - } - - Read_Settings_File(){ - - [[ -f $FP_DIETPIBACKUP_SETTINGS ]] && . $FP_DIETPIBACKUP_SETTINGS + Write_Settings_File(){ echo "FP_TARGET_BACKUP=$FP_TARGET_BACKUP" > $FP_DIETPIBACKUP_SETTINGS; } - } + Read_Settings_File(){ [[ -f $FP_DIETPIBACKUP_SETTINGS ]] && . $FP_DIETPIBACKUP_SETTINGS; } #///////////////////////////////////////////////////////////////////////////////////// # MENUS @@ -394,9 +362,9 @@ _EOF_ MENU_LASTITEM='' TARGETMENUID=0 - EXIT_CODE=-1 #Used for 1 time automated running only (eg: G_PROMPT_BACKUP) + EXIT_CODE=-1 # Used for 1 time automated running only (eg: G_PROMPT_BACKUP) - #TARGETMENUID=0 + # TARGETMENUID=0 Menu_Main(){ local backup_last_completed='Backup not found. Please create one.' @@ -439,31 +407,25 @@ _EOF_ 'Help') - G_WHIP_MSG "DietPi-Backup is a program that allows you to Backup and Restore your DietPi system.\n\nIf you have broken your system, or want to reset your system to an earlier date, this can all be done with DietPi-Backup.\n\nSimply choose a location where you want to save and restore your backups from, then, select Backup or Restore.\n\nMore information:\n - https://dietpi.com/phpbb/viewtopic.php?f=8&t=5&p=256#p255" + G_WHIP_MSG "DietPi-Backup is a program that allows you to Backup and Restore your DietPi system.\n\nIf you have broken your system, or want to reset your system to an earlier date, this can all be done with DietPi-Backup.\n\nSimply choose a location where you want to save and restore your backups from, then, select Backup or Restore.\n\nMore information:\n - https://dietpi.com/phpbb/viewtopic.php?p=255#p255" ;; 'Delete') - if G_WHIP_YESNO "Do you wish to DELETE the following backup?\n - $FP_TARGET_BACKUP"; then - - rm -R "$FP_TARGET_BACKUP" - - fi + G_WHIP_YESNO "Do you wish to DELETE the following backup?\n - $FP_TARGET_BACKUP" && rm -R "$FP_TARGET_BACKUP" ;; 'Backup') - G_WHIP_YESNO "The $text_start_mode_desc will be backed up to:\n$FP_TARGET_BACKUP\n\nDo you wish to continue and start the backup?" - (( $? == 0 )) && Run_Backup + G_WHIP_YESNO "The system will be backed up to:\n - $FP_TARGET_BACKUP\n\nDo you wish to continue and start the backup?" && Run_Backup ;; 'Restore') - G_WHIP_YESNO "The $text_start_mode_desc will be restored from:\n$FP_TARGET_BACKUP\n\nDo you wish to continue and start the restore?" - (( $? == 0 )) && Run_Restore + G_WHIP_YESNO "The system will be restored from:\n - $FP_TARGET_BACKUP\n\nDo you wish to continue and start the restore?" && Run_Restore ;; @@ -489,7 +451,7 @@ _EOF_ } - #TARGETMENUID=1 + # TARGETMENUID=1 Menu_Set_Directory(){ local current_directory=$FP_TARGET_BACKUP @@ -513,11 +475,11 @@ _EOF_ echo -e "\n\nSearching /mnt/* for previous backups, please wait... \n \n" find /mnt -type f -name "$BACKUP_STATS_FILENAME" > $fp_search_results - #Do we have any results? + # Do we have any results? if (( $(wc -l < $fp_search_results) )); then readarray search_results_list < $fp_search_results - #Create List for Whiptail + # Create List for Whiptail G_WHIP_MENU_ARRAY=() for ((i=0; i<${#search_results_list[@]}; i++)) do @@ -534,7 +496,7 @@ _EOF_ fi - #delete[] array + # delete[] array unset search_results_list [[ -f $fp_search_results ]] && rm $fp_search_results @@ -566,7 +528,7 @@ _EOF_ else - #Return to main menu + # Return to main menu TARGETMENUID=0 fi @@ -625,28 +587,28 @@ _EOF_ #///////////////////////////////////////////////////////////////////////////////////// # Main Loop #///////////////////////////////////////////////////////////////////////////////////// - #pre-reqs, install if required. + # pre-reqs, install if required. G_AG_CHECK_INSTALL_PREREQ rsync - #Read settings file + # Read settings file Read_Settings_File # $2 Optional directory input. [[ $2 ]] && FP_TARGET_BACKUP=$2 - #Create user inc/exc templates + # Create user inc/exc templates # - Add users filter list if [[ ! -f $FP_USER_FILTER_INCLUDE_EXCLUDE_BACKUP ]]; then cat << _EOF_ > $FP_USER_FILTER_INCLUDE_EXCLUDE_BACKUP -#$_PROGRAM_NAME | Custom include/exclude filters +# $G_PROGRAM_NAME | Custom include/exclude filters # -#To INCLUDE (+) a file/folder: +# To INCLUDE (+) a file/folder: # NB: dietpi_userdata is included by default, as well, if moved to a custom location. #+ /location/to/my/file #+ /location/to/my/directory/ # -#To EXCLUDE (-) a file/folder: +# To EXCLUDE (-) a file/folder: # NB: To exclude from a custom located dietpi_userdata, you need to add its symlinked path: /mnt/dietpi_userdata/excludeThis #- /location/to/my/file #- /location/to/my/directory/ @@ -656,18 +618,18 @@ _EOF_ fi #----------------------------------------------------------------------------- - #Run Backup + # Run Backup if (( $INPUT == 1 )); then Run_Backup - #Run Restore + # Run Restore elif (( $INPUT == -1 )); then Run_Restore #----------------------------------------------------------------------------- - #Run menu + # Run menu else while (( $TARGETMENUID > -1 )); do @@ -686,7 +648,7 @@ _EOF_ done - #Save settings + # Save settings Write_Settings_File fi From b859e36e9bd89e0d94b9d7c885f9e452d4b0ef98 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 29 Sep 2019 19:16:23 +0200 Subject: [PATCH 180/184] v6.26 + DietPi-Config | Remove unused variables --- dietpi/dietpi-config | 46 ++++++++++++++------------------------------ 1 file changed, 14 insertions(+), 32 deletions(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 8854afab2f..f7e8c64e0c 100644 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -2172,7 +2172,6 @@ Current setting: $user_frequency_min_text" && G_CONFIG_INJECT 'CONFIG_CPU_MIN_FR WIFI_MODE=1 #0=static 1=dhcp WIFI_MODE_TARGET=0 WIFI_SSID_CURRENT='' - WIFI_CRED_INDEX=0 WIFI_BITRATE=0 WIFI_SIGNALSTRENGTH=0 @@ -2604,7 +2603,6 @@ Save all changes and restart networking?\n\nNB: All WiFi connections will be dro WIFI_MODE_TARGET=$WIFI_MODE command -v iwgetid &> /dev/null && WIFI_SSID_CURRENT=$(iwgetid -r) [[ $WIFI_SSID_CURRENT ]] || WIFI_SSID_CURRENT='Disconnected / No SSID' - WIFI_CRED_INDEX=0 # Which index of SSID/KEY etc we are editing # Get extra WiFi stats WIFI_BITRATE=0 @@ -2980,17 +2978,13 @@ Would you like to disable WiFi? \n - (NOTICE) Connections may drop!'; then TARGETMENUID=8 - # - Get current Mode details - local mode_current='DHCP' - (( $ETH_MODE == 0 )) && mode_current='STATIC' - - # - Target Details - local mode_target='DHCP' - (( $ETH_MODE_TARGET == 0 )) && mode_target='STATIC' + # - Mode + local mode_text='DHCP' + (( $ETH_MODE_TARGET == 0 )) && mode_text='STATIC' G_WHIP_MENU_ARRAY=('' '●─ DHCP/STATIC IP ') - G_WHIP_MENU_ARRAY+=('Change Mode' ": [$mode_target]") + G_WHIP_MENU_ARRAY+=('Change Mode' ": [$mode_text]") # - show static options if (( $ETH_MODE_TARGET == 0 )); then @@ -3094,9 +3088,8 @@ Would you like to disable WiFi? \n - (NOTICE) Connections may drop!'; then TARGETMENUID=8 - Net_Update_UsageStats wlan$ETH_DEV_INDEX + Net_Update_UsageStats wlan$WIFI_DEV_INDEX - local whip_options_total=0 local description_text="WiFi Details:\nUsage : Sent = $NET_TX_MB | Recieved = $NET_RX_MB\n" G_WHIP_MENU_ARRAY=('' '●─ Basic Options ') @@ -3144,13 +3137,9 @@ Would you like to disable WiFi? \n - (NOTICE) Connections may drop!'; then # WiFi Menu else - # - Get current Mode details - local mode_current='DHCP' - (( $WIFI_MODE )) || mode_current='STATIC' - - # - Target Details - local mode_target='DHCP' - (( $WIFI_MODE_TARGET )) || mode_target='STATIC' + # - Mode + local mode_text='DHCP' + (( $WIFI_MODE_TARGET )) || mode_text='STATIC' G_WHIP_MENU_ARRAY+=('Scan' ': Scan and configure SSID') @@ -3170,7 +3159,7 @@ Would you like to disable WiFi? \n - (NOTICE) Connections may drop!'; then fi G_WHIP_MENU_ARRAY+=('' '●─ DHCP/STATIC IP ') - G_WHIP_MENU_ARRAY+=('Change Mode' ": [$mode_target]") + G_WHIP_MENU_ARRAY+=('Change Mode' ": [$mode_text]") # - show static options if (( $WIFI_MODE_TARGET == 0 )); then @@ -3252,7 +3241,7 @@ Would you like to disable WiFi? \n - (NOTICE) Connections may drop!'; then 'Channel') - #2.4ghz only atm + # 2.4ghz only atm local channel_mhz=2412 local channel_min=1 local channel_max=13 @@ -4246,21 +4235,14 @@ The following will now be applied:\n - CPU gov = Powersave\n - HDMI output = Dis # No-IP Client local noip_installed=0 - local noip_status='Not Installed' - local noip_menutext='Install No-IP now' + local noip_menutext='[Not Installed] Install No-IP now' if (( ${aSOFTWARE_INSTALL_STATE[67]:=0} == 2 )); then noip_installed=1 - noip_status='Offline - Please enter No-IP details' - noip_menutext='Enter/Setup No-IP details' + noip_menutext='[Offline] Enter/Setup No-IP details' # Check if No-IP is running (indicates login details are valid) - if pgrep '/usr/local/bin/noip2' &> /dev/null; then - - noip_status='Online / Active' - noip_menutext='Change No-IP details' - - fi + pgrep '/usr/local/bin/noip2' &> /dev/null && noip_menutext='[Online] Change No-IP details' fi @@ -4307,7 +4289,7 @@ The following will now be applied:\n - CPU gov = Powersave\n - HDMI output = Dis ) - if G_WHIP_MENU ''; then + if G_WHIP_MENU; then TARGETMENUID=16 # Return to this menu From 86685fa3e8e07498945ea4907294f523d00ff75f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 29 Sep 2019 19:33:00 +0200 Subject: [PATCH 181/184] v6.26 + DietPi-Set_hardware | Reorder Allo.com audio devices, so allo-* does not match before allo-cheapo* and allo-piano-dac* --- dietpi/func/dietpi-set_hardware | 141 ++++++++++++++++---------------- 1 file changed, 71 insertions(+), 70 deletions(-) diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 11c3130fff..bdebbb172a 100644 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -1860,6 +1860,54 @@ _EOF_ ;; + # --------------- Sparky SBC ------------ + # Allo Piano DAC (firmware + module) + # snd-soc-allo-piano-dac + # snd-soc-allo-piano-dac-plus (2.1) + snd-soc-allo-piano-dac*) + + if [[ ! -d '/lib/firmware/allo' ]]; then + + INSTALL_URL_ADDRESS='https://raw.githubusercontent.com/sparky-sbc/sparky-test/master/piano-firmware/piano-firmware.tar' + G_CHECK_URL "$INSTALL_URL_ADDRESS" + wget "$INSTALL_URL_ADDRESS" -O package.tar + tar -xvf package.tar -C /lib/ + rm package.tar + + fi + + G_CONFIG_INJECT "$INPUT_DEVICE_VALUE" "$INPUT_DEVICE_VALUE" /etc/modules + modprobe $INPUT_DEVICE_VALUE + SOUNDCARD_TARGET_CARD=1 + SOUNDCARD_TARGET_DEVICE=0 + amixer -c 0 sset 'audio output mode switch' 'i2s' + + ;; + + # Allo Cheapo + # allo-cheapo-analogue # 3.5mm/RCA + # allo-cheapo-optical # Optical out + allo-cheapo*) + + SOUNDCARD_TARGET_CARD=0 + SOUNDCARD_TARGET_DEVICE=0 + + # - Vol + amixer –c 0 set 'DAC PA' 35 + + if [[ $INPUT_DEVICE_VALUE == 'allo-cheapo-analogue' ]]; then + + amixer -c 0 sset 'audio output mode switch' 'i2s' + + else + + amixer -c 0 sset 'audio output mode switch' 'spdif' + SOUNDCARD_TARGET_DEVICE=2 + + fi + + ;; + # --------------- RPi ------------------- # Onboard # rpi-bcm2835-auto @@ -1888,6 +1936,29 @@ _EOF_ ;; + # Allo Piano DAC (firmware + dtoverlay) + # allo-piano-dac-pcm512x-audio + # allo-piano-dac-plus-pcm512x-audio (2.1) + allo-piano-dac*) + + if [[ ! -d '/lib/firmware/allo' ]]; then + + INSTALL_URL_ADDRESS='https://github.com/allocom/piano-firmware/archive/master.zip' + G_CHECK_URL "$INSTALL_URL_ADDRESS" + wget "$INSTALL_URL_ADDRESS" -O package.zip + unzip -o package.zip + rm package.zip + mkdir -p /lib/firmware + mv piano-firmware-master/lib/firmware/allo /lib/firmware/ + rm -R piano-firmware-master + + fi + + G_CONFIG_INJECT "dtoverlay=$INPUT_DEVICE_VALUE" "dtoverlay=$INPUT_DEVICE_VALUE" $FP_RPI_CONFIG + dtoverlay $INPUT_DEVICE_VALUE + + ;; + # dtoverlay # hifiberry-dac # hifiberry-dacplus @@ -1924,76 +1995,6 @@ _EOF_ ;; - # Allo Piano DAC (firmware + dtoverlay) - # allo-piano-dac-pcm512x-audio - # allo-piano-dac-plus-pcm512x-audio (2.1) - allo-piano-dac*) - - if [[ ! -d '/lib/firmware/allo' ]]; then - - INSTALL_URL_ADDRESS='https://github.com/allocom/piano-firmware/archive/master.zip' - G_CHECK_URL "$INSTALL_URL_ADDRESS" - wget "$INSTALL_URL_ADDRESS" -O package.zip - unzip -o package.zip - rm package.zip - mkdir -p /lib/firmware - mv piano-firmware-master/lib/firmware/allo /lib/firmware/ - rm -R piano-firmware-master - - fi - - G_CONFIG_INJECT "dtoverlay=$INPUT_DEVICE_VALUE" "dtoverlay=$INPUT_DEVICE_VALUE" $FP_RPI_CONFIG - - ;; - - # --------------- Sparky SBC ------------ - # Allo Piano DAC (firmware + module) - # snd-soc-allo-piano-dac - # snd-soc-allo-piano-dac-plus (2.1) - snd-soc-allo-piano-dac*) - - if [[ ! -d '/lib/firmware/allo' ]]; then - - INSTALL_URL_ADDRESS='https://raw.githubusercontent.com/sparky-sbc/sparky-test/master/piano-firmware/piano-firmware.tar' - G_CHECK_URL "$INSTALL_URL_ADDRESS" - wget "$INSTALL_URL_ADDRESS" -O package.tar - tar -xvf package.tar -C /lib/ - rm package.tar - - fi - - G_CONFIG_INJECT "$INPUT_DEVICE_VALUE" "$INPUT_DEVICE_VALUE" /etc/modules - modprobe $INPUT_DEVICE_VALUE - SOUNDCARD_TARGET_CARD=1 - SOUNDCARD_TARGET_DEVICE=0 - amixer -c 0 sset 'audio output mode switch' 'i2s' - - ;; - - # Allo Cheapo - # allo-cheapo-analogue # 3.5mm/RCA - # allo-cheapo-optical # Optical out - allo-cheapo*) - - SOUNDCARD_TARGET_CARD=0 - SOUNDCARD_TARGET_DEVICE=0 - - # - Vol - amixer –c 0 set 'DAC PA' 35 - - if [[ $INPUT_DEVICE_VALUE == 'allo-cheapo-analogue' ]]; then - - amixer -c 0 sset 'audio output mode switch' 'i2s' - - else - - amixer -c 0 sset 'audio output mode switch' 'spdif' - SOUNDCARD_TARGET_DEVICE=2 - - fi - - ;; - # --------------- Odroid ---------------- odroid-hifishield-plus) From 634e9517cbdab39fa7fe139a836a66057ec3ace3 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 29 Sep 2019 20:26:26 +0200 Subject: [PATCH 182/184] v6.26 + DietPi-Optimal_MTU | Test with dietpi.com by default (Cloudflare CDN) + DietPi-Optimal_MTU | Do not test net MTU sizes < 0 => $MTU_SIZE < 29 + DietPi-Optimal_MTU | Check "ping" command existence and input host connectivity, before starting MTU test loop + DietPi-Optimal_MTU | Minor coding: Use direct ping exit code instead of grep error match, since in case of MTU size related error, ping will always exit with error code. --- dietpi/func/dietpi-optimal_mtu | 49 +++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/dietpi/func/dietpi-optimal_mtu b/dietpi/func/dietpi-optimal_mtu index 680c5ba7ab..7b2a865161 100644 --- a/dietpi/func/dietpi-optimal_mtu +++ b/dietpi/func/dietpi-optimal_mtu @@ -8,49 +8,60 @@ #//////////////////////////////////// # # Info: - # - Obtains the optimal MTU size. + # - Location: /{DietPi,boot}/dietpi/func/dietpi-optimal_mtu + # - Obtains the optimal MTU size # # Usage: - # - dietpi-optimal_mtu | Tests using google.com + # - dietpi-optimal_mtu | Tests using dietpi.com # - dietpi-optimal_mtu | Tests using the provided URL/IP #//////////////////////////////////// - #Grab Input - URL='www.google.com' - [[ $1 ]] && URL="$1" - - #Import DietPi-Globals --------------------------------------------------------------- + # Import DietPi-Globals -------------------------------------------------------------- . /DietPi/dietpi/func/dietpi-globals G_PROGRAM_NAME='DietPi-Optimal_MTU' G_INIT - #Import DietPi-Globals --------------------------------------------------------------- + # Import DietPi-Globals -------------------------------------------------------------- + + # Check for ping + command -v ping &> /dev/null || { G_DIETPI-NOTIFY 1 '"ping" command is missing, please install e.g. via "apt install iputils-ping". Aborting...'; exit 1; } + + # Grab and test input URL + URL='dietpi.com' + [[ $1 ]] && URL=$1 + if ping -c 1 "$URL" &> /dev/null; then + + G_DIETPI-NOTIFY 2 "Finding optimal MTU size with test URL/IP $URL, please wait..." + + else + + G_DIETPI-NOTIFY 1 "Pinging test URL/IP $URL failed. Please verify spelling and that this host is online. Aborting..." + exit 1 + + fi # Start with system default value MTU_SIZE=1500 #----------------------------------------------------------------------------------- - G_DIETPI-NOTIFY 0 "DietPi - MTU optimal size tool. Finding optimal MTU size ($URL), please wait..." while : do - G_DIETPI-NOTIFY 2 "Testing MTU: $MTU_SIZE" - # Remove IPv4 icmp headers from total size - if ! ping -c 1 -s $(( $MTU_SIZE - 28 )) -M do $URL | grep -qi '+1 error'; then + G_DIETPI-NOTIFY -2 "Testing MTU size: $MTU_SIZE" + # Remove IPv4 ICMP headers from total size + if ping -c 1 -s $(( $MTU_SIZE - 28 )) -M do $URL &> /dev/null; then - G_DIETPI-NOTIFY 0 "MTU optimal size = $MTU_SIZE" + G_DIETPI-NOTIFY 0 "Optimal MTU size = $MTU_SIZE" break - elif (( $MTU_SIZE <= 0 )); then + elif (( $MTU_SIZE < 29 )); then - G_DIETPI-NOTIFY 1 'Failed to find MTU size' + G_DIETPI-NOTIFY 1 'Failed to find optimal MTU size' break - else - - ((MTU_SIZE--)) - fi + ((MTU_SIZE--)) + done #----------------------------------------------------------------------------------- From 37a033c15d6c3ac3c8e85b97253d3cc8242e39de Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 29 Sep 2019 20:27:41 +0200 Subject: [PATCH 183/184] v6.26 + DietPi-Optimal_MTU | Failsafe: Double quote input URL --- dietpi/func/dietpi-optimal_mtu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/func/dietpi-optimal_mtu b/dietpi/func/dietpi-optimal_mtu index 7b2a865161..e4f9d31b2b 100644 --- a/dietpi/func/dietpi-optimal_mtu +++ b/dietpi/func/dietpi-optimal_mtu @@ -48,7 +48,7 @@ G_DIETPI-NOTIFY -2 "Testing MTU size: $MTU_SIZE" # Remove IPv4 ICMP headers from total size - if ping -c 1 -s $(( $MTU_SIZE - 28 )) -M do $URL &> /dev/null; then + if ping -c 1 -s $(( $MTU_SIZE - 28 )) -M do "$URL" &> /dev/null; then G_DIETPI-NOTIFY 0 "Optimal MTU size = $MTU_SIZE" break From 017652aa9dcc434abad695a180b977bc0ead557a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 29 Sep 2019 20:46:33 +0200 Subject: [PATCH 184/184] v6.26 + CHANGELOG | Update v6.26 release month --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index fed3a3522d..d11959dc97 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,5 @@ v6.26 -(XX/09/19) +(XX/10/19) Changes / Improvements / Optimisations: - General | Support for Debian Jessie has now been fully dropped from DietPi code. Jessie systems are moved to the "jessie-support" Git branch and will stay on v6.25. Critical bugs, if reported, may still be fixed, but DietPi-Software related issues and new features will not be handled anymore by the DietPi code team. However, everyone is free to open pull requests against the jessie-support branch: https://github.com/MichaIng/DietPi/tree/jessie-support