From 8a188e6b7745b575c95e5b2878d9cb4a991d03a5 Mon Sep 17 00:00:00 2001 From: 007revad <39733752+007revad@users.noreply.github.com> Date: Fri, 24 Mar 2023 21:02:54 +1100 Subject: [PATCH 1/4] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ce1d305..e1687c5 100644 --- a/README.md +++ b/README.md @@ -58,10 +58,10 @@ ### Scheduling the script in Synology's Task Scheduler ### Running the script via SSH -You run the script in a shell with sudo or as root. +You run the script in a shell with sudo i or as root. ```YAML -sudo /path-to-script/syno_hdd_db.sh +sudo i /path-to-script/syno_hdd_db.sh ``` **Note:** Replace /path-to-script/ with the actual path to the script on your Synology. @@ -71,7 +71,7 @@ ### Running the script via SSH If you run the script with the -showedits flag it will show you the changes it made to the Synology's compatible-drive database. Obviously this is only useful if you run the script in a shell. ```YAML -sudo /path-to-script/syno_hdd_db.sh -showedits +sudo i /path-to-script/syno_hdd_db.sh -showedits ``` **Note:** Replace /path-to-script/ with the actual path to the script on your Synology. From e81d39ebc795a08adc3030eb7c519460949d01ec Mon Sep 17 00:00:00 2001 From: 007revad <39733752+007revad@users.noreply.github.com> Date: Sat, 25 Mar 2023 09:18:25 +1100 Subject: [PATCH 2/4] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e1687c5..094313e 100644 --- a/README.md +++ b/README.md @@ -58,10 +58,10 @@ ### Scheduling the script in Synology's Task Scheduler ### Running the script via SSH -You run the script in a shell with sudo i or as root. +You run the script in a shell with sudo -i or as root. ```YAML -sudo i /path-to-script/syno_hdd_db.sh +sudo -i /path-to-script/syno_hdd_db.sh ``` **Note:** Replace /path-to-script/ with the actual path to the script on your Synology. @@ -71,7 +71,7 @@ ### Running the script via SSH If you run the script with the -showedits flag it will show you the changes it made to the Synology's compatible-drive database. Obviously this is only useful if you run the script in a shell. ```YAML -sudo i /path-to-script/syno_hdd_db.sh -showedits +sudo -i /path-to-script/syno_hdd_db.sh -showedits ``` **Note:** Replace /path-to-script/ with the actual path to the script on your Synology. From 657e0ed3a14ef95dedc40bd90d0a1f6306e6e686 Mon Sep 17 00:00:00 2001 From: 007revad <39733752+007revad@users.noreply.github.com> Date: Sat, 25 Mar 2023 11:59:53 +1100 Subject: [PATCH 3/4] Update syno_hdd_db.sh Fixed skipping removable drives in DSM 7 on RS2421rp+ to fix issue #23. --- syno_hdd_db.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh index 4a92dd1..e880c95 100644 --- a/syno_hdd_db.sh +++ b/syno_hdd_db.sh @@ -326,8 +326,8 @@ fixdrivemodel(){ getdriveinfo() { # Skip removable drives (USB drives) - removable=$(cat "$1/removable") - if [[ $removable == "0" ]]; then + removable=$(cat "$1/removable") # Some DSM 7 RS models return 1 for internal drives! + if [[ $removable == "0" ]] || [[ $dsm -gt "6" ]]; then # Get drive model and firmware version hdmodel=$(cat "$1/device/model") hdmodel=$(printf "%s" "$hdmodel" | xargs) # trim leading and trailing white space From 0c782c575ef555c255ac60ba9112f7fb95fe7b8e Mon Sep 17 00:00:00 2001 From: 007revad <39733752+007revad@users.noreply.github.com> Date: Sat, 25 Mar 2023 12:02:40 +1100 Subject: [PATCH 4/4] Update CHANGES.txt --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 2fa4acd..0e20863 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,6 @@ +v1.2.24 +- Bug fix. Ignoring removable drives was ignoring all drives in DSM 7 on a RS2421rp+. Fix issue #23. + v1.2.23 - Changed to show if no M.2 cards were found, if M.2 drives were found.