summaryrefslogtreecommitdiff
path: root/modules.d/95udev-rules
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2009-09-02 15:26:02 +0200
committerHarald Hoyer <harald@redhat.com>2009-09-02 15:55:34 +0200
commit52168b7b9d20aa9a140c8b6a2cc4083b7b8c85fd (patch)
tree959d05e1788170e8edea43638492503ced8278a1 /modules.d/95udev-rules
parentd6462323d6df4a50d1e774827a7e21a1565bf844 (diff)
downloaddracut-52168b7b9d20aa9a140c8b6a2cc4083b7b8c85fd.tar.gz
dracut-52168b7b9d20aa9a140c8b6a2cc4083b7b8c85fd.tar.bz2
dracut-52168b7b9d20aa9a140c8b6a2cc4083b7b8c85fd.zip
reordered blkid/vol_id rules
Diffstat (limited to 'modules.d/95udev-rules')
-rw-r--r--modules.d/95udev-rules/59-persistent-storage-volid.rules7
-rw-r--r--modules.d/95udev-rules/59-persistent-storage.rules7
-rw-r--r--modules.d/95udev-rules/61-persistent-storage.rules20
-rwxr-xr-xmodules.d/95udev-rules/install6
4 files changed, 39 insertions, 1 deletions
diff --git a/modules.d/95udev-rules/59-persistent-storage-volid.rules b/modules.d/95udev-rules/59-persistent-storage-volid.rules
new file mode 100644
index 00000000..ca243584
--- /dev/null
+++ b/modules.d/95udev-rules/59-persistent-storage-volid.rules
@@ -0,0 +1,7 @@
+SUBSYSTEM!="block", GOTO="psv_end"
+ACTION!="add|change", GOTO="psv_end"
+ACTION=="change", KERNEL=="dm-[0-9]*", IMPORT{program}="vol_id --export $tempnode"
+KERNEL=="cciss[0-9]*", IMPORT{program}="vol_id --export $tempnode"
+KERNEL=="nbd[0-9]*", IMPORT{program}="vol_id --export $tempnode"
+KERNEL=="md[0-9]*|md_d[0-9]*|md/*", IMPORT{program}="vol_id --export $tempnode"
+LABEL="psv_end" \ No newline at end of file
diff --git a/modules.d/95udev-rules/59-persistent-storage.rules b/modules.d/95udev-rules/59-persistent-storage.rules
new file mode 100644
index 00000000..41e24aec
--- /dev/null
+++ b/modules.d/95udev-rules/59-persistent-storage.rules
@@ -0,0 +1,7 @@
+SUBSYSTEM!="block", GOTO="ps_end"
+ACTION!="add|change", GOTO="ps_end"
+ACTION=="change", KERNEL=="dm-[0-9]*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
+KERNEL=="cciss[0-9]*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
+KERNEL=="nbd[0-9]*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
+KERNEL=="md[0-9]*|md_d[0-9]*|md/*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
+LABEL="ps_end" \ No newline at end of file
diff --git a/modules.d/95udev-rules/61-persistent-storage.rules b/modules.d/95udev-rules/61-persistent-storage.rules
new file mode 100644
index 00000000..c549e1ba
--- /dev/null
+++ b/modules.d/95udev-rules/61-persistent-storage.rules
@@ -0,0 +1,20 @@
+SUBSYSTEM!="block", GOTO="pss_end"
+ACTION!="add|change", GOTO="pss_end"
+
+ACTION=="change", KERNEL=="dm-[0-9]*", GOTO="do_pss"
+KERNEL=="cciss[0-9]*", GOTO="do_pss"
+KERNEL=="nbd[0-9]*", GOTO="do_pss"
+KERNEL=="md[0-9]*|md_d[0-9]*|md/*", GOTO="do_pss"
+
+GOTO="pss_end"
+
+LABEL="do_pss"
+# by-path (parent device path)
+ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="", DEVPATH!="*/virtual/*", IMPORT{program}="path_id %p"
+ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}"
+ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"
+
+# by-label/by-uuid links (filesystem metadata)
+ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
+ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
+LABEL="pss_end" \ No newline at end of file
diff --git a/modules.d/95udev-rules/install b/modules.d/95udev-rules/install
index 35fc366f..cf22d1e2 100755
--- a/modules.d/95udev-rules/install
+++ b/modules.d/95udev-rules/install
@@ -19,8 +19,12 @@ dracut_install cat uname
if [ ! -x /lib/udev/vol_id ]; then
dracut_install blkid
+ inst_rules "$moddir/59-persistent-storage.rules"
+else
+ inst_rules "$moddir/59-persistent-storage-volid.rules"
fi
-
+inst_rules "$moddir/61-persistent-storage-volid.rules"
+
for i in \
ata_id \
cdrom_id \