From 084b83b18bf1249895f00adf6543315f074ac1d4 Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Wed, 20 Dec 2023 21:25:44 +1100 Subject: [PATCH] Update syno_hdd_db.sh v3.3.71 - Bug fix for enablings creating storage pools in Storage Manager for M.2 drives in PCIe adaptor cards. - Bug fix for not copying syno_hdd_db_vendors.txt to script location when script updates itself. --- syno_hdd_db.sh | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh index 7e34804..4bd703e 100644 --- a/syno_hdd_db.sh +++ b/syno_hdd_db.sh @@ -388,6 +388,27 @@ if ! printf "%s\n%s\n" "$tag" "$scriptver" | syslog_set warn "$script failed to copy $tag to script location" fi + # Copy new syno_hdd_vendor_ids.txt file + vidstxt="syno_hdd_vendor_ids.txt" + if [[ $scriptpath =~ /volume* ]]; then + if [[ ! -f "$scriptpath/$vidstxt" ]]; then # Don't overwrite file + # Copy new syno_hdd_vendor_ids.txt file to script location + if ! cp -p "/tmp/$script-$shorttag/$vidstxt" "$scriptpath"; then + if [[ $autoupdate != "yes" ]]; then copyerr=1; fi + echo -e "${Error}ERROR${Off} Failed to copy"\ + "$script-$shorttag/$vidstxt to:\n $scriptpath" + else + # Set permissions on CHANGES.txt + if ! chmod 664 "$scriptpath/$vidstxt"; then + if [[ $autoupdate != "yes" ]]; then permerr=1; fi + echo -e "${Error}ERROR${Off} Failed to set permissions on:" + echo "$scriptpath/$vidstxt" + fi + vids_txt=" and syno_hdd_vendor_ids.txt" + fi + fi + fi + # Copy new CHANGES.txt file if [[ $scriptpath =~ /volume* ]]; then # Copy new CHANGES.txt file to script location @@ -411,7 +432,7 @@ if ! printf "%s\n%s\n" "$tag" "$scriptver" | # Notify of success (if there were no errors) if [[ $copyerr != 1 ]] && [[ $permerr != 1 ]]; then - echo -e "\n$tag$changestxt downloaded to: ${scriptpath}\n" + echo -e "\n$tag$changestxt$vids_txt downloaded to: ${scriptpath}\n" syslog_set info "$script successfully updated to $tag" # Reload script