vgscan >> lvm; bug #44091.
authorTim Yamin <plasmaroo@gentoo.org>
Sat, 9 Oct 2004 19:26:42 +0000 (19:26 +0000)
committerTim Yamin <plasmaroo@gentoo.org>
Sat, 9 Oct 2004 19:26:42 +0000 (19:26 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@140 67a159dc-881f-0410-a524-ba9dfbe2cb84

gen_initrd.sh

index 84ecbaf9f0531272948d34c17e8ca7acc67adb38..f0d473ef58e0751dc7768d9aff790051d7b3c546 100644 (file)
@@ -91,14 +91,16 @@ create_base_initrd_sys() {
 #              gen_die "could not uncompress devfsd.conf"
 
        # LVM2
-       if [ -e '/sbin/vgscan.static' -a -e '/sbin/vgchange.static' ]
+       if [ -e '/sbin/lvm' ] && ldd /sbin/lvm|grep -q 'not a dynamic executable';
        then
                if [ "${CMD_NOLVM2}" != '1' ]
                then
-                       cp /sbin/vgscan.static "${TEMP}/initrd-temp/bin/vgscan" ||
-                               gen_die 'Could not copy over vgscan!'
-                       cp /sbin/vgchange.static "${TEMP}/initrd-temp/bin/vgchange" ||
-                               gen_die 'Could not copy over vgchange!'
+                       cp /sbin/lvm "${TEMP}/initrd-temp/bin/lvm" ||
+                               gen_die 'Could not copy over lvm!'
+                       ln -sf "${TEMP}/initrd-temp/bin/lvm" "${TEMP}/initrd-temp/bin/vgscan" ||
+                               gen_die 'Could not symlink lvm -> vgscan!'
+                       ln -sf "${TEMP}/initrd-temp/bin/lvm" "${TEMP}/initrd-temp/bin/vgchange" ||
+                               gen_die 'Could not symlink lvm -> vgchange!'
                fi
 #      else
 #              print_warning 1 "initrd: No LVM2 static binaries found; skipping support..."