udev: ignore devices set to be ignore elsewhere

There are already some other rules to ignore not interesting devices.
This includes device-mapper assembled in initramfs manually. 'dmroot'
isn't properly detected as mounted because /dev/mapper/dmroot isn't a
symlink to /dev/dm-0 and /proc/mounts contains the former name, while
udev event the later.

Fixes QubesOS/qubes-issues#1586
This commit is contained in:
Marek Marczykowski-Górecki 2016-01-06 04:23:23 +01:00
parent 50145d448a
commit 6ac3fc3247
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -14,6 +14,7 @@ ENV{MAJOR}=="202", GOTO="qubes_block_end"
KERNEL=="dm-*", ENV{DM_NAME}=="snapshot-*", GOTO="qubes_block_end" 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}=="origin-*", GOTO="qubes_block_end"
KERNEL=="dm-*", ENV{DM_NAME}=="", GOTO="qubes_block_end" KERNEL=="dm-*", ENV{DM_NAME}=="", GOTO="qubes_block_end"
ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}=="1", GOTO="qubes_block_end"
IMPORT{db}="QUBES_EXPOSED" IMPORT{db}="QUBES_EXPOSED"
ACTION=="add", IMPORT{program}="/usr/lib/qubes/udev-block-add-change" ACTION=="add", IMPORT{program}="/usr/lib/qubes/udev-block-add-change"