# Copyright 2006-2007 Gentoo Foundation; Distributed under the GPL v2
# $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:
Added joystick support to the default configuration for bug #171911.
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}"
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