ait/poc/scanner/99-qubes_block.rule
author mb
Sat, 04 May 2013 12:17:31 -0400
changeset 1 446a7ba98309
permissions -rw-r--r--
added scanner scripts
     1 # Expose all (except xen-frontend) block devices via xenstore
     2 
     3 # Only block devices are interesting
     4 SUBSYSTEM!="block", GOTO="qubes_block_end"
     5 
     6 # Skip xen-blkfront devices
     7 ENV{MAJOR}=="202", GOTO="qubes_block_end"
     8 
     9 # Skip device-mapper devices
    10 ENV{MAJOR}=="253", GOTO="qubes_block_end"
    11 
    12 IMPORT{db}="QUBES_EXPOSED"
    13 ACTION=="add", IMPORT{program}="/usr/lib/qubes/block_add_change"
    14 ACTION=="change", IMPORT{program}="/usr/lib/qubes/block_add_change"
    15 ACTION=="remove", RUN+="/usr/lib/qubes/block_remove"
    16 
    17 LABEL="qubes_block_end"
    18 
    19 # Cleanup disconnected frontend from xenstore
    20 ACTION=="remove", SUBSYSTEM=="block", ENV{MAJOR}=="202", RUN+="/usr/lib/qubes/block_cleanup"