Browse Source

Merge pull request #370 from 007revad/main

Sync from main
pull/375/head
Dave Russell 1 year ago
committed by GitHub
parent
commit
bf0ad9856e
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 108
      .gitattributes
  2. 3
      CHANGES.txt
  3. 10
      syno_hdd_db.sh

108
.gitattributes

@ -0,0 +1,108 @@
# Common settings that generally should always be used with your language specific settings
# Auto detect text files and perform LF normalization
* text=auto
#
# The above will handle all files NOT found below
#
# Documents
*.bibtex text diff=bibtex
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.epub diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.md text diff=markdown
*.mdx text diff=markdown
*.tex text diff=tex
*.adoc text
*.textile text
*.mustache text
*.tab text
*.tsv text
*.txt text
*.sql text
*.csv text eol=crlf
# Graphics
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.tif binary
*.tiff binary
*.ico binary
*.eps binary
# SVG treated as text by default.
*.svg text
# If you want to treat it as binary,
# use the following line instead.
# *.svg binary
# Scripts
*.bash text eol=lf
*.fish text eol=lf
*.ksh text eol=lf
*.py text eol=lf
*.php text eol=lf
*.sh text eol=lf
*.zsh text eol=lf
# These are explicitly windows files and should use crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
# Visual Dialog Script
*.dsc text eol=crlf
*.dsp text eol=crlf
# Config files
*.ini text eol=crlf
*.conf text eol=lf
# Serialisation
*.json text
*.toml text
*.xml text
*.yaml text
*.yml text
# Archives
*.7z binary
*.bz binary
*.bz2 binary
*.bzip2 binary
*.gz binary
*.lz binary
*.lzma binary
*.rar binary
*.tar binary
*.taz binary
*.tbz binary
*.tbz2 binary
*.tgz binary
*.tlz binary
*.txz binary
*.xz binary
*.Z binary
*.zip binary
*.zst binary
# Text files where line endings should be preserved
*.patch -text
#
# Exclude files from exporting
#
.gitattributes export-ignore
.gitignore export-ignore
.gitkeep export-ignore

3
CHANGES.txt

@ -1,3 +1,6 @@
v3.5.103
- Bug fix getting size of large drives. Issue #368
v3.5.102 v3.5.102
- Changed to use a faster method of detecting if an expansion unit is connected, for models with the syno_slot_mapping command. - Changed to use a faster method of detecting if an expansion unit is connected, for models with the syno_slot_mapping command.
- Changed so XPE users using the hdddb addon don't need to reboot. - Changed so XPE users using the hdddb addon don't need to reboot.

10
syno_hdd_db.sh

@ -29,7 +29,7 @@
# /var/packages/StorageManager/target/ui/storage_panel.js # /var/packages/StorageManager/target/ui/storage_panel.js
scriptver="v3.5.102" scriptver="v3.5.103"
script=Synology_HDD_db script=Synology_HDD_db
repo="007revad/Synology_HDD_db" repo="007revad/Synology_HDD_db"
scriptname=syno_hdd_db scriptname=syno_hdd_db
@ -896,11 +896,9 @@ fixdrivemodel(){
get_size_gb(){ get_size_gb(){
# $1 is /sys/block/sata1 or /sys/block/nvme0n1 etc # $1 is /sys/block/sata1 or /sys/block/nvme0n1 etc
local float local disk_size_gb
local int disk_size_gb=$(synodisk --info /dev/"$(basename -- "$1")" | grep 'Total capacity' | awk '{print int($4 * 1.073741824)}')
float=$(synodisk --info /dev/"$(basename -- "$1")" | grep 'Total capacity' | awk '{print $4 * 1.0737}') echo "$disk_size_gb"
int="${float%.*}"
echo "$int"
} }
getdriveinfo(){ getdriveinfo(){

Loading…
Cancel
Save