Giter Site home page Giter Site logo

Small glitch in the code ? about synology_hdd_db HOT 8 CLOSED

Kia0ra avatar Kia0ra commented on September 22, 2024 1
Small glitch in the code ?

from synology_hdd_db.

Comments (8)

Kia0ra avatar Kia0ra commented on September 22, 2024 2

It definitely helps ;)

Thanks for the support and reactiveness !

bash-4.4# ./syno_hdd_db.sh -nr --showedits
Synology_HDD_db v3.4.77
DS220+ DSM 7.2.1-69057-3 
StorageManager 1.0.0-0017

Using options: -nr --showedits
Running from: /volume1/scripts/syno_hdd_db.sh

HDD/SSD models found: 1
WD160EDGZ-11B2DA0,85.00A85

No M.2 drives found

No M.2 PCIe cards found

No Expansion Units found

WD160EDGZ-11B2DA0 already exists in ds220+_host_v7.db

Support disk compatibility already enabled.

Support memory compatibility already disabled.

Max memory already set to 18 GB.

Drive db auto updates already disabled.

    "WD160EDGZ-11B2DA0": {
      "85.00A85": {
        "compatibility_interval": [
          {
            "compatibility": "support",
            "not_yet_rolling_status": "support",
            "fw_dsm_update_status_notify": false,
            "barebone_installable": true,
            "smart_test_ignore": false,
            "smart_attr_ignore": false
          }
        ]

DSM successfully checked disk compatibility.

You may need to reboot the Synology to see the changes.

from synology_hdd_db.

007revad avatar 007revad commented on September 22, 2024 1

I suspect if you run it again with --showedits it will show the same error.

And if you run it without --showedits it won't show the error.

Does the following command give the same error?

jq . ds220+_host_v7.db | grep -A 11 WD160EDGZ-11B2DA0

If it does give the same error can you attach a zipped copy of your ds220+_host_v7.db file.

You can copy the file to the script shared folder with:

sudo cp /var/lib/disk-compatibility/ds220+_host_v7.db /volume1/script/ds220+_host_v7.db

from synology_hdd_db.

007revad avatar 007revad commented on September 22, 2024 1

Ok, I've found the issue. My script has added an extra comma so the file ends in ,,"nas_model":"ds220+"} when it should end in ,"nas_model":"ds220+"}

I'll update the script to prevent that, and fix it in the db file for people who've already run Synology_HDD_db v3.3.75

from synology_hdd_db.

007revad avatar 007revad commented on September 22, 2024 1

This new version v3.4.76 should work correctly with the -s or --showedits option. It also edits the ,db files to fix the ,, left from v3.3.75

https://github.com/007revad/Synology_HDD_db/releases/tag/v3.4.76

from synology_hdd_db.

007revad avatar 007revad commented on September 22, 2024 1

I guess it helps if I tell sed which files to edit :(

All fixed now: https://github.com/007revad/Synology_HDD_db/releases/tag/v3.4.77

from synology_hdd_db.

timekone avatar timekone commented on September 22, 2024

I've encountered a similar error. It only happens when running with --showedits.

from synology_hdd_db.

Kia0ra avatar Kia0ra commented on September 22, 2024

I suspect if you run it again with --showedits it will show the same error.

Yes

And if you run it without --showedits it won't show the error.

Exact

Does the following command give the same error?

jq . ds220+_host_v7.db | grep -A 11 WD160EDGZ-11B2DA0

root@nas:/volume1/scripts# jq . ds220+_host_v7.db | grep -A 11 WD160EDGZ-11B2DA0 parse error: Expected value before ',' at line 1, column 96319
Exact same error

If it does give the same error can you attach a zipped copy of your ds220+_host_v7.db file.

You can copy the file to the script shared folder with:

sudo cp /var/lib/disk-compatibility/ds220+_host_v7.db /volume1/script/ds220+_host_v7.db

You can find the .db file in attachment

Thanks !

ds220+_host_v7.db.zip

from synology_hdd_db.

Kia0ra avatar Kia0ra commented on September 22, 2024

I think there's still a problem with the sed command :

root@nas:/volume1/scripts# ./syno_hdd_db.sh -nr  --showedits
Synology_HDD_db v3.4.76
DS220+ DSM 7.2.1-69057-3 
StorageManager 1.0.0-0017

Using options: -nr --showedits
Running from: /volume1/scripts/syno_hdd_db.sh

HDD/SSD models found: 1
WD160EDGZ-11B2DA0,85.00A85

No M.2 drives found

No M.2 PCIe cards found

No Expansion Units found

sed: no input files
WD160EDGZ-11B2DA0 already exists in ds220+_host_v7.db

Support disk compatibility already enabled.

Support memory compatibility already disabled.

Max memory already set to 18 GB.

Drive db auto updates already disabled.

parse error: Expected value before ',' at line 1, column 96319

DSM successfully checked disk compatibility.

You may need to reboot the Synology to see the changes.

from synology_hdd_db.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.