File kpartx-compability-rules.patch of Package multipath-tools.openSUSE_13.1_Update

From 6e49ee4ec484e6c31f62f64a85272d49de34c401 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Tue, 7 Jan 2014 09:58:21 +0100
Subject: [PATCH] kpartx: Add udev compability rules for SUSE

Older versions of SUSE were using an underscore between the
device-mapper name and the partition string. Newer versions
and upstream would be using a minus here.

This rule adds a compability link with an underscore to
provide compability for older installations.

Signed-off-by: Hannes Reinecke <hare@suse.de>

diff --git a/kpartx/kpartx-compat.rules b/kpartx/kpartx-compat.rules
new file mode 100644
index 0000000..3b94f92
--- /dev/null
+++ b/kpartx/kpartx-compat.rules
@@ -0,0 +1,16 @@
+#
+# kpartx compability rules for SUSE
+#
+# Older versions were using an underscore between
+# DM_NAME and the partition number.
+#
+# Newer (and upstream) versions were using a minus here.
+#
+
+KERNEL!="dm-*", GOTO="kpartx_compat_end"
+ACTION=="remove", GOTO="kpartx_compat_end"
+
+ENV{DM_NAME}=="?*", ENV{DM_PART}=="?*", \
+	SYMLINK+="mapper/$env{DM_NAME}_part$env{DM_PART}"
+
+LABEL="kpartx_compat_end"
openSUSE Build Service is sponsored by