Use location of bindings file from multipath.conf (#593050)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ack.
On Tue, 25 May 2010, Brian C. Lane wrote:
Copy the bindings file from the location in the multipath.conf file, or
copy from /var/lib/multipath/bindings
Resolves: rhbz#593050
---
mkinitrd | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/mkinitrd b/mkinitrd
index 5a4ad2e..cd98ba0 100755
--- a/mkinitrd
+++ b/mkinitrd
@@ -1606,9 +1606,17 @@ if [ "$use_multipath" == "1" ]; then
if [ -f /etc/multipath.conf ]; then
inst /etc/multipath.conf $MNTIMAGE/etc/multipath.conf
fi
- if [ -f /var/lib/multipath/bindings ]; then
- inst /var/lib/multipath/bindings $MNTIMAGE/var/lib/multipath/bindings
+
+ if [ -f /etc/multipath.conf ]; then
+ if [ "$(egrep '^[[:space:]]*user_friendly_names[[:space:]]+yes' /etc/multipath.conf)" ] ; then
+ bindings=$(awk '/^[[:blank:]]*bindings_file[[:blank:]]/ { gsub(/"/,""); print $2 }' /etc/multipath.conf)
+ fi
fi
+ bindings=${bindings:-/var/lib/multipath/bindings}
+ if [ -f $bindings ]; then
+ inst $bindings $MNTIMAGE/$bindings
+ fi
+
inst /sbin/scsi_id $MNTIMAGE/bin/scsi_id
inst /etc/scsi_id.config $MNTIMAGE/etc/scsi_id.config
# This includes all mpath_prio checkers in the image (~2.5M)
- --
David Cantrell <dcantrell@redhat.com>
Red Hat / Honolulu, HI
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iEYEARECAAYFAkv8NDwACgkQ5hsjjIy1Vkmr+ACff/wSF8gBhT6ajSThkDcJgJBO
unIAn2XyQlaUdVxjrra9A9i0l2XlaVwu
=JNyA
-----END PGP SIGNATURE-----
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
|