Author: glen
Date: Tue Oct 30 21:51:43 2007
New Revision: 8906

Modified:
   geninitrd/trunk/geninitrd
Log:
- rpm -E is unreliable as it requires rpm-build macros present
- use $_lib when installing with inst_exec()

Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd   (original)
+++ geninitrd/trunk/geninitrd   Tue Oct 30 21:51:43 2007
@@ -334,9 +334,9 @@
 
        local lib libs=$(ldd "$@" | awk '/statically|linux-gate\.so/{next} NF 
== 2 {print $1} /=/{print $3}' | sort -u)
        for lib in $libs; do
-               if [ ! -f "$MNTIMAGE/lib/${lib##*/}" ]; then
-                       inst_d /lib
-                       inst_exec $lib /lib
+               if [ ! -f "$MNTIMAGE/$_lib/${lib##*/}" ]; then
+                       inst_d /$_lib
+                       inst_exec $lib /$_lib
                fi
        done
 }
@@ -1154,14 +1154,12 @@
        echo >&2 "WARNING: /proc filesystem not mounted, may cause wrong 
results or failure."
 fi
 
-_lib=$(rpm -E "%{_lib}" 2> /dev/null)
-if [ -z "${_lib}" ]; then
-       if [ -d /usr/lib64 ]; then
-               _lib=lib64
-       else
-               _lib=lib
-       fi
+if [ -d /usr/lib64 ]; then
+       _lib=lib64
+else
+       _lib=lib
 fi
+debug "_lib: $_lib"
 
 cache_modprobe_conf
 
@@ -1384,7 +1382,6 @@
 
 initrd_gen_multipath() {
        inst_d /proc /sys /sbin /lib/udev /etc
-       ln -s lib $MNTIMAGE/lib64
        inst_exec /sbin/kpartx /sbin
        inst_exec /sbin/multipath /sbin
        # for udev callouts
@@ -1406,13 +1403,13 @@
 
        echo "export multipath_id=$MULTIPATH_ID" | add_linuxrc
        add_linuxrc <<-'EOF'
+               debugshell
                /sbin/multipath -v 0 $multipath_id
 
                for a in /dev/mapper/*; do
                        [ $a = /dev/mapper/control ] && continue
                        /sbin/kpartx -a $a
                done
-
                debugshell
 
                umount /sys
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to