Remove Wheezy and add Stretch for Debian

This commit is contained in:
Jeremy Gardais 2016-07-04 17:05:33 +02:00
parent 2fcb7e5560
commit b0c0aa37e2
1 changed files with 27 additions and 27 deletions

View File

@ -1,10 +1,10 @@
#!/bin/bash #!/bin/bash
# This script do the following: # This script do the following:
# Download Debian Stable # Download Debian Stable (jessie)
# Download Debian Testing # Download Debian Testing (stretch)
# Download Debian Unstable # Download Debian Unstable (sid)
# Make an PXE's config file (aka menu.cfg) # Make an PXE's config file (aka menu.cfg)
TFTP_ROOT="/var/lib/tftpboot" TFTP_ROOT="/var/lib/tftpboot"
@ -12,40 +12,40 @@ TFTP_ROOT="/var/lib/tftpboot"
CONFIG_PXE="${TFTP_ROOT}/installer/debian/menu.cfg.example" CONFIG_PXE="${TFTP_ROOT}/installer/debian/menu.cfg.example"
rm -f ${CONFIG_PXE} && touch ${CONFIG_PXE} rm -f ${CONFIG_PXE} && touch ${CONFIG_PXE}
for DISTRO in wheezy jessie sid; do # For ALL Debian's version for DISTRO in jessie stretch sid; do # For ALL Debian's version
for ARCH in amd64 i386; do # For all classic architecture for ARCH in amd64 i386; do # For all classic architecture
# Config file # Config file
echo "label install" >> "${CONFIG_PXE}" echo "label install" >> "${CONFIG_PXE}"
# Create and go into directory # Create and go into directory
mkdir -p ${TFTP_ROOT}/installer/debian/${DISTRO}/${ARCH} mkdir -p ${TFTP_ROOT}/installer/debian/${DISTRO}/${ARCH}
pushd ${TFTP_ROOT}/installer/debian/${DISTRO}/${ARCH} pushd ${TFTP_ROOT}/installer/debian/${DISTRO}/${ARCH}
# Download files # Download files
wget http://ftp.fr.debian.org/debian/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/debian-installer/${ARCH}/linux -O linux wget http://ftp.fr.debian.org/debian/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/debian-installer/${ARCH}/linux -O linux
wget http://ftp.fr.debian.org/debian/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/debian-installer/${ARCH}/initrd.gz -O initrd.gz wget http://ftp.fr.debian.org/debian/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/debian-installer/${ARCH}/initrd.gz -O initrd.gz
popd popd
# Config file # Config file
/bin/cat >> "${CONFIG_PXE}" << EOF /bin/cat >> "${CONFIG_PXE}" << EOF
menu label Debian GNU/Linux ${DISTRO} ^${ARCH} bits menu label Debian GNU/Linux ${DISTRO} ^${ARCH} bits
kernel installer/debian/${DISTRO}/${ARCH}/linux kernel installer/debian/${DISTRO}/${ARCH}/linux
append vga=normal initrd=installer/debian/${DISTRO}/${ARCH}/initrd.gz -- quiet append vga=normal initrd=installer/debian/${DISTRO}/${ARCH}/initrd.gz -- quiet
EOF EOF
done done
# Config file # Config file
/bin/cat >> "${CONFIG_PXE}" << EOF /bin/cat >> "${CONFIG_PXE}" << EOF
label separator label separator
menu label --- menu label ---
EOF EOF
done done
# Config file # Config file
/bin/cat >> "${CONFIG_PXE}" << EOF /bin/cat >> "${CONFIG_PXE}" << EOF
label mainmenu label mainmenu
menu label ^Back.. menu label ^Back..
menu exit menu exit
EOF EOF
exit 0