60-cdrom_id.rules 646 B

1234567891011121314151617181920
  1. # do not edit this file, it will be overwritten on update
  2. ACTION=="remove", GOTO="cdrom_end"
  3. SUBSYSTEM!="block", GOTO="cdrom_end"
  4. KERNEL!="sr[0-9]*|xvd*", GOTO="cdrom_end"
  5. ENV{DEVTYPE}!="disk", GOTO="cdrom_end"
  6. # unconditionally tag device as CDROM
  7. KERNEL=="sr[0-9]*", ENV{ID_CDROM}="1"
  8. # media eject button pressed
  9. ENV{DISK_EJECT_REQUEST}=="?*", RUN+="cdrom_id --eject-media $devnode", GOTO="cdrom_end"
  10. # import device and media properties and lock tray to
  11. # enable the receiving of media eject button events
  12. IMPORT{program}="cdrom_id --lock-media $devnode"
  13. KERNEL=="sr0", SYMLINK+="cdrom", OPTIONS+="link_priority=-100"
  14. LABEL="cdrom_end"