Browse Source
Merge pull request #259 from 007revad/develop
Update syno_hdd_db.sh
pull/269/head
Dave Russell
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
5 additions and
1 deletions
-
syno_hdd_db.sh
|
|
@ -264,7 +264,9 @@ fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Show options used |
|
|
# Show options used |
|
|
|
|
|
if [[ ${#args[@]} -gt "0" ]]; then |
|
|
echo "Using options: ${args[*]}" |
|
|
echo "Using options: ${args[*]}" |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
#echo "" # To keep output readable |
|
|
#echo "" # To keep output readable |
|
|
|
|
|
|
|
|
@ -1154,6 +1156,7 @@ updatedb(){ |
|
|
getdbtype "$2" |
|
|
getdbtype "$2" |
|
|
|
|
|
|
|
|
if [[ $dbtype -gt "6" ]]; then |
|
|
if [[ $dbtype -gt "6" ]]; then |
|
|
|
|
|
# db type 7 used from DSM 7.1 and later |
|
|
if grep "$hdmodel"'":{"'"$fwrev" "$2" >/dev/null; then |
|
|
if grep "$hdmodel"'":{"'"$fwrev" "$2" >/dev/null; then |
|
|
echo -e "${Yellow}$hdmodel${Off} already exists in ${Cyan}$(basename -- "$2")${Off}" >&2 |
|
|
echo -e "${Yellow}$hdmodel${Off} already exists in ${Cyan}$(basename -- "$2")${Off}" >&2 |
|
|
else |
|
|
else |
|
|
@ -1203,6 +1206,7 @@ updatedb(){ |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
elif [[ $dbtype -eq "6" ]]; then |
|
|
elif [[ $dbtype -eq "6" ]]; then |
|
|
|
|
|
# db type 6 used up to DSM 7.0.1 |
|
|
if grep "$hdmodel" "$2" >/dev/null; then |
|
|
if grep "$hdmodel" "$2" >/dev/null; then |
|
|
echo -e "${Yellow}$hdmodel${Off} already exists in ${Cyan}$(basename -- "$2")${Off}" >&2 |
|
|
echo -e "${Yellow}$hdmodel${Off} already exists in ${Cyan}$(basename -- "$2")${Off}" >&2 |
|
|
else |
|
|
else |
|
|
|