mdassemble can't handle newer metadata formats and fails for partitioned
arrays, among other things.
This...
- replaces the bundled mdassemble with proper support for mdadm
- fixes raid autodetection/assemble when no mdadm.conf is available
- fixes a compilation failure for newer mdadm versions
Tested w/ genkernel 3.4.10.907 and mdadm 3.1.3.
cleanup-cruft
Matthias Dahl15 years agocommitted bySebastian Pipping
gen_die "Could not find MDADM source tarball: ${MDADM_SRCTAR}! Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
cd"${TEMP}"
rm -rf "${MDADM_DIR}" > /dev/null
/bin/tar -jxpf "${MDADM_SRCTAR}"||
gen_die 'Could not extract MDADM source tarball!'
[ -d "${MDADM_DIR}"]||
gen_die 'MDADM directory ${MDADM_DIR} is invalid!'
cd"${MDADM_DIR}"
sed -i "/^CFLAGS = /s:^CFLAGS = \(.*\)$:CFLAGS = -Os:" Makefile
sed -i "/^CXFLAGS = /s:^CXFLAGS = \(.*\)$:CXFLAGS = -Os:" Makefile
sed -i "/^CWFLAGS = /s:^CWFLAGS = \(.*\)$:CWFLAGS = -Wall:" Makefile
sed -i "s/^# LDFLAGS = -static/LDFLAGS = -static/" Makefile