Browse Source
Change whitespace trimming method for drive model
pull/560/head
Dave Russell
2 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
syno_hdd_db.sh
|
|
|
@ -1026,7 +1026,7 @@ getdriveinfo(){ |
|
|
|
|
|
|
|
# Get drive model |
|
|
|
hdmodel=$(cat "$1/device/model") |
|
|
|
hdmodel=$(printf "%s" "$hdmodel" | xargs) # trim leading and trailing white space |
|
|
|
hdmodel=$(echo "$hdmodel" | sed 's/^[[:space:]]//;s/[[:space:]]$//') # trim leading and trailing white space |
|
|
|
|
|
|
|
# Fix dodgy model numbers |
|
|
|
fixdrivemodel "$hdmodel" |
|
|
|
|