udev-qubes-block.rules 685 B

1234567891011121314151617181920
  1. # Expose all (except xen-frontend) block devices via xenstore
  2. # Only block devices are interesting
  3. SUBSYSTEM!="block", GOTO="qubes_block_end"
  4. # Skip xen-blkfront devices
  5. ENV{MAJOR}=="202", GOTO="qubes_block_end"
  6. # Skip device-mapper devices
  7. ENV{MAJOR}=="253", GOTO="qubes_block_end"
  8. IMPORT{db}="QUBES_EXPOSED"
  9. ACTION=="add", IMPORT{program}="/usr/lib/qubes/udev-block-add-change"
  10. ACTION=="change", IMPORT{program}="/usr/lib/qubes/udev-block-add-change"
  11. ACTION=="remove", RUN+="/usr/lib/qubes/udev-block-remove"
  12. LABEL="qubes_block_end"
  13. # Cleanup disconnected frontend from xenstore
  14. ACTION=="remove", SUBSYSTEM=="block", ENV{MAJOR}=="202", RUN+="/usr/lib/qubes/udev-block-cleanup"