I'm so proud :)

  • Ab sofort steht euch hier im Forum die neue Add-on Verwaltung zur Verfügung – eine zentrale Plattform für alles rund um Erweiterungen und Add-ons für den DSM.

    Damit haben wir einen Ort, an dem Lösungen von Nutzern mit der Community geteilt werden können. Über die Team Funktion können Projekte auch gemeinsam gepflegt werden.

    Was die Add-on Verwaltung kann und wie es funktioniert findet Ihr hier

    Hier geht es zu den Add-ons

DaveR

Benutzer
Sehr erfahren
Add-on Developer
Registriert
30. März 2022
Beiträge
1.037
Reaktionspunkte
1.942
Punkte
204
I just wrote my first script that supports all the languages that DSM supports :) It decodes the creation date of the Synology NAS from it's serial number.

Here's of screenshot of running the script with DSM set to German, then English, then French.
1765853468448.png

And all the available languages
1765853490144.png

Luckily DSM's strings files contain all the months and "Date created" (Erstellungsdatum) in each language.
 
Zuletzt bearbeitet:
Coole Sache!

Da sieht man schön, wie einfach doch Deutsch ist, während fast alle anderen Sprachen mehrere Worte brauchen, kommt Deutsch nur mit einem aus :ROFLMAO:
 
  • Haha
Reaktionen: Benie und DaveR
Very nice:
Code:
root@DS920plus:~# /volume1/script/syno_created_date.sh
Synology_created_date v1.0.0
github.com/007revad/Synology_created_date

DS920+ 2090SBRSY7FVG Erstellungsdatum: 2020 Sep
root@DS920plus:~#

Edit: On Github you wrote: "Script to show you the created year and month of your Synology NAS or expansion unit."
How to get the information about the DX517???
 
Zuletzt bearbeitet:
  • Like
Reaktionen: DaveR
You discovered that 3 hours after I did. Last night I was about to go to bed when I suddenly realised that the script does not process expansion units (even though I said it did in the readme).

I also realised I don't how to get the serial number from expansion units. So I spent about 2 hours trying to get the serial number from my DX213. I came to the conclusion that for expansion units DSM only gets the model, expansion port number and drives (and other stuff like the SATA controller's vendor id and device id). But not the serial number.

I also found that /usr/syno/sbin/eunit_info writes the expansion unit model, port number and disks to /tmp/eunitinfo_N where N is the NAS expansion unit port number.
Code:
root@DISKSTATION:~# cat /tmp/eunitinfo_2
EUnitModel=DX213-2
EUnitDisks=/dev/sata1

I'd always wondered what /usr/syno/sbin/eunit_info did because it has no help or stdout.

I'm updating the script so if it detects any connected expansion units it will ask the user to enter the first 3 characters of each expansion unit's serial number.
 
New version 1.1.1 available at https://github.com/007revad/Synology_created_date

Changes:
- Added code to decode expansion unit serial numbers.
- Changed to be 11 seconds faster for models without syno_slot_mapping command.
- Bug fix for old models with serial numbers starting with a letter.
- Bug fix for when language is set to "Browser default".

1766035148161.png
 
  • Like
Reaktionen: Benie und maxblank
The translation was actually easy.

Code:
eunit_lang(){ 
    case "$1" in
        chs)
            question="请输入 $eunit 序列号的前 3 个字符";;
        cht)
            question="請輸入 $eunit 序號的前 3 個字元";;
        csy)
            question="Zadejte první 3 znaky sériového čísla $eunit";;
        dan)
            question="Indtast de første 3 tegn i $eunit serienummeret";;
        enu)
            question="Enter the first 3 characters of $eunit serial number";;
        fre)
            question="Saisissez les 3 premiers caractères du numéro de série $eunit";;
        ger)
            question="Geben Sie die ersten 3 Zeichen der Seriennummer $eunit ein";;
        hun)
            question="Írja be a $eunit sorozatszámának első 3 karakterét";;
        ita)
            question="Inserisci i primi 3 caratteri del numero di serie $eunit";;
        jpn)
            question="$eunitシリアル番号の最初の3文字を入力します";;
        krn)
            question="$eunit 시리얼 번호의 처음 3자리를 입력하세요";;
        nld)
            question="Voer de eerste 3 tekens van het serienummer van de $eunit in";;
        nor)
            question="Skriv inn de tre første tegnene i serienummeret til $eunit";;
        plk)
            question="Wpisz pierwsze 3 znaki numeru seryjnego $eunit";;
        ptb)
            question="Digite os 3 primeiros caracteres do número de série do $eunit";;
        ptg)
            question="Introduza os primeiros 3 caracteres do número de série do $eunit";;
        rus)
            question="Введите первые 3 символа серийного номера $eunit";;
        spn)
            question="Introduzca los primeros 3 caracteres del número de serie $eunit";;
        sve)
            question="Ange de första 3 tecknen i $eunit serienummer";;
        tha)
            question="ป้อนอักขระ 3 ตัวแรกของหมายเลขซีเรียล $eunit";;
        trk)
            question="$eunit seri numarasının ilk 3 karakterini girin";;
        *) echo "Invalid arg '$1'";;
    esac
}
 

Additional post fields

 

Kaffeautomat

Wenn du das Forum hilfreich findest oder uns unterstützen möchtest, dann gib uns doch einfach einen Kaffee aus.

Als Dankeschön schalten wir deinen Account werbefrei.

:coffee:

Hier gehts zum Kaffeeautomat