# 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.
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" ||
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/"
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
# 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.$$