2011-09-29 13:49:52 +02:00
|
|
|
# Expose all (except xen-frontend) block devices via xenstore
|
|
|
|
|
|
|
|
# Only block devices are interesting
|
|
|
|
SUBSYSTEM!="block", GOTO="qubes_block_end"
|
|
|
|
|
|
|
|
# Skip xen-blkfront devices
|
|
|
|
ENV{MAJOR}=="202", GOTO="qubes_block_end"
|
|
|
|
|
|
|
|
# Skip loop devices
|
|
|
|
ENV{MAJOR}=="7", GOTO="qubes_block_end"
|
|
|
|
|
|
|
|
# Skip device-mapper devices
|
|
|
|
ENV{MAJOR}=="253", GOTO="qubes_block_end"
|
|
|
|
|
|
|
|
ACTION=="add", RUN+="/usr/lib/qubes/block_add_change"
|
|
|
|
ACTION=="change", RUN+="/usr/lib/qubes/block_add_change"
|
|
|
|
ACTION=="remove", RUN+="/usr/lib/qubes/block_remove"
|
|
|
|
|
|
|
|
LABEL="qubes_block_end"
|
2011-09-30 03:36:06 +02:00
|
|
|
|
|
|
|
# Cleanup disconnected frontend from xenstore
|
|
|
|
ACTION=="remove", SUBSYSTEM=="block", ENV{MAJOR}=="202", RUN+="/usr/lib/qubes/block_cleanup"
|