2014-09-08 09:49:55 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# This script do the following:
|
2016-07-06 14:51:38 +02:00
|
|
|
# Download last Ubuntu LTS 16.04 (xenial)
|
2017-12-05 15:25:47 +01:00
|
|
|
# Download Ubuntu 17.10 (artful)
|
2016-07-06 14:51:38 +02:00
|
|
|
# Make a symlink to access to the last LTS
|
2014-09-08 09:49:55 +02:00
|
|
|
|
2018-02-14 10:25:14 +01:00
|
|
|
if command -v in.tftpd > /dev/null; then
|
|
|
|
source /etc/default/tftpd-hpa
|
|
|
|
else
|
|
|
|
TFTP_DIRECTORY="/srv/tftp"
|
|
|
|
fi
|
2014-09-08 09:49:55 +02:00
|
|
|
|
|
|
|
# last Long Term Support distribution name
|
2016-07-06 14:51:38 +02:00
|
|
|
LTS="xenial"
|
2014-09-08 09:49:55 +02:00
|
|
|
|
2017-12-05 15:25:47 +01:00
|
|
|
for DISTRO in artful ${LTS}; do
|
2016-07-04 17:05:17 +02:00
|
|
|
for ARCH in amd64 i386; do
|
2018-02-14 10:25:14 +01:00
|
|
|
mkdir -p ${TFTP_DIRECTORY}/installer/ubuntu/${DISTRO}/${ARCH}
|
2018-02-14 10:56:23 +01:00
|
|
|
pushd ${TFTP_DIRECTORY}/installer/ubuntu/${DISTRO}/${ARCH} > /dev/null
|
|
|
|
#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
|
|
|
|
wget --quiet http://fr.archive.ubuntu.com/ubuntu/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/ubuntu-installer/${ARCH}/linux -O linux
|
|
|
|
wget --quiet http://fr.archive.ubuntu.com/ubuntu/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/ubuntu-installer/${ARCH}/initrd.gz -O initrd.gz
|
|
|
|
popd > /dev/null
|
2016-07-04 17:05:17 +02:00
|
|
|
done
|
2014-09-08 09:49:55 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
# Link the LTS distribution name to lts
|
2018-02-14 10:25:14 +01:00
|
|
|
unlink ${TFTP_DIRECTORY}/installer/ubuntu/lts
|
|
|
|
ln -s ${LTS} ${TFTP_DIRECTORY}/installer/ubuntu/lts
|
2016-07-27 12:16:51 +02:00
|
|
|
|
|
|
|
exit 0
|