|
|
5c2e41 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
5c2e41 |
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
|
5c2e41 |
Date: Thu, 13 Apr 2017 07:22:23 -0500
|
|
|
5c2e41 |
Subject: [PATCH] RH: fixup udev rules for redhat
|
|
|
5c2e41 |
|
|
|
5c2e41 |
The multipath rules need to run after scsi_id is run. This means moving
|
|
|
5c2e41 |
them after 60-persistent-storage.rules for redhat. Redhat also uses a
|
|
|
5c2e41 |
different naming scheme for partitions than SuSE. Also, there are some
|
|
|
5c2e41 |
false warnings that gcc throws because of the changed options. Fix these
|
|
|
5c2e41 |
too.
|
|
|
5c2e41 |
|
|
|
5c2e41 |
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
|
5c2e41 |
---
|
|
|
5c2e41 |
Makefile.inc | 2 +-
|
|
|
5c2e41 |
kpartx/kpartx.rules | 2 +-
|
|
|
5c2e41 |
multipath/Makefile | 4 ++--
|
|
|
5c2e41 |
multipath/main.c | 2 +-
|
|
|
5c2e41 |
4 files changed, 5 insertions(+), 5 deletions(-)
|
|
|
5c2e41 |
|
|
|
5c2e41 |
diff --git a/Makefile.inc b/Makefile.inc
|
|
|
5c2e41 |
index a83f02c..b86cba6 100644
|
|
|
5c2e41 |
--- a/Makefile.inc
|
|
|
5c2e41 |
+++ b/Makefile.inc
|
|
|
5c2e41 |
@@ -51,7 +51,7 @@ endif
|
|
|
5c2e41 |
prefix =
|
|
|
5c2e41 |
exec_prefix = $(prefix)
|
|
|
5c2e41 |
usr_prefix = $(prefix)
|
|
|
5c2e41 |
-bindir = $(exec_prefix)/sbin
|
|
|
5c2e41 |
+bindir = $(exec_prefix)/usr/sbin
|
|
|
5c2e41 |
libudevdir = $(prefix)/$(SYSTEMDPATH)/udev
|
|
|
5c2e41 |
udevrulesdir = $(libudevdir)/rules.d
|
|
|
5c2e41 |
multipathdir = $(TOPDIR)/libmultipath
|
|
|
5c2e41 |
diff --git a/kpartx/kpartx.rules b/kpartx/kpartx.rules
|
|
|
5c2e41 |
index 8f99049..8a3a171 100644
|
|
|
5c2e41 |
--- a/kpartx/kpartx.rules
|
|
|
5c2e41 |
+++ b/kpartx/kpartx.rules
|
|
|
5c2e41 |
@@ -32,6 +32,6 @@ LABEL="mpath_kpartx_end"
|
|
|
5c2e41 |
GOTO="kpartx_end"
|
|
|
5c2e41 |
|
|
|
5c2e41 |
LABEL="run_kpartx"
|
|
|
5c2e41 |
-RUN+="/sbin/kpartx -un -p -part /dev/$name"
|
|
|
5c2e41 |
+RUN+="/sbin/kpartx -un /dev/$name"
|
|
|
5c2e41 |
|
|
|
5c2e41 |
LABEL="kpartx_end"
|
|
|
5c2e41 |
diff --git a/multipath/Makefile b/multipath/Makefile
|
|
|
5c2e41 |
index 0828a8f..b9bbb3c 100644
|
|
|
5c2e41 |
--- a/multipath/Makefile
|
|
|
5c2e41 |
+++ b/multipath/Makefile
|
|
|
5c2e41 |
@@ -24,7 +24,7 @@ install:
|
|
|
5c2e41 |
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/
|
|
|
5c2e41 |
$(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir)
|
|
|
5c2e41 |
$(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir)
|
|
|
5c2e41 |
- $(INSTALL_PROGRAM) -m 644 $(EXEC).rules $(DESTDIR)$(libudevdir)/rules.d/56-multipath.rules
|
|
|
5c2e41 |
+ $(INSTALL_PROGRAM) -m 644 $(EXEC).rules $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules
|
|
|
5c2e41 |
$(INSTALL_PROGRAM) -d $(DESTDIR)$(man8dir)
|
|
|
5c2e41 |
$(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(man8dir)
|
|
|
5c2e41 |
$(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir)
|
|
|
5c2e41 |
@@ -33,7 +33,7 @@ install:
|
|
|
5c2e41 |
uninstall:
|
|
|
5c2e41 |
$(RM) $(DESTDIR)$(bindir)/$(EXEC)
|
|
|
5c2e41 |
$(RM) $(DESTDIR)$(udevrulesdir)/11-dm-mpath.rules
|
|
|
5c2e41 |
- $(RM) $(DESTDIR)$(libudevdir)/rules.d/56-multipath.rules
|
|
|
5c2e41 |
+ $(RM) $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules
|
|
|
5c2e41 |
$(RM) $(DESTDIR)$(man8dir)/$(EXEC).8.gz
|
|
|
5c2e41 |
$(RM) $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz
|
|
|
5c2e41 |
|
|
|
5c2e41 |
diff --git a/multipath/main.c b/multipath/main.c
|
|
|
5c2e41 |
index 05b7bf0..ffa5b22 100644
|
|
|
5c2e41 |
--- a/multipath/main.c
|
|
|
5c2e41 |
+++ b/multipath/main.c
|
|
|
5c2e41 |
@@ -401,7 +401,7 @@ static int find_multipaths_check_timeout(const struct path *pp, long tmo,
|
|
|
5c2e41 |
struct timespec now, ftimes[2], tdiff;
|
|
|
5c2e41 |
struct stat st;
|
|
|
5c2e41 |
long fd;
|
|
|
5c2e41 |
- int r, err, retries = 0;
|
|
|
5c2e41 |
+ int r, err = 0, retries = 0;
|
|
|
5c2e41 |
|
|
|
5c2e41 |
clock_gettime(CLOCK_REALTIME, &now;;
|
|
|
5c2e41 |
|
|
|
5c2e41 |
--
|
|
|
5c2e41 |
2.7.4
|
|
|
5c2e41 |
|