From fa04e691ba520fc5e7f12f3ed7c4aabad930054b Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Fri, 2 Aug 2024 08:49:34 +1000 Subject: [PATCH 1/2] Update CHANGES.txt --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 3195fb2..d4f280a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,7 @@ +v1.4.29 +- Changed to show state of "Dedupe config menu for HDDs and 2.5 inch SSDs" even if --hdd option not used. Issue #79 + - Now also shows "Run the script with the --hdd option if you want it enabled". Issue #79 + v1.4.28 - Added support for DSM 7.0.1 to 7.2 (untested). - Bug fix for when restoring storage_panel.js from backup. From c27e1e51b786725845522eba550be354f027bde7 Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Fri, 2 Aug 2024 08:49:59 +1000 Subject: [PATCH 2/2] Update syno_enable_dedupe.sh v1.4.29 - Changed to show state of "Dedupe config menu for HDDs and 2.5 inch SSDs" even if --hdd option not used. Issue #79 - Now also shows "Run the script with the --hdd option if you want it enabled". Issue #79 --- syno_enable_dedupe.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/syno_enable_dedupe.sh b/syno_enable_dedupe.sh index 1c5ebb1..2ab9e4f 100644 --- a/syno_enable_dedupe.sh +++ b/syno_enable_dedupe.sh @@ -11,7 +11,7 @@ # Added support for DSM 7.0.1 to 7.2 (untested) -scriptver="v1.4.28" +scriptver="v1.4.29" script=Synology_enable_Deduplication repo="007revad/Synology_enable_Deduplication" scriptname=syno_enable_dedupe @@ -727,12 +727,13 @@ if [[ $check == "yes" ]]; then # DSM 7.2.1 only and only if --hdd option used # Dedupe config button for HDDs and 2.5 inch SSDs in DSM 7.2.1 - if [[ -f "$strgmgr" ]] && [[ $hdd == "yes" ]]; then + if [[ -f "$strgmgr" ]]; then # StorageManager package is installed and --hdd option used if ! grep '&&e.dedup_info.show_config_btn' "$strgmgr" >/dev/null; then - echo -e "\nDedupe config menu for HDDs and 2.5\" SSDs already enabled." + echo -e "\nDedupe config menu for HDDs and 2.5\" SSDs is ${Cyan}enabled${Off}." else echo -e "\nDedupe config menu for HDDs and 2.5\" SSDs is ${Cyan}not${Off} enabled." + echo "Run the script with the --hdd option if you want it enabled." fi fi @@ -976,6 +977,13 @@ if [[ -f "$strgmgr" ]] && [[ $hdd == "yes" ]]; then else echo -e "\nDedupe config menu for HDDs and 2.5\" SSDs already enabled." fi +elif [[ -f "$strgmgr" ]]; then + if ! grep '&&e.dedup_info.show_config_btn' "$strgmgr" >/dev/null; then + echo -e "\nDedupe config menu for HDDs and 2.5\" SSDs is enabled." + else + echo -e "\nDedupe config menu for HDDs and 2.5\" SSDs not enabled." + echo "Run the script with the --hdd option if you want it enabled." + fi fi