Modify 0021-RHBZ-548874-add-find-multipaths.patch

fix bug where mpathconf wouldn't create a multpath.conf file unless one
    already existed.
This commit is contained in:
Benjamin Marzinski 2010-02-16 23:29:53 +00:00
parent 6e6a296670
commit 01219563de
2 changed files with 31 additions and 10 deletions

View File

@ -2,20 +2,20 @@
libmultipath/Makefile | 2
libmultipath/alias.c | 152 ------------------------------
libmultipath/alias.h | 1
libmultipath/config.c | 1
libmultipath/config.c | 5 -
libmultipath/config.h | 1
libmultipath/configure.c | 23 ++++
libmultipath/defaults.h | 2
libmultipath/dict.c | 34 ++++++
libmultipath/file.c | 178 ++++++++++++++++++++++++++++++++++++
libmultipath/file.c | 178 +++++++++++++++++++++++++++++++++++
libmultipath/file.h | 11 ++
libmultipath/finder.c | 150 ++++++++++++++++++++++++++++++
libmultipath/finder.h | 18 +++
multipath/Makefile | 2
multipath/main.c | 2
multipath/mpathconf | 232 +++++++++++++++++++++++++++++++++++++++++++++++
multipath/mpathconf | 234 +++++++++++++++++++++++++++++++++++++++++++++++
multipathd/main.c | 27 +++--
16 files changed, 674 insertions(+), 162 deletions(-)
16 files changed, 679 insertions(+), 163 deletions(-)
Index: multipath-tools/libmultipath/alias.c
===================================================================
@ -231,6 +231,20 @@ Index: multipath-tools/libmultipath/config.c
/*
* preload default hwtable
@@ -476,10 +477,12 @@ load_config (char * file)
}
} else {
condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices.");
- condlog(0, "A default multipath.conf file is located at");
+ condlog(0, "A sample multipath.conf file is located at");
condlog(0,
"/usr/share/doc/device-mapper-multipath-%d.%d.%d/multipath.conf",
MULTIPATH_VERSION(VERSION_CODE));
+ condlog(0,
+"You can run /sbin/mpathconf to create or modify /etc/multipath.conf");
conf->blist_devnode = vector_alloc();
if (!conf->blist_devnode) {
condlog(0, "cannot allocate blacklist\n");
Index: multipath-tools/libmultipath/config.h
===================================================================
--- multipath-tools.orig/libmultipath/config.h
@ -882,7 +896,7 @@ Index: multipath-tools/multipath/mpathconf
===================================================================
--- /dev/null
+++ multipath-tools/multipath/mpathconf
@@ -0,0 +1,232 @@
@@ -0,0 +1,234 @@
+#!/bin/sh
+#
+# Copyright (C) 2010 Red Hat, Inc. All rights reserved.
@ -1102,11 +1116,13 @@ Index: multipath-tools/multipath/mpathconf
+ fi
+fi
+
+if [ -f "$CONFIGFILE" ]; then
+ cp $CONFIGFILE $CONFIGFILE.old
+ if [ $? != 0 ]; then
+ echo "failed to backup old config file, $CONFIGFILE not updated"
+ exit 1
+ fi
+fi
+
+cp $TMPFILE $CONFIGFILE
+if [ $? != 0 ]; then

View File

@ -1,7 +1,7 @@
Summary: Tools to manage multipath devices using device-mapper
Name: device-mapper-multipath
Version: 0.4.9
Release: 13%{?dist}
Release: 14%{?dist}
License: GPL+
Group: System Environment/Base
URL: http://christophe.varoqui.free.fr/
@ -184,6 +184,11 @@ fi
%{_mandir}/man8/kpartx.8.gz
%changelog
* Tue Feb 16 2010 Benjamin Marzinski <bmarzins@redhat.com> -0.4.9-14
- Modify 0021-RHBZ-548874-add-find-multipaths.patch
* fix bug where mpathconf wouldn't create a multpath.conf file unless one
already existed.
* Tue Feb 16 2010 Benjamin Marzinski <bmarzins@redhat.com> -0.4.9-13
- Replace 0012-RH-explicitly-disable-dm-udev-sync-support-in-kpartx.patch
with 0012-RH-udev-sync-support.patch