First commit

This commit is contained in:
2018-03-13 08:04:28 +01:00
commit 196a7d2af6
32 changed files with 33836 additions and 0 deletions

18
syno/test.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
OID_model="1.3.6.1.4.1.6574.1.5.1.0"
OID_serialNumber="1.3.6.1.4.1.6574.1.5.2.0"
#syno=".1.3.6.1.4.1.6574.1.5.1.0 = \"DS414\" .1.3.6.1.4.1.6574.1.5.2.0 = \"13B0LUN002661\" .1.3.6.1.4.1.6574.1.5.3.0 = \"DSM 5.0-4493\" .1.3.6.1.4.1.6574.1.2.0 = 37 .1.3.6.1.4.1.6574.1.1.0 = 1 .1.3.6.1.4.1.6574.1.3.0 = 1 .1.3.6.1.4.1.6574.1.4.1.0 = 1 .1.3.6.1.4.1.6574.1.4.2.0 = 1 .1.3.6.1.4.1.6574.1.5.4.0 = 3"
syno=".1.3.6.1.4.1.6574.1.5.1.0 = "DS414" .1.3.6.1.4.1.6574.1.5.2.0 = "13B0LUN002661" .1.3.6.1.4.1.6574.1.5.3.0 = "DSM 5.0-4493" .1.3.6.1.4.1.6574.1.2.0 = 37 .1.3.6.1.4.1.6574.1.1.0 = 1 .1.3.6.1.4.1.6574.1.3.0 = 1 .1.3.6.1.4.1.6574.1.4.1.0 = 1 .1.3.6.1.4.1.6574.1.4.2.0 = 1 .1.3.6.1.4.1.6574.1.5.4.0 = 3"
#echo "$syno"
aa=$(echo "$syno" | grep $OID_model)
echo "$aa"
model=$(echo "$syno" | grep $OID_model | cut -d "=" -f2)
echo "Synology model: $model"
serialNumber=$(echo "$syno" | grep $OID_serialNumber | cut -d "=" -f2)
echo "Synology s/n: $serialNumber"