[linux-lvm] Update to lvm2create_initrd
Alasdair G Kergon
agk at redhat.com
Tue Nov 14 17:02:47 UTC 2006
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 at redhat.com
More information about the linux-lvm
mailing list