# Distributed under the GPL v2
# $Id$
+ 13 Sep 2011; Fabio Erculiani <lxnay@gentoo.org> gen_compile.sh,
+ gen_initramfs.sh:
+ dmraid requires dmsetup to assign UUID to discovered RAID volumes, close bug
+ #382555
+
11 Sep 2011; Fabio Erculiani <lxnay@gentoo.org> defaults/initrd.scripts,
defaults/linuxrc:
drop parse_opt usage and crufty, deprecated subshelling through
print_info 1 ' >> Copying to bincache...'
strip "sbin/lvm.static" ||
gen_die 'Could not strip lvm.static!'
- /bin/tar -cjf "${LVM_BINCACHE}" sbin/lvm.static ||
+ # See bug 382555
+ strip "sbin/dmsetup.static" ||
+ gen_die 'Could not strip dmsetup.static'
+ /bin/tar -cjf "${LVM_BINCACHE}" sbin/lvm.static sbin/dmsetup.static ||
gen_die 'Could not create binary cache'
cd "${TEMP}"
print_info 1 ' LVM: Adding support (using local static binary /sbin/lvm.static)...'
cp /sbin/lvm.static "${TEMP}/initramfs-lvm-temp/bin/lvm" ||
gen_die 'Could not copy over lvm!'
+ # See bug 382555
+ if [ -e '/sbin/dmsetup.static' ]
+ then
+ cp /sbin/dmsetup.static "${TEMP}/initramfs-lvm-temp/bin/dmsetup"
+ fi
elif [ -e '/sbin/lvm' ] && LC_ALL="C" ldd /sbin/lvm|grep -q 'not a dynamic executable'
then
print_info 1 ' LVM: Adding support (using local static binary /sbin/lvm)...'
cp /sbin/lvm "${TEMP}/initramfs-lvm-temp/bin/lvm" ||
gen_die 'Could not copy over lvm!'
+ # See bug 382555
+ if [ -e '/sbin/dmsetup' ] && LC_ALL="C" ldd /sbin/dmsetup | grep -q 'not a dynamic executable'
+ then
+ cp /sbin/dmsetup "${TEMP}/initramfs-lvm-temp/bin/dmsetup"
+ fi
else
print_info 1 ' LVM: Adding support (compiling binaries)...'
compile_lvm
gen_die "Could not extract lvm binary cache!";
mv ${TEMP}/initramfs-lvm-temp/sbin/lvm.static ${TEMP}/initramfs-lvm-temp/bin/lvm ||
gen_die 'LVM error: Could not move lvm.static to lvm!'
+ # See bug 382555
+ mv ${TEMP}/initramfs-lvm-temp/sbin/dmsetup.static ${TEMP}/initramfs-lvm-temp/bin/dmsetup ||
+ gen_die 'LVM error: Could not move dmsetup.static to dmsetup!'
fi
if [ -x /sbin/lvm ]
then