diff options
| author | Benjamin Marzinski <bmarzins@fedoraproject.org> | 2008-05-20 04:37:41 +0000 |
|---|---|---|
| committer | Benjamin Marzinski <bmarzins@fedoraproject.org> | 2008-05-20 04:37:41 +0000 |
| commit | 685fcac1ef870c2b6543bd320a60721f4bc273c2 (patch) | |
| tree | 3bbd7768f08413e12194c0108b0fc7df0b07144f /mpath_wait.patch | |
| parent | ab958e7caf0c2e17dc87701c0c86125efdb9be0d (diff) | |
Updated to latest Upstream 0.4.8 code: multipath-tools-080519.tgz (gitdevice-mapper-multipath-0_4_8-1_fc10
commit id: 42704728855376d2f7da2de1967d7bc71bc54a2f)
Diffstat (limited to 'mpath_wait.patch')
| -rw-r--r-- | mpath_wait.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/mpath_wait.patch b/mpath_wait.patch new file mode 100644 index 0000000..ab48908 --- /dev/null +++ b/mpath_wait.patch @@ -0,0 +1,43 @@ +Index: multipath-tools-080515/multipath/Makefile +=================================================================== +--- multipath-tools-080515.orig/multipath/Makefile ++++ multipath-tools-080515/multipath/Makefile +@@ -21,7 +21,7 @@ $(EXEC): $(OBJS) + + install: + $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) +- $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/ ++ $(INSTALL_PROGRAM) -m 755 $(EXEC) mpath_wait $(DESTDIR)$(bindir)/ + $(INSTALL_PROGRAM) -d $(DESTDIR)/etc/udev/rules.d + $(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)/etc/udev/rules.d/ + $(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir) +@@ -36,6 +36,7 @@ install: + uninstall: + rm $(DESTDIR)/etc/udev/rules.d/multipath.rules + rm $(DESTDIR)$(bindir)/$(EXEC) ++ rm $(DESTDIR)$(bindir)/mpath_wait + rm $(DESTDIR)$(mandir)/$(EXEC).8.gz + rm $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz + +Index: multipath-tools-080515/multipath/mpath_wait +=================================================================== +--- /dev/null ++++ multipath-tools-080515/multipath/mpath_wait +@@ -0,0 +1,17 @@ ++#!/bin/bash ++ ++retry=3 ++sec=1 ++ ++/sbin/dmsetup info -c --noheadings -j $1 -m $2 2> /dev/null | grep -q .*:${1}:${2}:L.*:.*:.*:.*:.* ++ret=$? ++ ++while [ "$ret" -ne 0 -a "$retry" -gt 0 ] ++do ++ sleep $sec ++ /sbin/dmsetup info -c --noheadings -j $1 -m $2 2> /dev/null | grep -q .*:${1}:${2}:L.*:.*:.*:.*:.* ++ ret=$? ++ retry=$(($retry - 1)) ++done ++ ++exit $ret |
