mirror of
https://github.com/007revad/Synology_HDD_db.git
synced 2026-04-25 13:45:59 +03:00
[GH-ISSUE #65] Synology_HDD_db v2.2.42 syntax error when using the script #741
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Synology_HDD_db#741
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @p1ranha on GitHub (Apr 24, 2023).
Original GitHub issue: https://github.com/007revad/Synology_HDD_db/issues/65
Using the script on my Syno 723+ DSM 7.2-64216 Beta
Using options: -nr
syno_hdd_db.sh: line 612: syntax error near unexpected token
<' syno_hdd_db.sh: line 612:done < <(printf "%s\0" "${hdlist[@]}" | sort -uz)@007revad commented on GitHub (Apr 24, 2023):
I'm also using DMS 7.2-63216 Beta (on a DS1821+) and I'm not getting that error message. That section of code has been all 42 versions of the script, so I'm not sure why it is causing an issue now.
Can you try the previous script version and report back if it gives the same error for you?
https://github.com/007revad/Synology_HDD_db/releases/tag/v2.1.38
@p1ranha commented on GitHub (Apr 24, 2023):
I have the same error with that version.
@007revad commented on GitHub (Apr 24, 2023):
Have you got 1 or 2 HDDs in the DS723+? And what brand are they?
@p1ranha commented on GitHub (Apr 24, 2023):
I have 2HDD slots, only one is occupied by Seagate ST6000VN001-2BB186
SSDs:
M.2 Drive 1 - Micron (SSD) - NOT joined yet (not supported)
M.2 Drive 2 - Toshiba KBG30ZMS128G NVMe TOSHIBA 128.. (cache)
@007revad commented on GitHub (Apr 24, 2023):
That error is occurring in a section of the script that sorts the HDD list to remove duplicates. I wonder if the bug only occurs when there's only 1 HDD. I'll run some tests and see if I can reproduce the error.
@007revad commented on GitHub (Apr 25, 2023):
I can't reproduce the error. I've even tried with just 1 HDD.
Can you try this short test script to see if it gives you the same error:
https://gist.github.com/007revad/e7ca1c185f593b2d93cccf5bd0ccd0c2
If it does give you the same error can you run it with --debug then reply with the output.
/<path-to-script>/test.sh --debug@007revad commented on GitHub (Apr 25, 2023):
Okay, I have been able to reproduce the error by running the script in sh instead of bash.
It seem like you are trying to run the script with:
sh sudo -i /<path-to-script>/syno_hdd_db.shInstead run it with:
sudo -i /<path-to-script>/syno_hdd_db.sh@p1ranha commented on GitHub (Apr 25, 2023):
I have executed it as you said, still with error:
piranha@nas:~$ sudo -i syno_hdd_db.sh
-ash: syno_hdd_db.sh: command not found
Then I did sudo mc and executed it using mc. That worked.
@007revad commented on GitHub (Apr 25, 2023):
I'm glad you got it working.
The "syno_hdd_db.sh: command not found" error would have been because you didn't include the path to where the file is located. Like
sudo i /volume1/homes/p1ranha/syno_hdd_db.sh@p1ranha commented on GitHub (Apr 25, 2023):
thanks for all the help!