diff options
| author | Chris Lamb <chris@chris-lamb.co.uk> | 2008-03-22 18:13:03 +0000 | 
|---|---|---|
| committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:03:26 +0100 | 
| commit | 679aed644100f986881ff41bc2be02aba1b18b16 (patch) | |
| tree | 640834ecad60a5256450c5f0241171fdbfff3a06 /helpers | |
| parent | 6057ecbd1932dcba85325b581f524544bbbca3d3 (diff) | |
| download | live-build-679aed644100f986881ff41bc2be02aba1b18b16.zip live-build-679aed644100f986881ff41bc2be02aba1b18b16.tar.gz | |
lh_binary_debian-installer: Preseed by repacking initrd in some situations
This patch repacks the initrd when using the d-i netboot images in order
to incorporate a preseed.cfg if it exists. Before this patch, preseeding
of d-i netboot images was not possible.
Repacking the initrd has the additional advantage of being able to preseed
the first few questions of the installation process.
Diffstat (limited to 'helpers')
| -rwxr-xr-x | helpers/lh_binary_debian-installer | 28 | 
1 files changed, 28 insertions, 0 deletions
| diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer index d1913fa..257d786 100755 --- a/helpers/lh_binary_debian-installer +++ b/helpers/lh_binary_debian-installer @@ -453,5 +453,33 @@ then  	fi  fi +repack_initrd() { +	local TARGET_INITRD +	TARGET_INITRD="${1}" +	REPACK_TMPDIR="unpacked-initrd" +	 +	# cpio does not have a "extract to directory", so we must change directory +	mkdir -p ${REPACK_TMPDIR} +	cd ${REPACK_TMPDIR} + +	gzip -d < ../${TARGET_INITRD} | cpio -i --make-directories --no-absolute-filenames +	cp ../config/binary_debian-installer/preseed.cfg . +	find | cpio -H newc -o | gzip -9 > ../${TARGET_INITRD}  + +	cd .. +	rm -rf ${REPACK_TMPDIR} +} + +# Preseed d-i by repacking the initrd in certain situations +if [ "${USE_NETBOOT_DI}" = "yes" ] && [ -e config/binary_debian-installer/preseed.cfg ] +then +	repack_initrd "${DESTDIR}"/"${INITRD_DI}" + +	if [ -e "${DESTDIR}"/"${INITRD_GI}" ] +	then +		repack_initrd "${DESTDIR}"/"${INITRD_GI}" +	fi +fi +  # Creating stage file  Create_stagefile .stage/binary_debian-installer | 
