tftpboot/scripts/download_ubuntu.sh

27 lines
899 B
Bash
Raw Permalink Normal View History

2014-09-08 09:49:55 +02:00
#!/bin/bash
# This script do the following:
# Download last Ubuntu LTS 16.04 (xenial)
# Download Ubuntu 15.10 (wily)
# Make a symlink to access to the last LTS
2014-09-08 09:49:55 +02:00
TFTP_ROOT="/var/lib/tftpboot"
# last Long Term Support distribution name
LTS="xenial"
2014-09-08 09:49:55 +02:00
for DISTRO in wily ${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
###########################