mk_mmc.sh: cleanup NETINSTALL=initrd.gz

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
master
Robert Nelson 5 years ago
parent 6a193719c2
commit 8634cf2c97

@ -275,8 +275,8 @@ dl_kernel_image () {
} }
actually_dl_netinstall () { actually_dl_netinstall () {
${dl} --directory-prefix="${DIR}/dl/${DISTARCH}" "${HTTP_IMAGE}/${DIST}/main/installer-${ARCH}/${NETIMAGE}/images/${BASE_IMAGE}/${NETINSTALL}" ${dl} --directory-prefix="${DIR}/dl/${DISTARCH}" "${HTTP_IMAGE}/${DIST}/main/installer-${ARCH}/${NETIMAGE}/images/${BASE_IMAGE}/initrd.gz"
MD5SUM=$(md5sum "${DIR}/dl/${DISTARCH}/${NETINSTALL}" | awk '{print $1}') MD5SUM=$(md5sum "${DIR}/dl/${DISTARCH}/initrd.gz" | awk '{print $1}')
} }
dl_netinstall_image () { dl_netinstall_image () {
@ -288,12 +288,11 @@ dl_netinstall_image () {
debian_boot="netboot" debian_boot="netboot"
NETIMAGE="current" NETIMAGE="current"
NETINSTALL="initrd.gz"
HTTP_IMAGE="http://ftp.debian.org/debian/dists" HTTP_IMAGE="http://ftp.debian.org/debian/dists"
BASE_IMAGE="netboot" BASE_IMAGE="netboot"
if [ -f "${DIR}/dl/${DISTARCH}/${NETINSTALL}" ] ; then if [ -f "${DIR}/dl/${DISTARCH}/initrd.gz" ] ; then
rm -f "${DIR}/dl/${DISTARCH}/${NETINSTALL}" || true rm -f "${DIR}/dl/${DISTARCH}/initrd.gz" || true
actually_dl_netinstall actually_dl_netinstall
else else
actually_dl_netinstall actually_dl_netinstall
@ -430,9 +429,9 @@ setup_bootscripts () {
} }
extract_base_initrd () { extract_base_initrd () {
echo "NetInstall: Extracting Base ${NETINSTALL}" echo "NetInstall: Extracting Base initrd.gz"
cd "${TEMPDIR}/initrd-tree" || exit cd "${TEMPDIR}/initrd-tree" || exit
zcat "${DIR}/dl/${DISTARCH}/${NETINSTALL}" | cpio -i -d zcat "${DIR}/dl/${DISTARCH}/initrd.gz" | cpio -i -d
dpkg -x "${DIR}/dl/${DISTARCH}/${ACTUAL_DEB_FILE}" "${TEMPDIR}/initrd-tree" dpkg -x "${DIR}/dl/${DISTARCH}/${ACTUAL_DEB_FILE}" "${TEMPDIR}/initrd-tree"
cd "${DIR}/" || exit cd "${DIR}/" || exit
} }

Loading…
Cancel
Save