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] 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