Search
j0ke.net Open Build Service
>
Projects
>
home:jg
:
playground
>
dracut
> 0145-.rules-honor-DM_UDEV_DISABLE_OTHER_RULES_FLAG.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0145-.rules-honor-DM_UDEV_DISABLE_OTHER_RULES_FLAG.patch of Package dracut
From d3898996b06a721346e8d034b0cc07e35ad993d3 Mon Sep 17 00:00:00 2001 From: Peter Rajnoha <prajnoha@redhat.com> Date: Wed, 10 Nov 2010 18:14:59 +0100 Subject: [PATCH] *.rules: honor DM_UDEV_DISABLE_OTHER_RULES_FLAG honour the DM_UDEV_DISABLE_OTHER_RULES_FLAG which is set by libdevmapper/LVM directly for devices that should be skipped. --- modules.d/90dmraid/61-dmraid-imsm.rules | 2 ++ modules.d/95udev-rules/59-persistent-storage-volid.rules | 4 ++-- modules.d/95udev-rules/59-persistent-storage.rules | 1 + modules.d/95udev-rules/61-persistent-storage.rules | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/modules.d/90dmraid/61-dmraid-imsm.rules b/modules.d/90dmraid/61-dmraid-imsm.rules index 4d608cc..d87fce7 100644 --- a/modules.d/90dmraid/61-dmraid-imsm.rules +++ b/modules.d/90dmraid/61-dmraid-imsm.rules @@ -13,6 +13,8 @@ ENV{ID_FS_TYPE}=="isw_raid_member", ENV{rd_NO_MDIMSM}!="?*", GOTO="dm_end" ENV{rd_NO_DM}=="?*", GOTO="dm_end" +ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="dm_end" + PROGRAM=="/bin/sh -c 'for i in $sys/$devpath/holders/dm-[0-9]*; do [ -e $$i ] && exit 0; done; exit 1;' ", \ GOTO="dm_end" diff --git a/modules.d/95udev-rules/59-persistent-storage-volid.rules b/modules.d/95udev-rules/59-persistent-storage-volid.rules index ca24358..0b798e6 100644 --- a/modules.d/95udev-rules/59-persistent-storage-volid.rules +++ b/modules.d/95udev-rules/59-persistent-storage-volid.rules @@ -1,7 +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" +ACTION=="change", KERNEL=="dm-[0-9]*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}!="1", 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 +LABEL="psv_end" diff --git a/modules.d/95udev-rules/59-persistent-storage.rules b/modules.d/95udev-rules/59-persistent-storage.rules index 89c7609..2b83e72 100644 --- a/modules.d/95udev-rules/59-persistent-storage.rules +++ b/modules.d/95udev-rules/59-persistent-storage.rules @@ -29,6 +29,7 @@ KERNEL!="dm-[0-9]*", GOTO="ps_end" ACTION=="add", GOTO="ps_end" 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" ENV{DM_NAME}!="?*", GOTO="ps_end" +ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="ps_end" ENV{DM_UUID}=="CRYPT-TEMP-?*", GOTO="ps_end" ENV{DM_UUID}!="?*", ENV{DM_NAME}=="temporary-cryptsetup-?*", GOTO="ps_end" IMPORT{program}="/sbin/blkid -o udev -p $tempnode" diff --git a/modules.d/95udev-rules/61-persistent-storage.rules b/modules.d/95udev-rules/61-persistent-storage.rules index c549e1b..9cfdb0b 100644 --- a/modules.d/95udev-rules/61-persistent-storage.rules +++ b/modules.d/95udev-rules/61-persistent-storage.rules @@ -1,7 +1,7 @@ SUBSYSTEM!="block", GOTO="pss_end" ACTION!="add|change", GOTO="pss_end" -ACTION=="change", KERNEL=="dm-[0-9]*", GOTO="do_pss" +ACTION=="change", KERNEL=="dm-[0-9]*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}!="1", 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" @@ -17,4 +17,4 @@ ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PA # 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 +LABEL="pss_end" -- 1.8.3.1