[PATCH 02/10] kpartx.rules: respect skip_kpartx flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Check if DM_SUBSYSTEM_UDEV_FLAG1 is set, and if so, don't run kpartx.
If the event was not generated by device-mapper, just use the existing
value of DM_SUBSYSTEM_UDEV_FLAG1.

Signed-off-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx>
---
 kpartx/kpartx.rules | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kpartx/kpartx.rules b/kpartx/kpartx.rules
index 1713f3c..48a4d6c 100644
--- a/kpartx/kpartx.rules
+++ b/kpartx/kpartx.rules
@@ -37,6 +37,8 @@ ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", \
 # Create dm tables for partitions
 ENV{DM_ACTION}=="PATH_FAILED|PATH_REINSTATED", GOTO="kpartx_end"
 ENV{DM_NR_VALID_PATHS}=="0", GOTO="kpartx_end"
+ENV{ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}!="1", IMPORT{db}="DM_SUBSYSTEM_UDEV_FLAG1"
+ENV{DM_SUBSYSTEM_UDEV_FLAG1}=="1", GOTO="kpartx_end"
 ENV{DM_STATE}!="SUSPENDED", ENV{DM_UUID}=="mpath-*", \
 	RUN+="/sbin/kpartx -u -p -part /dev/$name"
 
-- 
1.8.3.1

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux