Remove wheezy support and add stretch

This commit is contained in:
Jeremy Gardais 2016-07-06 14:56:01 +02:00
parent cc3d7bd7cd
commit b61bcb0e16
1 changed files with 28 additions and 29 deletions

View File

@ -1,49 +1,48 @@
#!/bin/bash #!/bin/bash
# This script do the following: # This script do the following:
# Download Debian Initrd for Wheezy, Jessie and Sid # Download Debian Initrd for Jessie, Stretch and Sid
# Download firmwares: # Download firmwares:
# bnx2 # bnx2
# all non-free (for tigon) # all non-free (for tigon)
# Extract all downloaded files # Extract all downloaded files
# Make a new initrd with the firmwares # Make a new initrd with the previous firmwares
for DISTRO in wheezy jessie sid; do # For ALL Debian's version for DISTRO in jessie stretch sid; do # For ALL Debian's version
TEMP_DIR=$(mktemp -d) TEMP_DIR=$(mktemp -d)
pushd "${TEMP_DIR}" pushd "${TEMP_DIR}"
# Download and uncompress original initrd # Download and uncompress original initrd
wget http://ftp.fr.debian.org/debian/dists/${DISTRO}/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz wget http://ftp.fr.debian.org/debian/dists/${DISTRO}/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz
mkdir "${TEMP_DIR}"/mkinitrd mkdir "${TEMP_DIR}"/mkinitrd
pushd "${TEMP_DIR}"/mkinitrd/ pushd "${TEMP_DIR}"/mkinitrd/
zcat ../initrd.gz | cpio -iv zcat ../initrd.gz | cpio -iv
popd popd
# Download bnx2's firmware and uncompress it
wget http://ftp.fr.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-bnx2_0.43_all.deb
dpkg-deb -x firmware-bnx2_0.43_all.deb "${TEMP_DIR}"/mkinitrd
# Download bnx2's firmware and uncompress it # Download tigon(all non-free)'s firmware and uncompress it
wget http://ftp.fr.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-bnx2_0.43_all.deb wget http://ftp.fr.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-linux-nonfree_0.43_all.deb
dpkg-deb -x firmware-bnx2_0.43_all.deb "${TEMP_DIR}"/mkinitrd dpkg-deb -x firmware-linux-nonfree_0.43_all.deb "${TEMP_DIR}"/mkinitrd
# Download tigon(all non-free)'s firmware and uncompress it # Make a new initrd
wget http://ftp.fr.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-linux-nonfree_0.43_all.deb mv initrd.gz initrd_orig.gz
dpkg-deb -x firmware-linux-nonfree_0.43_all.deb "${TEMP_DIR}"/mkinitrd pushd "${TEMP_DIR}"/mkinitrd/
find . -print0 | cpio -0 -H newc -ov | gzip -c > ../initrd.gz
popd
# Move it to PXE Debian installer
mv initrd.gz /var/lib/tftpboot/installer/debian/${DISTRO}/amd64/initrd_firm.gz
# Make a new initrd popd
mv initrd.gz initrd_orig.gz
pushd "${TEMP_DIR}"/mkinitrd/
find . -print0 | cpio -0 -H newc -ov | gzip -c > ../initrd.gz
popd
# Move it to PXE Debian installer # Clean temp file
mv initrd.gz /var/lib/tftpboot/installer/debian/${DISTRO}/amd64/initrd_firm.gz rm -rf "${TEMP_DIR}"
popd
# Clean temp file
rm -rf "${TEMP_DIR}"
done done
exit 0