Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| 2 | From: Benjamin Marzinski <bmarzins@redhat.com> |
| 3 | Date: Thu, 13 Apr 2017 07:22:23 -0500 |
| 4 | Subject: [PATCH] RH: fixup udev rules for redhat |
| 5 | |
| 6 | The multipath rules need to run after scsi_id is run. This means moving |
| 7 | them after 60-persistent-storage.rules for redhat. Redhat also uses a |
| 8 | different naming scheme for partitions than SuSE. Also, there are some |
| 9 | false warnings that gcc throws because of the changed options. Fix these |
| 10 | too. |
| 11 | |
| 12 | Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> |
| 13 | --- |
| 14 | Makefile.inc | 2 +- |
| 15 | kpartx/kpartx.rules | 2 +- |
| 16 | multipath/Makefile | 4 ++-- |
| 17 | multipath/main.c | 2 +- |
| 18 | 4 files changed, 5 insertions(+), 5 deletions(-) |
| 19 | |
| 20 | diff --git a/Makefile.inc b/Makefile.inc |
| 21 | index af2f5ba..0b271ea 100644 |
| 22 | --- a/Makefile.inc |
| 23 | +++ b/Makefile.inc |
| 24 | @@ -51,7 +51,7 @@ endif |
| 25 | prefix = |
| 26 | exec_prefix = $(prefix) |
| 27 | usr_prefix = $(prefix) |
| 28 | -bindir = $(exec_prefix)/sbin |
| 29 | +bindir = $(exec_prefix)/usr/sbin |
| 30 | libudevdir = $(prefix)/$(SYSTEMDPATH)/udev |
| 31 | udevrulesdir = $(libudevdir)/rules.d |
| 32 | multipathdir = $(TOPDIR)/libmultipath |
| 33 | diff --git a/kpartx/kpartx.rules b/kpartx/kpartx.rules |
| 34 | index 8f99049..8a3a171 100644 |
| 35 | --- a/kpartx/kpartx.rules |
| 36 | +++ b/kpartx/kpartx.rules |
| 37 | @@ -32,6 +32,6 @@ LABEL="mpath_kpartx_end" |
| 38 | GOTO="kpartx_end" |
| 39 | |
| 40 | LABEL="run_kpartx" |
| 41 | -RUN+="/sbin/kpartx -un -p -part /dev/$name" |
| 42 | +RUN+="/sbin/kpartx -un /dev/$name" |
| 43 | |
| 44 | LABEL="kpartx_end" |
| 45 | diff --git a/multipath/Makefile b/multipath/Makefile |
| 46 | index 0828a8f..b9bbb3c 100644 |
| 47 | --- a/multipath/Makefile |
| 48 | +++ b/multipath/Makefile |
| 49 | @@ -24,7 +24,7 @@ install: |
| 50 | $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/ |
| 51 | $(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir) |
| 52 | $(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir) |
| 53 | - $(INSTALL_PROGRAM) -m 644 $(EXEC).rules $(DESTDIR)$(libudevdir)/rules.d/56-multipath.rules |
| 54 | + $(INSTALL_PROGRAM) -m 644 $(EXEC).rules $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules |
| 55 | $(INSTALL_PROGRAM) -d $(DESTDIR)$(man8dir) |
| 56 | $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(man8dir) |
| 57 | $(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir) |
| 58 | @@ -33,7 +33,7 @@ install: |
| 59 | uninstall: |
| 60 | $(RM) $(DESTDIR)$(bindir)/$(EXEC) |
| 61 | $(RM) $(DESTDIR)$(udevrulesdir)/11-dm-mpath.rules |
| 62 | - $(RM) $(DESTDIR)$(libudevdir)/rules.d/56-multipath.rules |
| 63 | + $(RM) $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules |
| 64 | $(RM) $(DESTDIR)$(man8dir)/$(EXEC).8.gz |
| 65 | $(RM) $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz |
| 66 | |
| 67 | diff --git a/multipath/main.c b/multipath/main.c |
| 68 | index 3f0a6aa..6fdde03 100644 |
| 69 | --- a/multipath/main.c |
| 70 | +++ b/multipath/main.c |
| 71 | @@ -389,7 +389,7 @@ static int find_multipaths_check_timeout(const struct path *pp, long tmo, |
| 72 | struct timespec now, ftimes[2], tdiff; |
| 73 | struct stat st; |
| 74 | long fd; |
| 75 | - int r, err, retries = 0; |
| 76 | + int r, err = 0, retries = 0; |
| 77 | |
| 78 | clock_gettime(CLOCK_REALTIME, &now); |
| 79 | |
| 80 | -- |
| 81 | 2.7.4 |
| 82 | |