First commit
This commit is contained in:
18
syno/test.sh
Executable file
18
syno/test.sh
Executable 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"
|
||||
Reference in New Issue
Block a user