[readonly/geninitrd: 475/1068] - install all shared libs to /lib - install /var/lib/multipath/bindings for dm-multipath if present

draenog draenog at pld-linux.org
Sat Nov 2 19:52:19 CET 2013


commit 482091c4b2ddcc3765be75ad8e74219276818ce4
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Thu Oct 25 16:31:44 2007 +0000

    - install all shared libs to /lib
    - install /var/lib/multipath/bindings for dm-multipath if present
    
    svn-id: @8874

 geninitrd | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/geninitrd b/geninitrd
index 7b33ffb..b3a866f 100755
--- a/geninitrd
+++ b/geninitrd
@@ -328,10 +328,9 @@ inst_exec() {
 
 	local lib libs=$(ldd "$@" | awk '/statically|linux-gate\.so/{next} NF == 2 {print $1} /=/{print $3}' | sort -u)
 	for lib in $libs; do
-		local libdir=/$(echo "$lib" | cut -d/ -f2)/
-		if [ ! -f "$MNTIMAGE$libdir${lib##*/}" ]; then
-			inst_d $libdir
-			inst_exec $lib $libdir
+		if [ ! -f "$MNTIMAGE/lib/${lib##*/}" ]; then
+			inst_d /lib
+			inst_exec $lib /lib
 		fi
 	done
 }
@@ -1234,7 +1233,6 @@ cat > "$s" <<'EOF'
 #! /bin/sh
 mount -t proc none /proc
 if [ "$(awk ' /debuginitrd/  { print "yes"; } ' /proc/cmdline)" = "yes" ]; then
-	export DEBUG=yes
 	set -x
 fi
 umount /proc
@@ -1354,12 +1352,17 @@ initrd_gen_udev() {
 
 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
 	inst_exec /sbin/scsi_id /lib/udev
 	inst_exec /sbin/mpath* /sbin
 	inst /etc/multipath.conf /etc
+	if [ -f /var/lib/multipath/bindings ]; then
+		inst_d /var/lib/multipath
+		inst /var/lib/multipath/bindings /var/lib/multipath
+	fi
 
 	cat <<-'EOF' >> "$s"
 	mount -t proc none /proc
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/readonly/geninitrd.git/commitdiff/147754ca159d40ca5eb541074dc043d8cbd92090



More information about the pld-cvs-commit mailing list