From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Tue, 14 Nov 2006 17:02:47 +0000 From: Alasdair G Kergon Subject: Re: [linux-lvm] Update to lvm2create_initrd Message-ID: <20061114170247.GD30653@agk.surrey.redhat.com> References: Mime-Version: 1.0 Content-Disposition: inline In-Reply-To: Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Douglas Mayle Cc: Jeff Layton , LVM On Sat, Nov 11, 2006 at 12:18:39PM +0100, Douglas Mayle wrote: > I've made an update to the lvm2create_initrd script that fixes some > problems with ldd output that were never addressed in the first > version (e.g. libraries linked with a static path). > I also check for binaries in the path, rather than hardcoding their > location, and I've added support for the Gentoo style of MAKEDEV. Please update the changelog. Can someone confirm the updated script also still works on Debian? -BINFILES=${BINFILES:-"/lib/lvm-200/lvm /bin/bash /bin/busybox /sbin/pivot_root"} +BINFILES=${BINFILES:-"`which lvm` `which bash` `which busybox` `which pivot_root`"} Will 'which lvm' always give the same answer as before on Debian, or, if not, does it matter? -LIBFILES=`ldd $BINFILES 2>/dev/null | awk '{if (/=>/) { print $3 }}' | sort -u` +LIBFILES=`ldd $BINFILES 2>/dev/null |grep -v linux-gate |grep -v : | awk '{if (/=>/) { print $3 } else if (/\//) { print $1 }}' | sort -u` This needs a comment explaining what's going on (e.g. include sample output in the comment). What's special about linux-gate? And why not combine the two greps? -E (linux-gate|:) Alasdair -- agk@redhat.com