Before we copy lvm.conf, we run it through 'lvm dumpconfig' to make sure the config...
authorChris Gianelloni <wolf31o2@gentoo.org>
Wed, 14 Mar 2007 01:19:09 +0000 (01:19 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Wed, 14 Mar 2007 01:19:09 +0000 (01:19 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@497 67a159dc-881f-0410-a524-ba9dfbe2cb84

ChangeLog
gen_initramfs.sh
gen_initrd.sh
genkernel

index 56b6ea872fdab4f6697d39fc54855b69bc470545..94d1c7749471d73929887ebd476d367e581ea0d1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,11 @@
 # Copyright 2006-2007 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  14 Mar 2007; Chris Gianelloni <wolf31o2@gentoo.org> gen_initramfs.sh,
+  gen_initrd.sh, genkernel:
+  Before we copy lvm.conf, we run it through 'lvm dumpconfig' to make sure the
+  config is valid for bug #156009. This is 3.4.7_pre5.
+
   14 Mar 2007; Chris Gianelloni <wolf31o2@gentoo.org> genkernel.conf:
   Change the default CACHE_DIR from /usr/share/genkernel/pkg/%%ARCH%% to
   /var/cache/genkernel/%%ARCH%% for bug #148253.
index 6889fe9316f9ce8e0ea0bfc8d5b1b8148f0ec134..b18be8daa9f16baa73d42988993c79c9b294d114 100644 (file)
@@ -208,7 +208,7 @@ append_lvm2(){
        cd ${TEMP}
        mkdir -p "${TEMP}/initramfs-lvm2-temp/bin/"
        mkdir -p "${TEMP}/initramfs-lvm2-temp/etc/lvm/"
-       if [ -e '/sbin/lvm' ] && ldd /sbin/lvm|grep -q 'not a dynamic executable';
+       if [ -e '/sbin/lvm' ] && ldd /sbin/lvm|grep -q 'not a dynamic executable'
        then
                print_info 1 '          LVM2: Adding support (using local static binaries)...'
                cp /sbin/lvm "${TEMP}/initramfs-lvm2-temp/bin/lvm" ||
@@ -221,8 +221,11 @@ append_lvm2(){
                mv ${TEMP}/initramfs-lvm2-temp/sbin/lvm.static ${TEMP}/initramfs-lvm2-temp/bin/lvm ||
                        gen_die 'LVM2 error: Could not move lvm.static to lvm!'
        fi
-       cp /etc/lvm/lvm.conf "${TEMP}/initramfs-lvm2-temp/etc/lvm/lvm.conf" ||
-               gen_die 'Could not copy over lvm.conf!'
+       if [ `lvm dumpconfig` ]
+       then
+               cp /etc/lvm/lvm.conf "${TEMP}/initramfs-lvm2-temp/etc/lvm/" ||
+                       gen_die 'Could not copy over lvm.conf!'
+       fi
        cd "${TEMP}/initramfs-lvm2-temp/"
        find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
        rm -r "${TEMP}/initramfs-lvm2-temp/"
index 011ef587d4fbb64afa8c6609be1943325e30aaf5..f8f4c8a095774613ab6e62c5699ec9f2cb8b7417 100644 (file)
@@ -187,8 +187,11 @@ create_base_initrd_sys() {
                                gen_die "LVM2 error: Could not link ${i}!"
                done
                mkdir -p ${TEMP}/initrd-temp/etc/lvm
-               cp /etc/lvm/lvm.conf "${TEMP}/initrd-temp/etc/lvm/lvm.conf" ||
-                       gen_die 'Could not copy over lvm.conf!'
+               if [ `lvm dumpconfig` ]
+               then
+                       cp /etc/lvm/lvm.conf "${TEMP}/initrd-temp/etc/lvm/" ||
+                               gen_die 'Could not copy over lvm.conf!'
+               fi
        fi
        
        # EVMS2
index e8b76b61a53ef8ed51c6dda035ce6958fe0aba50..a620eca1265035f0b85115a9158d053f049d8835 100755 (executable)
--- a/genkernel
+++ b/genkernel
@@ -2,7 +2,7 @@
 # Genkernel v3
 
 PATH="/bin:/usr/bin:/sbin:/usr/sbin"
-GK_V='3.4.7_pre4'
+GK_V='3.4.7_pre5'
 
 TMPDIR='/var/tmp/genkernel'
 TEMP=${TMPDIR}/$RANDOM.$RANDOM.$RANDOM.$$