aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/multipath-tools/files/0001-RH-fixup-udev-rules-for-redhat.patch
blob: 74ae1530cb4f0690eb710b85e718edf22b2c807c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
From 1e1ba9ecc16895bf472eae345d44631b65629611 Mon Sep 17 00:00:00 2001
From: Benjamin Marzinski <bmarzins@redhat.com>
Date: Thu, 13 Apr 2017 07:22:23 -0500
Subject: [PATCH 01/12] RH: fixup udev rules for redhat

The multipath rules need to run after scsi_id is run. This means moving
them after 60-persistent-storage.rules for redhat. Redhat also uses a
different naming scheme for partitions than SuSE. Also, there are some
false warnings that gcc throws because of the changed options. Fix these
too.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>

[OP: Rebase to 0.9.3]
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>

Rebase to 0.9.8
Signed-off-by: Changqing Li <changqing.li@windriver.com>

Upstream-Status: Pending
---
 Makefile.inc        | 2 +-
 kpartx/kpartx.rules | 2 +-
 multipath/Makefile  | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile.inc b/Makefile.inc
index 5668e638..de89b21f 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -59,7 +59,7 @@ tmpfilesdir	:= $(systemd_prefix)lib/tmpfiles.d
 modulesloaddir	:= $(systemd_prefix)lib/modules-load.d
 libudevdir	:= $(systemd_prefix)lib/udev
 udevrulesdir	:= $(libudevdir)/rules.d
-bindir		:= $(exec_prefix)sbin
+bindir		:= $(exec_prefix)/usr/sbin
 mandir		:= $(usr_prefix)share/man
 LIB		:= $(if $(shell test -d /lib64 && echo 1),lib64,lib)
 syslibdir	:= $(prefix)$(LIB)
diff --git a/kpartx/kpartx.rules b/kpartx/kpartx.rules
index 1969dee0..d2b28233 100644
--- a/kpartx/kpartx.rules
+++ b/kpartx/kpartx.rules
@@ -39,6 +39,6 @@ LABEL="mpath_kpartx_end"
 GOTO="kpartx_end"
 
 LABEL="run_kpartx"
-RUN+="/sbin/kpartx -un -p -part /dev/$name"
+RUN+="/sbin/kpartx -un /dev/$name"
 
 LABEL="kpartx_end"
diff --git a/multipath/Makefile b/multipath/Makefile
index 67fb5e62..2ea9e528 100644
--- a/multipath/Makefile
+++ b/multipath/Makefile
@@ -27,7 +27,7 @@ install:
 	$(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir)
 	$(Q)$(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir)
 	$(Q)$(INSTALL_PROGRAM) -m 644 99-z-dm-mpath-late.rules $(DESTDIR)$(udevrulesdir)
-	$(Q)$(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)$(udevrulesdir)/56-multipath.rules
+	$(Q)$(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)$(udevrulesdir)/62-multipath.rules
 	$(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(tmpfilesdir)
 	$(Q)$(INSTALL_PROGRAM) -m 644 tmpfiles.conf $(DESTDIR)$(tmpfilesdir)/multipath.conf
 	$(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)/man8
@@ -50,7 +50,7 @@ uninstall:
 	$(Q)$(RM) $(DESTDIR)$(udevrulesdir)/99-z-dm-mpath-late.rules
 	$(Q)$(RM) $(DESTDIR)$(modulesloaddir)/multipath.conf
 	$(Q)$(RM) $(DESTDIR)$(modulesloaddir)/scsi_dh.conf
-	$(Q)$(RM) $(DESTDIR)$(libudevdir)/rules.d/56-multipath.rules
+	$(Q)$(RM) $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules
 	$(Q)$(RM) $(DESTDIR)$(mandir)/man8/$(EXEC).8
 	$(Q)$(RM) $(DESTDIR)$(mandir)/man5/$(EXEC).conf.5
 	$(Q)$(RM) $(DESTDIR)$(tmpfilesdir)/multipath.conf
-- 
2.25.1