diff --git a/CHANGES.txt b/CHANGES.txt index da9b842..a884ae9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,10 @@ +v3.3.75 +- Include smart_test_ignore and smart_attr_ignore in db files. +- Now saves changes.txt as _changes.txt when updating the script. + - To not overwrite changes.txt if my other scripts are in the same folder. +- Bug fix for detecting if script is located on M.2 drive. +- Minor bug fix. + v3.3.73 - Bug fix for vendor id. diff --git a/README.md b/README.md index a925040..82f48fa 100644 --- a/README.md +++ b/README.md @@ -124,9 +124,10 @@ ### vendor_ids.txt Thank you to the following PayPal donators, GitHub sponsors and hardware donators -| | | | | +| | | | | |--------------------|--------------------|----------------------|----------------------| -| | Enric Escudé Santana | Yunhao Zhang | Matthias Gerhardt | +| | | Ez Hosting | Alec Wilhere | +| Reece Lyne | Enric Escudé Santana | Yunhao Zhang | Matthias Gerhardt | | Darryl Harper | Mikescher | Matthias Pfaff | cpharada | | Neil Tapp | zen1605 | Kleissner Investments | Angel Scandinavia | | bcollins | Peter jackson | Mir Hekmat | Andrew Tapp | diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh index 02bc6fa..a650005 100644 --- a/syno_hdd_db.sh +++ b/syno_hdd_db.sh @@ -27,9 +27,10 @@ # Now warns if script is located on an M.2 volume. -scriptver="v3.3.73" +scriptver="v3.3.75" script=Synology_HDD_db repo="007revad/Synology_HDD_db" +scriptname=syno_hdd_db # Check BASH variable is bash if [ ! "$(basename "$BASH")" = bash ]; then @@ -296,9 +297,9 @@ echo "Running from: ${scriptpath}/$scriptfile" # Warn if script located on M.2 drive scriptvol=$(echo "$scriptpath" | cut -d"/" -f2) vg=$(lvdisplay | grep /volume_"${scriptvol#volume}" | cut -d"/" -f3) -md=$(pvdisplay | grep -B 1 "$vg" | grep /dev/ | cut -d"/" -f3) +md=$(pvdisplay | grep -B 1 -E '[ ]'"$vg" | grep /dev/ | cut -d"/" -f3) if cat /proc/mdstat | grep "$md" | grep nvme >/dev/null; then - echo "${Yellow}WARNING${Off} Don't store this script on an NVMe volume!" + echo -e "${Yellow}WARNING${Off} Don't store this script on an NVMe volume!" fi @@ -381,7 +382,7 @@ if ! printf "%s\n%s\n" "$tag" "$scriptver" | fi # Copy new script sh file to script location - if ! cp -p "/tmp/$script-$shorttag/syno_hdd_db.sh" "${scriptpath}/${scriptfile}"; + if ! cp -p "/tmp/$script-$shorttag/${scriptname}.sh" "${scriptpath}/${scriptfile}"; then copyerr=1 echo -e "${Error}ERROR${Off} Failed to copy"\ @@ -410,10 +411,12 @@ if ! printf "%s\n%s\n" "$tag" "$scriptver" | fi fi - # Copy new CHANGES.txt file + # Copy new CHANGES.txt file to script location (if script on a volume) if [[ $scriptpath =~ /volume* ]]; then # Copy new CHANGES.txt file to script location - if ! cp -p "/tmp/$script-$shorttag/CHANGES.txt" "$scriptpath"; then + if ! cp -p "/tmp/$script-$shorttag/CHANGES.txt"\ + "${scriptpath}/${scriptname}_CHANGES.txt"; + then if [[ $autoupdate != "yes" ]]; then copyerr=1; fi echo -e "${Error}ERROR${Off} Failed to copy"\ "$script-$shorttag/CHANGES.txt to:\n $scriptpath" @@ -424,7 +427,7 @@ if ! printf "%s\n%s\n" "$tag" "$scriptver" | echo -e "${Error}ERROR${Off} Failed to set permissions on:" echo "$scriptpath/CHANGES.txt" fi - changestxt=", changes.txt" + changestxt=" and changes.txt" fi fi @@ -433,7 +436,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$vids_txt downloaded to: ${scriptpath}\n" + echo -e "\n$tag ${scriptfile}$vids_txt$changestxt downloaded to: ${scriptpath}\n" syslog_set info "$script successfully updated to $tag" # Reload script @@ -1121,11 +1124,13 @@ updatedb(){ else fwstrng=\"$fwrev\" fwstrng="$fwstrng":{\"compatibility_interval\":[{\"compatibility\":\"support\",\"not_yet_rolling_status\" - fwstrng="$fwstrng":\"support\",\"fw_dsm_update_status_notify\":false,\"barebone_installable\":true}]}, + fwstrng="$fwstrng":\"support\",\"fw_dsm_update_status_notify\":false,\"barebone_installable\":true, + fwstrng="$fwstrng"\"smart_test_ignore\":false,\"smart_attr_ignore\":false}]}, default=\"default\" default="$default":{\"compatibility_interval\":[{\"compatibility\":\"support\",\"not_yet_rolling_status\" - default="$default":\"support\",\"fw_dsm_update_status_notify\":false,\"barebone_installable\":true}]}}} + default="$default":\"support\",\"fw_dsm_update_status_notify\":false,\"barebone_installable\":true, + default="$default"\"smart_test_ignore\":false,\"smart_attr_ignore\":false}]}}}, if grep '"disk_compatbility_info":{}' "$2" >/dev/null; then # Replace "disk_compatbility_info":{} with