With the above fixes, we still meet failure:
# DEVNAME=/dev/sdb bash -x /lib/udev/hdparm ... + /sbin/hdparm -B254 -q --user-master u -q --security-unlock 'letmein' /dev/sdb # echo $? 22
-> this is because the security commands are exclusive within hdparm, so this is needed:
# /sbin/hdparm --user-master u --security-unlock 'letmein' /dev/sdb
-> though we are closer
With the above fixes, we still meet failure:
# DEVNAME=/dev/sdb bash -x /lib/udev/hdparm
...
+ /sbin/hdparm -B254 -q --user-master u -q --security-unlock 'letmein' /dev/sdb
# echo $?
22
-> this is because the security commands are exclusive within hdparm, so this is needed:
# /sbin/hdparm --user-master u --security-unlock 'letmein' /dev/sdb
-> though we are closer