643ff5876d
Since migration to QubesDB, it isn't needed anymore (QubesDB have no problem with concurrent writes, as transactions are not supported). This should speedup system startup.
27 lines
1021 B
Plaintext
27 lines
1021 B
Plaintext
# Expose all (except xen-frontend) block devices via Qubes DB
|
|
|
|
# Only block devices are interesting
|
|
SUBSYSTEM!="block", GOTO="qubes_block_end"
|
|
|
|
# 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"
|
|
|
|
# Skip xen-blkfront devices
|
|
ENV{MAJOR}=="202", GOTO="qubes_block_end"
|
|
|
|
# Skip device-mapper devices
|
|
ENV{MAJOR}=="253", ENV{DM_NAME}=="snapshot-*", GOTO="qubes_block_end"
|
|
ENV{MAJOR}=="253", ENV{DM_NAME}=="origin-*", GOTO="qubes_block_end"
|
|
ENV{MAJOR}=="253", ENV{DM_NAME}=="", GOTO="qubes_block_end"
|
|
|
|
IMPORT{db}="QUBES_EXPOSED"
|
|
ACTION=="add", IMPORT{program}="/usr/libexec/qubes/udev-block-add-change"
|
|
ACTION=="change", IMPORT{program}="/usr/libexec/qubes/udev-block-add-change"
|
|
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"
|