summaryrefslogtreecommitdiff
path: root/modules.d
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
parentd6462323d6df4a50d1e774827a7e21a1565bf844 (diff)
downloaddracut-52168b7b9d20aa9a140c8b6a2cc4083b7b8c85fd.tar.gz
dracut-52168b7b9d20aa9a140c8b6a2cc4083b7b8c85fd.tar.bz2
dracut-52168b7b9d20aa9a140c8b6a2cc4083b7b8c85fd.zip
reordered blkid/vol_id rules
Diffstat (limited to 'modules.d')
-rw-r--r--modules.d/90lvm/64-lvm-vol_id.rules4
-rw-r--r--modules.d/90lvm/64-lvm.rules10
-rw-r--r--modules.d/90mdraid/61-mdadm.rules1
-rwxr-xr-xmodules.d/90mdraid/install4
-rw-r--r--modules.d/95nbd/61-nbd-vol_id.rules7
-rw-r--r--modules.d/95nbd/61-nbd.rules6
-rwxr-xr-xmodules.d/95nbd/install6
-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
11 files changed, 41 insertions, 37 deletions
diff --git a/modules.d/90lvm/64-lvm-vol_id.rules b/modules.d/90lvm/64-lvm-vol_id.rules
index 1e759489..4f349a6c 100644
--- a/modules.d/90lvm/64-lvm-vol_id.rules
+++ b/modules.d/90lvm/64-lvm-vol_id.rules
@@ -6,9 +6,7 @@
SUBSYSTEM!="block", GOTO="lvm_end"
ACTION!="add|change", GOTO="lvm_end"
-KERNEL=="dm-[0-9]*", ACTION=="add", GOTO="lvm_end"
-
-KERNEL=="dm-[0-9]*", IMPORT{program}="vol_id --export $tempnode"
+KERNEL=="dm-[0-9]*", ACTION!="change", GOTO="lvm_end"
ENV{ID_FS_TYPE}=="LVM2_member", \
TEST!="/tmp/.lvm_scan-%k", \
diff --git a/modules.d/90lvm/64-lvm.rules b/modules.d/90lvm/64-lvm.rules
index 3aef1ddd..0a053aed 100644
--- a/modules.d/90lvm/64-lvm.rules
+++ b/modules.d/90lvm/64-lvm.rules
@@ -8,18 +8,8 @@ SUBSYSTEM!="block", GOTO="lvm_end"
ACTION!="add|change", GOTO="lvm_end"
KERNEL=="dm-[0-9]*", ACTION=="add", GOTO="lvm_end"
-KERNEL=="dm-[0-9]*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
-KERNEL=="cciss[0-9]*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
-
ENV{ID_FS_TYPE}=="LVM2_member", \
TEST!="/tmp/.lvm_scan-%k", \
RUN+="/bin/sh -c '>/tmp/.lvm_scan-%k; /bin/ln -fs /sbin/lvm_scan /initqueue/lvm_scan.sh'"
-KERNEL!="dm-[0-9]*", GOTO="lvm_end"
-
-OPTIONS="link_priority=-100"
-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="lvm_end"
diff --git a/modules.d/90mdraid/61-mdadm.rules b/modules.d/90mdraid/61-mdadm.rules
deleted file mode 100644
index 87becdcd..00000000
--- a/modules.d/90mdraid/61-mdadm.rules
+++ /dev/null
@@ -1 +0,0 @@
-SUBSYSTEM=="block", ACTION=="add|change", KERNEL=="md[0-9]*|md_d[0-9]*|md/*", IMPORT{program}="vol_id --export $tempnode"
diff --git a/modules.d/90mdraid/install b/modules.d/90mdraid/install
index cb9ab29f..60f289a7 100755
--- a/modules.d/90mdraid/install
+++ b/modules.d/90mdraid/install
@@ -11,9 +11,7 @@ dracut_install mdadm partx
# inst /etc/passwd
# inst /etc/group
-if [ -x /lib/udev/vol_id ]; then
- inst_rules "$moddir/61-mdadm.rules"
-else
+if [ ! -x /lib/udev/vol_id ]; then
inst_rules 64-md-raid.rules
fi
diff --git a/modules.d/95nbd/61-nbd-vol_id.rules b/modules.d/95nbd/61-nbd-vol_id.rules
deleted file mode 100644
index 67c2fb2a..00000000
--- a/modules.d/95nbd/61-nbd-vol_id.rules
+++ /dev/null
@@ -1,7 +0,0 @@
-SUBSYSTEM!="block", GOTO="nbd_end"
-ACTION!="change", GOTO="nbd_end"
-
-KERNEL=="nbd[0-9]*", IMPORT{program}="vol_id --export $tempnode"
-KERNEL=="nbd[0-9]*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
-
-LABEL="nbd_end"
diff --git a/modules.d/95nbd/61-nbd.rules b/modules.d/95nbd/61-nbd.rules
deleted file mode 100644
index f8c9509d..00000000
--- a/modules.d/95nbd/61-nbd.rules
+++ /dev/null
@@ -1,6 +0,0 @@
-SUBSYSTEM!="block", GOTO="nbd_end"
-ACTION!="change", GOTO="nbd_end"
-
-KERNEL=="nbd[0-9]*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
-
-LABEL="nbd_end"
diff --git a/modules.d/95nbd/install b/modules.d/95nbd/install
index 195c27e5..b4673fcb 100755
--- a/modules.d/95nbd/install
+++ b/modules.d/95nbd/install
@@ -2,10 +2,4 @@
inst nbd-client
inst_hook cmdline 90 "$moddir/parse-nbdroot.sh"
-if [ -x /lib/udev/vol_id ]; then
- inst_rules "$moddir/61-nbd-vol_id.rules"
-else
- inst_rules "$moddir/61-nbd.rules"
-fi
-
inst "$moddir/nbdroot" "/sbin/nbdroot"
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 \