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
cleanup-cruft
Chris Gianelloni 18 years ago
parent 8dd43cbca8
commit 480b08111f

@ -2,6 +2,10 @@
# Copyright 2006-2007 Gentoo Foundation; Distributed under the GPL v2 # Copyright 2006-2007 Gentoo Foundation; Distributed under the GPL v2
# $Header: $ # $Header: $
26 Mar 2007; Chris Gianelloni <wolf31o2@gentoo.org> gen_initramfs.sh,
gen_initrd.sh:
Changed LVM configuration detection to not error.
26 Mar 2007; Chris Gianelloni <wolf31o2@gentoo.org> x86/kernel-config-2.6: 26 Mar 2007; Chris Gianelloni <wolf31o2@gentoo.org> x86/kernel-config-2.6:
Added joystick support to the default configuration for bug #171911. Added joystick support to the default configuration for bug #171911.

@ -221,10 +221,17 @@ append_lvm2(){
mv ${TEMP}/initramfs-lvm2-temp/sbin/lvm.static ${TEMP}/initramfs-lvm2-temp/bin/lvm || 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!' gen_die 'LVM2 error: Could not move lvm.static to lvm!'
fi fi
if [ `lvm dumpconfig` ] if [ -x /sbin/lvm ]
then 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!' gen_die 'Could not copy over lvm.conf!'
fi
fi fi
cd "${TEMP}/initramfs-lvm2-temp/" cd "${TEMP}/initramfs-lvm2-temp/"
find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"

@ -187,10 +187,17 @@ create_base_initrd_sys() {
gen_die "LVM2 error: Could not link ${i}!" gen_die "LVM2 error: Could not link ${i}!"
done done
mkdir -p ${TEMP}/initrd-temp/etc/lvm mkdir -p ${TEMP}/initrd-temp/etc/lvm
if [ `lvm dumpconfig` ] if [ -x /sbin/lvm ]
then 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!' gen_die 'Could not copy over lvm.conf!'
fi
fi fi
fi fi

Loading…
Cancel
Save