File: //lib/udev/rules.d/10-unlock-disk.rules
#author: Storage Platform Team
#only handle SATA/SAS/EUNIT port type
ENV{SYNO_DEV_DISKPORTTYPE}!="SATA|SAS|EUNIT|CACHE|SYS", GOTO="disk_end"
#ignore partition
ENV{DEVTYPE}=="partition", GOTO="disk_end"
#ignore multipath device add which not the add of first target device
ENV{SYNO_SUPPORT_MULTIPATH}=="yes", KERNEL=="sas*", ENV{PHYSDEVDRIVER}!="sd", ACTION=="add", ENV{MPATH_TARGET_ADD_TYPE}!="init", GOTO="disk_end"
ACTION=="add", SUBSYSTEM=="block", ENV{DEVNAME}!="", RUN+="/usr/syno/sbin/synostorage --unlock-disk %E{DEVNAME}"
LABEL="disk_end"