From ae8da15b398f84746e9212ebbf646b715a69c35b Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Mon, 19 Feb 2024 19:48:37 +1100 Subject: [PATCH 1/2] Update CHANGES.txt --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 11588f9..2543a8f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -v1.1.20 -- Hard coded /usr/syno/bin/ for Synology commands (to prevent $PATH issues). +v1.1.21 +- Hard coded /usr/syno/bin/ for Synology commands (to prevent PATH issues). v1.1.19 - Bug fix when script updates itself and user ran the script from ./scriptname.sh From 43a65c4c896498d4449a0293a9cc03c6bc25d7f1 Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Mon, 19 Feb 2024 19:53:05 +1100 Subject: [PATCH 2/2] Update syno_enable_m2_volume.sh v1.1.21 - Hard coded /usr/syno/bin/ for Synology commands (to prevent PATH issues). --- syno_enable_m2_volume.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/syno_enable_m2_volume.sh b/syno_enable_m2_volume.sh index d2d33f5..f7e08f6 100644 --- a/syno_enable_m2_volume.sh +++ b/syno_enable_m2_volume.sh @@ -11,7 +11,7 @@ # sudo /volume1/scripts/syno_enable_m2_volume.sh #------------------------------------------------------------------------------ -scriptver="v1.1.20" +scriptver="v1.1.21" script=Synology_enable_M2_volume repo="007revad/Synology_enable_M2_volume" scriptname=syno_enable_m2_volume @@ -158,7 +158,7 @@ if [[ $( whoami ) != "root" ]]; then fi # Get DSM major version -dsm=$/usr/syno/bin/synogetkeyvalue /etc.defaults/VERSION majorversion) +dsm=$(/usr/syno/bin/synogetkeyvalue /etc.defaults/VERSION majorversion) if [[ $dsm -lt "7" ]]; then ding echo "This script only works for DSM 7." @@ -174,10 +174,10 @@ echo "$script $scriptver" model=$(cat /proc/sys/kernel/syno_hw_version) # Get DSM full version -productversion=$/usr/syno/bin/synogetkeyvalue /etc.defaults/VERSION productversion) -buildphase=$/usr/syno/bin/synogetkeyvalue /etc.defaults/VERSION buildphase) -buildnumber=$/usr/syno/bin/synogetkeyvalue /etc.defaults/VERSION buildnumber) -smallfixnumber=$/usr/syno/bin/synogetkeyvalue /etc.defaults/VERSION smallfixnumber) +productversion=$(/usr/syno/bin/synogetkeyvalue /etc.defaults/VERSION productversion) +buildphase=$(/usr/syno/bin/synogetkeyvalue /etc.defaults/VERSION buildphase) +buildnumber=$(/usr/syno/bin/synogetkeyvalue /etc.defaults/VERSION buildnumber) +smallfixnumber=$(/usr/syno/bin/synogetkeyvalue /etc.defaults/VERSION smallfixnumber) # Show DSM full version and model if [[ $buildphase == GM ]]; then buildphase=""; fi @@ -657,7 +657,7 @@ fi #if [[ $dsm72 == "yes" ]]; then #if [[ $dsm71 == "yes" ]]; then smp=support_m2_pool - setting="$/usr/syno/bin/synogetkeyvalue "$synoinfo" "$smp")" + setting="$(/usr/syno/bin/synogetkeyvalue "$synoinfo" "$smp")" enabled="" if [[ ! $setting ]]; then # Add support_m2_pool="yes" @@ -673,7 +673,7 @@ fi fi # Check if we enabled m2 volume support - setting="$/usr/syno/bin/synogetkeyvalue "$synoinfo" "$smp")" + setting="$(/usr/syno/bin/synogetkeyvalue "$synoinfo" "$smp")" if [[ $enabled == "yes" ]]; then if [[ $setting == "yes" ]]; then echo -e "\nEnabled M.2 volume support."