]> git.ipfire.org Git - thirdparty/systemd.git/blame - etc/udev/gentoo/64-device-mapper.rules
write changed network interface names to the kernel log
[thirdparty/systemd.git] / etc / udev / gentoo / 64-device-mapper.rules
CommitLineData
1532b47b
MS
1# device mapper links hook into "change" events, when the dm table
2# becomes available; some table-types must be ignored
3
4KERNEL=="device-mapper", NAME="mapper/control"
5
54b813ba
MS
6KERNEL!="dm-*", GOTO="device_mapper_end"
7ACTION!="add|change", GOTO="device_mapper_end"
1532b47b
MS
8
9# lookup device name
10# use dmsetup, until devmap_name is provided by sys-fs/device-mapper
11PROGRAM=="/sbin/dmsetup -j %M -m %m --noopencount --noheadings -c -o name info",
564794bb 12 ENV{DM_NAME}="%c"
1532b47b
MS
13
14# do not do anything if dmsetup does not provide a name
564794bb 15ENV{DM_NAME}=="", NAME="", OPTIONS="ignore_device"
1532b47b
MS
16
17# ignore luks crypt devices while not fully up
564794bb 18ENV{DM_NAME}=="temporary-cryptsetup-*", NAME="", OPTIONS="ignore_device"
1532b47b
MS
19
20# use queried name
564794bb
MS
21ENV{DM_NAME}=="?*", NAME="mapper/$env{DM_NAME}"
22
23SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}"
1532b47b
MS
24
25PROGRAM!="/sbin/dmsetup status -j %M -m %m", GOTO="device_mapper_end"
26RESULT=="|*snapshot*|*error*", GOTO="device_mapper_end"
27
28IMPORT{program}="vol_id --export $tempnode"
54b813ba 29OPTIONS="link_priority=50"
564794bb 30ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_SAFE}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_SAFE}"
54b813ba 31ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
1532b47b
MS
32
33LABEL="device_mapper_end"