]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - multipath-tools/patches/0006-RH-multipath.rules.patch
ulogd2: Fix syntax error in makefile.
[people/amarx/ipfire-3.x.git] / multipath-tools / patches / 0006-RH-multipath.rules.patch
1 ---
2 multipath/Makefile | 6 +++---
3 multipath/multipath.rules | 30 ++++++++++++++++++++++++------
4 2 files changed, 27 insertions(+), 9 deletions(-)
5
6 Index: multipath-tools-120613/multipath/multipath.rules
7 ===================================================================
8 --- multipath-tools-120613.orig/multipath/multipath.rules
9 +++ multipath-tools-120613/multipath/multipath.rules
10 @@ -1,7 +1,25 @@
11 -#
12 -# udev rules for multipathing.
13 -# The persistent symlinks are created with the kpartx rules
14 -#
15 +# multipath wants the devmaps presented as meaninglful device names
16 +# so name them after their devmap name
17 +SUBSYSTEM!="block", GOTO="end_mpath"
18
19 -# socket for uevents
20 -SUBSYSTEM=="block", RUN+="socket:/org/kernel/dm/multipath_event"
21 +ENV{MPATH_SBIN_PATH}="/sbin"
22 +TEST!="$env{MPATH_SBIN_PATH}/multipath", ENV{MPATH_SBIN_PATH}="/usr/sbin"
23 +
24 +ACTION=="add", ENV{DEVTYPE}!="partition", \
25 + ENV{DM_MULTIPATH_DEVICE_PATH}!="1", \
26 + TEST=="/etc/multipath.conf", \
27 + PROGRAM=="$env{MPATH_SBIN_PATH}/multipath -c $tempnode", \
28 + ENV{DM_MULTIPATH_DEVICE_PATH}="1"
29 +
30 +ENV{DM_MULTIPATH_DEVICE_PATH}=="1", ENV{DEVTYPE}!="partition", \
31 + RUN+="/sbin/partx -d --nr 1-1024 $env{DEVNAME}"
32 +
33 +RUN+="socket:/org/kernel/dm/multipath_event"
34 +KERNEL!="dm-*", GOTO="end_mpath"
35 +ACTION!="change", GOTO="end_mpath"
36 +ENV{DM_UUID}=="mpath-?*|part[0-9]*-mpath-?*", OPTIONS+="link_priority=10"
37 +ENV{DM_UUID}!="mpath-?*", GOTO="end_mpath"
38 +ENV{DM_SUSPENDED}=="1", GOTO="end_mpath"
39 +ENV{DM_ACTION}=="PATH_FAILED", GOTO="end_mpath"
40 +RUN+="$env{MPATH_SBIN_PATH}/kpartx -a -p p $tempnode"
41 +LABEL="end_mpath"
42 Index: multipath-tools-120613/multipath/Makefile
43 ===================================================================
44 --- multipath-tools-120613.orig/multipath/Makefile
45 +++ multipath-tools-120613/multipath/Makefile
46 @@ -21,15 +21,15 @@ $(EXEC): $(OBJS)
47 install:
48 $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
49 $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/
50 - $(INSTALL_PROGRAM) -d $(DESTDIR)/etc/udev/rules.d
51 - $(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)/etc/udev/rules.d/
52 + $(INSTALL_PROGRAM) -d $(DESTDIR)/lib/udev/rules.d
53 + $(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)/lib/udev/rules.d/62-multipath.rules
54 $(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)
55 $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
56 $(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir)
57 $(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5.gz $(DESTDIR)$(man5dir)
58
59 uninstall:
60 - rm $(DESTDIR)/etc/udev/rules.d/multipath.rules
61 + rm $(DESTDIR)/lib/udev/rules.d/62-multipath.rules
62 rm $(DESTDIR)$(bindir)/$(EXEC)
63 rm $(DESTDIR)$(mandir)/$(EXEC).8.gz
64 rm $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz