Skip to content

Commit

Permalink
Merge pull request #167 from 007revad/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
007revad authored Feb 19, 2024
2 parents fd4e0ce + 43a65c4 commit b363985
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 8 additions & 8 deletions syno_enable_m2_volume.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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."
Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -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."
Expand Down

0 comments on commit b363985

Please sign in to comment.