qubes_block.rules 638 B

12345678910111213141516171819
  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. ACTION=="add", IMPORT{program}="/usr/lib/qubes/block_add_change"
  9. ACTION=="change", IMPORT{program}="/usr/lib/qubes/block_add_change"
  10. ACTION=="remove", RUN+="/usr/lib/qubes/block_remove"
  11. LABEL="qubes_block_end"
  12. # Cleanup disconnected frontend from xenstore
  13. ACTION=="remove", SUBSYSTEM=="block", ENV{MAJOR}=="202", RUN+="/usr/lib/qubes/block_cleanup"