From 64a8ffa6d47deab742df8e687b17a678b449fcb0 Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Thu, 19 Dec 2024 11:35:43 +1100 Subject: [PATCH 1/2] Update CHANGES.txt v1.4.31 - Updated to work with xpe. Issues #88 #83 and maybe #73 - Prevent Entware or user edited PATH causing issues. --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index e89bb36..fe9f6e3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,7 @@ +v1.4.31 +- Updated to work with xpe. Issues #88 #83 and maybe #73 +- Prevent Entware or user edited PATH causing issues. + v1.4.30 - Updated help to explain why Synology avoids using deduplication on HDDs. - Updated Finished message to say you may need to reboot. From c19544c430f3a6e7970ce7ddc51e4fac685d0d25 Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Thu, 19 Dec 2024 11:35:48 +1100 Subject: [PATCH 2/2] Update syno_enable_dedupe.sh v1.4.31 - Updated to work with xpe. Issues #88 #83 and maybe #73 - Prevent Entware or user edited PATH causing issues. --- syno_enable_dedupe.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/syno_enable_dedupe.sh b/syno_enable_dedupe.sh index 741e895..a8da360 100644 --- a/syno_enable_dedupe.sh +++ b/syno_enable_dedupe.sh @@ -11,11 +11,15 @@ # Added support for DSM 7.0.1 to 7.2 (untested) -scriptver="v1.4.30" +scriptver="v1.4.31" script=Synology_enable_Deduplication repo="007revad/Synology_enable_Deduplication" scriptname=syno_enable_dedupe +# Prevent Entware or user edited PATH causing issues +# shellcheck disable=SC2155 # Declare and assign separately to avoid masking return values +export PATH=$(echo "$PATH" | sed -e 's/\/opt\/bin:\/opt\/sbin://') + # Check BASH variable is bash if [ ! "$(basename "$BASH")" = bash ]; then echo "This is a bash script. Do not run it with $(basename "$BASH")" @@ -991,6 +995,12 @@ elif [[ -f "$strgmgr" ]]; then fi +# Make sure xpe's storage_manager.js.gz includes our changes. Issue #88 +if [[ -f "${strgmgr}.gz" ]]; then + gzip -c "${strgmgr}" > "${strgmgr}.gz" +fi + + #---------------------------------------------------------- # Finished