Blame SOURCES/0002-RH-multipath.rules.patch

671555
---
671555
 multipath/Makefile        |    3 +++
671555
 multipath/multipath.rules |   24 ++++++++++++++++++++++++
671555
 2 files changed, 27 insertions(+)
671555
671555
Index: multipath-tools-130222/multipath/multipath.rules
671555
===================================================================
671555
--- /dev/null
671555
+++ multipath-tools-130222/multipath/multipath.rules
671555
@@ -0,0 +1,24 @@
671555
+# multipath wants the devmaps presented as meaninglful device names
671555
+# so name them after their devmap name
671555
+SUBSYSTEM!="block", GOTO="end_mpath"
671555
+
671555
+ENV{MPATH_SBIN_PATH}="/sbin"
671555
+TEST!="$env{MPATH_SBIN_PATH}/multipath", ENV{MPATH_SBIN_PATH}="/usr/sbin"
671555
+
671555
+ACTION=="add", ENV{DEVTYPE}!="partition", \
671555
+	ENV{DM_MULTIPATH_DEVICE_PATH}!="1", \
671555
+	TEST=="/etc/multipath.conf", \
671555
+	PROGRAM=="$env{MPATH_SBIN_PATH}/multipath -c $tempnode", \
671555
+	ENV{DM_MULTIPATH_DEVICE_PATH}="1"
671555
+
671555
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", ENV{DEVTYPE}!="partition", \
671555
+	RUN+="/sbin/partx -d --nr 1-1024 $env{DEVNAME}"
671555
+
671555
+KERNEL!="dm-*", GOTO="end_mpath"
671555
+ENV{DM_UUID}=="mpath-?*|part[0-9]*-mpath-?*", OPTIONS+="link_priority=10"
671555
+ACTION!="change", GOTO="end_mpath"
671555
+ENV{DM_UUID}!="mpath-?*", GOTO="end_mpath"
671555
+ENV{DM_SUSPENDED}=="1", GOTO="end_mpath"
671555
+ENV{DM_ACTION}=="PATH_FAILED", GOTO="end_mpath"
671555
+RUN+="$env{MPATH_SBIN_PATH}/kpartx -a $tempnode"
671555
+LABEL="end_mpath"
671555
Index: multipath-tools-130222/multipath/Makefile
671555
===================================================================
671555
--- multipath-tools-130222.orig/multipath/Makefile
671555
+++ multipath-tools-130222/multipath/Makefile
671555
@@ -21,12 +21,15 @@ $(EXEC): $(OBJS)
671555
 install:
671555
 	$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
671555
 	$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/
671555
+	$(INSTALL_PROGRAM) -d $(DESTDIR)/lib/udev/rules.d
671555
+	$(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)/lib/udev/rules.d/62-multipath.rules
671555
 	$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)
671555
 	$(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
671555
 	$(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir)
671555
 	$(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5.gz $(DESTDIR)$(man5dir)
671555
 
671555
 uninstall:
671555
+	rm $(DESTDIR)/lib/udev/rules.d/62-multipath.rules
671555
 	rm $(DESTDIR)$(bindir)/$(EXEC)
671555
 	rm $(DESTDIR)$(mandir)/$(EXEC).8.gz
671555
 	rm $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz