From c9111106f50841779382936381501a6650f45dfd Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 18 Jun 2009 14:16:25 +0200 Subject: [PATCH] remove redundant vol_id run from out udev rules moved mdadm rules before luks rules add nbd vol_id rules --- modules.d/50plymouth-pre0.7/63-luks.rules | 2 -- modules.d/50plymouth/63-luks.rules | 1 - modules.d/90crypt/63-luks.rules | 1 - modules.d/90lvm/64-lvm.rules | 2 +- modules.d/90mdraid/{70-mdadm.rules => 61-mdadm.rules} | 2 +- modules.d/90mdraid/install | 2 +- modules.d/95nbd/61-nbd.rules | 6 ++++++ modules.d/95nbd/install | 1 + 8 files changed, 10 insertions(+), 7 deletions(-) rename modules.d/90mdraid/{70-mdadm.rules => 61-mdadm.rules} (84%) create mode 100644 modules.d/95nbd/61-nbd.rules diff --git a/modules.d/50plymouth-pre0.7/63-luks.rules b/modules.d/50plymouth-pre0.7/63-luks.rules index 893577b..711e865 100644 --- a/modules.d/50plymouth-pre0.7/63-luks.rules +++ b/modules.d/50plymouth-pre0.7/63-luks.rules @@ -6,8 +6,6 @@ SUBSYSTEM!="block", GOTO="luks_end" ACTION!="add|change", GOTO="luks_end" - -KERNEL!="sr*", IMPORT{program}="vol_id --export $tempnode" ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="cryptroot-ask $env{DEVNAME} luks-$env{ID_FS_UUID}" LABEL="luks_end" diff --git a/modules.d/50plymouth/63-luks.rules b/modules.d/50plymouth/63-luks.rules index 01a1b1d..cfa619b 100644 --- a/modules.d/50plymouth/63-luks.rules +++ b/modules.d/50plymouth/63-luks.rules @@ -7,7 +7,6 @@ SUBSYSTEM!="block", GOTO="luks_end" ACTION!="add|change", GOTO="luks_end" -KERNEL!="sr*", IMPORT{program}="vol_id --export $tempnode" ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="/sbin/cryptroot-ask $env{DEVNAME} luks-$env{ID_FS_UUID}" LABEL="luks_end" diff --git a/modules.d/90crypt/63-luks.rules b/modules.d/90crypt/63-luks.rules index 01a1b1d..cfa619b 100644 --- a/modules.d/90crypt/63-luks.rules +++ b/modules.d/90crypt/63-luks.rules @@ -7,7 +7,6 @@ SUBSYSTEM!="block", GOTO="luks_end" ACTION!="add|change", GOTO="luks_end" -KERNEL!="sr*", IMPORT{program}="vol_id --export $tempnode" ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="/sbin/cryptroot-ask $env{DEVNAME} luks-$env{ID_FS_UUID}" LABEL="luks_end" diff --git a/modules.d/90lvm/64-lvm.rules b/modules.d/90lvm/64-lvm.rules index f742287..8a2fcc4 100644 --- a/modules.d/90lvm/64-lvm.rules +++ b/modules.d/90lvm/64-lvm.rules @@ -7,7 +7,7 @@ SUBSYSTEM!="block", GOTO="lvm_end" ACTION!="add|change", GOTO="lvm_end" -KERNEL!="sr*", IMPORT{program}="vol_id --export $tempnode" +KERNEL=="dm-[0-9]*", IMPORT{program}="vol_id --export $tempnode" ENV{ID_FS_TYPE}=="LVM2_member", RUN+="/bin/sh -c '/sbin/lvm vgscan; /sbin/lvm vgchange -ay'" LABEL="lvm_end" diff --git a/modules.d/90mdraid/70-mdadm.rules b/modules.d/90mdraid/61-mdadm.rules similarity index 84% rename from modules.d/90mdraid/70-mdadm.rules rename to modules.d/90mdraid/61-mdadm.rules index ae54c96..1a5d98c 100644 --- a/modules.d/90mdraid/70-mdadm.rules +++ b/modules.d/90mdraid/61-mdadm.rules @@ -6,7 +6,7 @@ SUBSYSTEM!="block", GOTO="raid_end" ACTION!="add|change", GOTO="raid_end" KERNEL=="md/*", GOTO="raid_end" -KERNEL!="sr*", IMPORT{program}="vol_id --export $tempnode" +KERNEL=="md*", IMPORT{program}="vol_id --export $tempnode" ENV{ID_FS_TYPE}=="linux_raid_member", RUN+="/sbin/mdadm -IR $root/%k" LABEL="raid_end" diff --git a/modules.d/90mdraid/install b/modules.d/90mdraid/install index 6b729d9..a6fad0d 100755 --- a/modules.d/90mdraid/install +++ b/modules.d/90mdraid/install @@ -3,7 +3,7 @@ dracut_install mdadm inst /etc/passwd inst /etc/group instmods =drivers/md -inst_rules "$moddir/70-mdadm.rules" +inst_rules "$moddir/61-mdadm.rules" [ -f /etc/mdadm/mdadm.conf ] && inst /etc/mdadm/mdadm.conf /etc/mdadm.conf [ -f /etc/mdadm.conf ] && inst /etc/mdadm.conf if [ -x /sbin/mdmon ] ; then diff --git a/modules.d/95nbd/61-nbd.rules b/modules.d/95nbd/61-nbd.rules new file mode 100644 index 0000000..5892cf3 --- /dev/null +++ b/modules.d/95nbd/61-nbd.rules @@ -0,0 +1,6 @@ +SUBSYSTEM!="block", GOTO="nbd_end" +ACTION!="add|change", GOTO="nbd_end" + +KERNEL=="nbd*", IMPORT{program}="vol_id --export $tempnode" + +LABEL="nbd_end" diff --git a/modules.d/95nbd/install b/modules.d/95nbd/install index eca74e4..dace08f 100755 --- a/modules.d/95nbd/install +++ b/modules.d/95nbd/install @@ -2,5 +2,6 @@ inst nbd-client inst_hook cmdline 90 "$moddir/parse-nbdroot.sh" +inst_rules "$moddir/61-nbd.rules" inst "$moddir/nbdroot" "/sbin/nbdroot" instmods nbd -- 2.7.4