From: Chris Gianelloni Date: Mon, 26 Mar 2007 23:57:34 +0000 (+0000) Subject: Changed LVM configuration detection to not error. X-Git-Tag: v3.4.10.902~253 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=480b08111fa3a8bb97968afd78bbbd3392800ffe;p=genkernel.git Changed LVM configuration detection to not error. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@499 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- diff --git a/ChangeLog b/ChangeLog index fad389c..0f85aa2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ # Copyright 2006-2007 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 26 Mar 2007; Chris Gianelloni gen_initramfs.sh, + gen_initrd.sh: + Changed LVM configuration detection to not error. + 26 Mar 2007; Chris Gianelloni x86/kernel-config-2.6: Added joystick support to the default configuration for bug #171911. diff --git a/gen_initramfs.sh b/gen_initramfs.sh index b18be8d..7c74e7a 100644 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -221,10 +221,17 @@ 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 - if [ `lvm dumpconfig` ] + if [ -x /sbin/lvm ] then - cp /etc/lvm/lvm.conf "${TEMP}/initramfs-lvm2-temp/etc/lvm/" || + lvm dumpconfig 2>&1 > /dev/null || gen_die 'Could not copy over lvm.conf!' + ret=$? + if [ ${ret} != 0 ] + then + cp /etc/lvm/lvm.conf "${TEMP}/initramfs-lvm2-temp/etc/lvm/" || + gen_die 'Could not copy over lvm.conf!' + else gen_die 'Could not copy over lvm.conf!' + fi fi cd "${TEMP}/initramfs-lvm2-temp/" find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" diff --git a/gen_initrd.sh b/gen_initrd.sh index f8f4c8a..2d9eb9f 100644 --- a/gen_initrd.sh +++ b/gen_initrd.sh @@ -187,10 +187,17 @@ create_base_initrd_sys() { gen_die "LVM2 error: Could not link ${i}!" done mkdir -p ${TEMP}/initrd-temp/etc/lvm - if [ `lvm dumpconfig` ] + if [ -x /sbin/lvm ] then - cp /etc/lvm/lvm.conf "${TEMP}/initrd-temp/etc/lvm/" || + lvm dumpconfig 2>&1 > /dev/null || gen_die 'Could not copy over lvm.conf!' + ret=$? + if [ ${ret} != 0 ] + then + cp /etc/lvm/lvm.conf "${TEMP}/initramfs-lvm2-temp/etc/lvm/" || + gen_die 'Could not copy over lvm.conf!' + else gen_die 'Could not copy over lvm.conf!' + fi fi fi