tftpboot/scripts/download_ubuntu.sh

26 lines
842 B
Bash
Raw Normal View History

2014-09-08 09:49:55 +02:00
#!/bin/bash
# This script do the following:
# Download last Ubuntu LTS (14.04)
# Download Ubuntu 13.10
2014-09-08 09:49:55 +02:00
TFTP_ROOT="/var/lib/tftpboot"
# last Long Term Support distribution name
LTS="trusty"
for DISTRO in saucy ${LTS}; do
for ARCH in amd64 i386; do
mkdir -p ${TFTP_ROOT}/installer/ubuntu/${DISTRO}/${ARCH}
pushd ${TFTP_ROOT}/installer/ubuntu/${DISTRO}/${ARCH}
wget http://fr.archive.ubuntu.com/ubuntu/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/ubuntu-installer/${ARCH}/linux -O linux
wget http://fr.archive.ubuntu.com/ubuntu/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/ubuntu-installer/${ARCH}/initrd.gz -O initrd.gz
popd
done
2014-09-08 09:49:55 +02:00
done
# Link the LTS distribution name to lts
unlink ${TFTP_ROOT}/installer/ubuntu/lts
ln -s ${LTS} ${TFTP_ROOT}/installer/ubuntu/lts
###########################