]> git.pld-linux.org Git - projects/geninitrd.git/blob - udev-rules/59-persistent-storage.rules
no need to mess with magic values, let the "magic" be value
[projects/geninitrd.git] / udev-rules / 59-persistent-storage.rules
1 SUBSYSTEM!="block", GOTO="ps_end"
2 ACTION!="add|change", GOTO="ps_end"
3
4 KERNEL=="cciss[0-9]*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
5 KERNEL=="nbd[0-9]*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
6
7
8 KERNEL!="md[0-9]*|md_d[0-9]*|md/*", KERNEL!="md*", GOTO="md_end"
9
10 # partitions have no md/{array_state,metadata_version}
11 ENV{DEVTYPE}=="partition", GOTO="md_ignore_state"
12
13 # container devices have a metadata version of e.g. 'external:ddf' and
14 # never leave state 'inactive'
15 ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state"
16 TEST!="md/array_state", GOTO="md_end"
17 ATTR{md/array_state}=="|clear|inactive", GOTO="md_end"
18
19 LABEL="md_ignore_state"
20
21 IMPORT{program}="/sbin/mdadm --detail --export $tempnode"
22 IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
23 OPTIONS+="link_priority=100"
24 OPTIONS+="watch"
25 LABEL="md_end"
26
27
28 KERNEL!="dm-[0-9]*", GOTO="ps_end"
29 ACTION=="add", GOTO="ps_end"
30 IMPORT{program}="/sbin/dmsetup info -c --nameprefixes --unquoted --rows --noheadings -o name,uuid,suspended,readonly,major,minor,open,tables_loaded,names_using_dev -j%M -m%m"
31 ENV{DM_NAME}!="?*", GOTO="ps_end"
32 ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="ps_end"
33 ENV{DM_UUID}=="CRYPT-TEMP-?*", GOTO="ps_end"
34 ENV{DM_UUID}!="?*", ENV{DM_NAME}=="temporary-cryptsetup-?*", GOTO="ps_end"
35 IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
36
37
38 LABEL="ps_end"
This page took 0.099368 seconds and 3 git commands to generate.