]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Use glob for libdir when installing multipath libraries.
authorPeter Jones <pjones@redhat.com>
Tue, 24 Nov 2009 19:43:56 +0000 (14:43 -0500)
committerPeter Jones <pjones@redhat.com>
Wed, 25 Nov 2009 15:54:09 +0000 (10:54 -0500)
Use "/lib*/" not "/lib/" so it works when they're in /lib/multipath as
well as when they're in /lib64/multipath

modules.d/90multipath/install

index 9552918dab06595aebfba1f31c79ca365470af03..cea8cd3505286998d0bed3bb6bcc7cffea92ca5c 100755 (executable)
@@ -2,6 +2,12 @@ if [[ $hostonly ]]; then
     inst /etc/multipath.conf
 fi
 
+if ldd /sbin/multipath |grep -q lib64; then
+    LIBDIR="/lib64"
+else
+    LIBDIR="/lib"
+fi
+
 for f in  \
     /sbin/dmsetup \
     /sbin/kpartx \
@@ -11,8 +17,8 @@ for f in  \
     /sbin/xdrgetuid \
     /sbin/xdrgetprio \
     /etc/xdrdevices.conf \
-    /lib/libmultipath*  \
-    /lib/multipath/* ;do 
+    $(ls $LIBDIR/libmultipath* $LIBDIR/multipath/*) \
+       ;do
     inst $f
 done