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
|
2014-06-07 02:53:32 +00:00
|
|
|
ENV{MAJOR}=="253", ENV{DM_NAME}=="snapshot-*", GOTO="qubes_block_end"
|
2014-07-05 14:12:37 +00:00
|
|
|
ENV{MAJOR}=="253", ENV{DM_NAME}=="origin-*", GOTO="qubes_block_end"
|
2014-07-04 01:29:38 +00:00
|
|
|
ENV{MAJOR}=="253", ENV{DM_NAME}=="", GOTO="qubes_block_end"
|
2013-03-20 05:27:32 +00:00
|
|
|
|
|
|
|
IMPORT{db}="QUBES_EXPOSED"
|
2014-01-13 04:01:56 +00:00
|
|
|
ACTION=="add", IMPORT{program}="/usr/bin/flock /var/run/qubes-udev.lock -c /usr/libexec/qubes/udev-block-add-change"
|
|
|
|
ACTION=="change", IMPORT{program}="/usr/bin/flock /var/run/qubes-udev.lock -c /usr/libexec/qubes/udev-block-add-change"
|
2013-03-20 05:27:32 +00:00
|
|
|
ACTION=="remove", RUN+="/usr/libexec/qubes/udev-block-remove"
|
|
|
|
|
|
|
|
LABEL="qubes_block_end"
|
|
|
|
|
|
|
|
# Cleanup disconnected frontend from xenstore
|
|
|
|
ACTION=="remove", SUBSYSTEM=="block", ENV{MAJOR}=="202", RUN+="/usr/libexec/qubes/udev-block-cleanup"
|