Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
udevadm [2018/04/09 02:02]
beandog
udevadm [2018/04/09 02:04]
beandog
Line 14: Line 14:
  
 That's what I use when doing my onevent trayclose calls. That's what I use when doing my onevent trayclose calls.
 +
 +In ''/​etc/​udev/​rules.d/​70-persistent-cd.rules''​ I generate a symlink to ''/​dev/​dvd''​ and ''/​dev/​bluray'',​ as well as call ''​onevent.trayclose''​ when there is a DVD detected in the drive on an event change (tray closed from being open).
 +
 +<​code>​
 +# Sony Blu-ray
 +SUBSYSTEM=="​block",​ ENV{ID_MODEL}=="​ATAPI_iHOS104",​ ENV{ID_REVISION}=="​WL0D",​ SYMLINK+="​bluray",​ ENV{GENERATED}="​1"​
 +SUBSYSTEM=="​block",​ ENV{ID_MODEL}=="​ATAPI_iHOS104",​ ENV{ID_REVISION}=="​WL0D",​ SYMLINK+="​dvd",​ ENV{GENERATED}="​1"​
 +SUBSYSTEM=="​block",​ ENV{ID_MODEL}=="​ATAPI_iHOS104",​ ENV{ID_CDROM_MEDIA_DVD}=="​1",​ ENV{ID_CDROM_MEDIA_STATE}=="​complete",​ RUN+="/​usr/​local/​bin/​onevent.trayclose"​
 +</​code>​

Navigation