From: Chris Gianelloni Date: Wed, 14 Mar 2007 01:19:09 +0000 (+0000) Subject: Before we copy lvm.conf, we run it through 'lvm dumpconfig' to make sure the config... X-Git-Tag: v3.4.10.902~255 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=26a7141b14a8d7081d071c415f87e917380e916d;p=genkernel.git 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. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@497 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- diff --git a/ChangeLog b/ChangeLog index 56b6ea8..94d1c77 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,11 @@ # Copyright 2006-2007 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 14 Mar 2007; Chris Gianelloni 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 genkernel.conf: Change the default CACHE_DIR from /usr/share/genkernel/pkg/%%ARCH%% to /var/cache/genkernel/%%ARCH%% for bug #148253. diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 6889fe9..b18be8d 100644 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -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/" diff --git a/gen_initrd.sh b/gen_initrd.sh index 011ef58..f8f4c8a 100644 --- a/gen_initrd.sh +++ b/gen_initrd.sh @@ -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 diff --git a/genkernel b/genkernel index e8b76b6..a620eca 100755 --- 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.$$