2013-06-07 03:21:41 +00:00
|
|
|
# Expose all (except xen-frontend) block devices via Qubes DB
|
2013-03-20 05:27:32 +00:00
|
|
|
|
|
|
|
# Only block devices are interesting
|
|
|
|
SUBSYSTEM!="block", GOTO="qubes_block_end"
|
|
|
|
|
2014-02-04 03:38:57 +00:00
|
|
|
# Hide qubes-internal drives from udisks, so file selection dialogs
|
|
|
|
ENV{MAJOR}=="7", ENV{UDISKS_IGNORE}="1"
|
|
|
|
KERNEL=="xvda|xvdb|xvdc*|xvdd", ENV{UDISKS_IGNORE}="1"
|
|
|
|
|
2013-03-20 05:27:32 +00:00
|
|
|
# Skip xen-blkfront devices
|
|
|
|
ENV{MAJOR}=="202", GOTO="qubes_block_end"
|
|
|
|
|
|
|
|
# Skip device-mapper devices
|
2016-01-06 03:22:50 +00:00
|
|
|
KERNEL=="dm-*", ENV{DM_NAME}=="snapshot-*", GOTO="qubes_block_end"
|
|
|
|
KERNEL=="dm-*", ENV{DM_NAME}=="origin-*", GOTO="qubes_block_end"
|
|
|
|
KERNEL=="dm-*", ENV{DM_NAME}=="", GOTO="qubes_block_end"
|
2016-11-23 02:40:37 +00:00
|
|
|
KERNEL=="dm-*", ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}=="1", GOTO="qubes_block_end"
|
2013-03-20 05:27:32 +00:00
|
|
|
|
|
|
|
IMPORT{db}="QUBES_EXPOSED"
|
2015-11-26 21:18:03 +00:00
|
|
|
ACTION=="add", IMPORT{program}="/usr/lib/qubes/udev-block-add-change"
|
|
|
|
ACTION=="change", IMPORT{program}="/usr/lib/qubes/udev-block-add-change"
|
|
|
|
ACTION=="remove", RUN+="/usr/lib/qubes/udev-block-remove"
|
2013-03-20 05:27:32 +00:00
|
|
|
|
|
|
|
LABEL="qubes_block_end"
|
|
|
|
|
|
|
|
# Cleanup disconnected frontend from xenstore
|
2015-11-26 21:18:03 +00:00
|
|
|
ACTION=="remove", SUBSYSTEM=="block", ENV{MAJOR}=="202", RUN+="/usr/lib/qubes/udev-block-cleanup"
|