Commit a9e26778 authored by Valentin Samir's avatar Valentin Samir
Browse files

[pxeboot] Possibilité de passer des options aux wget

On ajout du coup l'option -4 dans la config pour ne pas passer
par le tunnel ipv6 lors de la génération du pxe
parent 8c9c04bd
......@@ -11,6 +11,7 @@ KSROOT="/var/www/pxe"
SKELETON="$TFTPROOT-base"
TMPDIR="/var/tmp/build-netboot"
ISODIR="/var/lib/tftpboot-g"
WGETOPT="-4"
[[ $1 == "" ]] && echo "Il faut spécifier l'IP" && exit 1
OWN_IP="$1"
/etc/init.d/nfs-kernel-server stop
......
......@@ -74,8 +74,8 @@ EOF
###########################
for arch in $SYSRCCD_ARCHS; do
mkdir -p $TFTPROOT/sysrescuecd/$arch/
wget -c $SYSRCCD_FTP/image/isolinux/initram.igz -O $TFTPROOT/sysrescuecd/$arch/initram.igz
wget -c $SYSRCCD_FTP/image/isolinux/rescue`echo $arch | sed -n 's/amd64/64/p'` -O $TFTPROOT/sysrescuecd/$arch/rescue
wget $WGETOPT -c $SYSRCCD_FTP/image/isolinux/initram.igz -O $TFTPROOT/sysrescuecd/$arch/initram.igz
wget $WGETOPT -c $SYSRCCD_FTP/image/isolinux/rescue`echo $arch | sed -n 's/amd64/64/p'` -O $TFTPROOT/sysrescuecd/$arch/rescue
done
if [[ $SYSRCCD_ARCHS != "" ]]; then
......@@ -110,19 +110,19 @@ fi
for dist in $DEBIAN_DISTS; do
for arch in $DEBIAN_ARCHS; do
wget -c $DEBIAN_FTP/$dist/main/installer-$arch/current/images/netboot/netboot.tar.gz -O $TMPDIR/netboot-debian-$dist-$arch.tar.gz
wget $WGETOPT -c $DEBIAN_FTP/$dist/main/installer-$arch/current/images/netboot/netboot.tar.gz -O $TMPDIR/netboot-debian-$dist-$arch.tar.gz
mkdir -p $TMPDIR/netboot-debian-$dist-$arch/
tar zxf $TMPDIR/netboot-debian-$dist-$arch.tar.gz -C $TMPDIR/netboot-debian-$dist-$arch/
mkdir -p $TFTPROOT/debian-$dist/$arch
cp $TMPDIR/netboot-debian-$dist-$arch/debian-installer/$arch/initrd.gz $TFTPROOT/debian-$dist/$arch
cp $TMPDIR/netboot-debian-$dist-$arch/debian-installer/$arch/linux $TFTPROOT/debian-$dist/$arch
#~ wget -c $DEBIAN_FTP/$dist/main/installer-$arch/current/images/netboot/gtk/netboot.tar.gz -O $TMPDIR/netboot-debian-gtk-$dist-$arch.tar.gz
#~ wget $WGETOPT -c $DEBIAN_FTP/$dist/main/installer-$arch/current/images/netboot/gtk/netboot.tar.gz -O $TMPDIR/netboot-debian-gtk-$dist-$arch.tar.gz
#~ mkdir -p $TMPDIR/netboot-debian-gtk-$dist-$arch/
#~ tar zxf $TMPDIR/netboot-debian-gtk-$dist-$arch.tar.gz -C $TMPDIR/netboot-debian-gtk-$dist-$arch/
#~ mkdir -p $TFTPROOT/debian-gtk-$dist/$arch
#~ cp $TMPDIR/netboot-debian-gtk-$dist-$arch/debian-installer/$arch/initrd.gz $TFTPROOT/debian-gtk-$dist/$arch
#~ cp $TMPDIR/netboot-debian-gtk-$dist-$arch/debian-installer/$arch/linux $TFTPROOT/debian-gtk-$dist/$arch
wget -c $DEBIAN_FTP/$dist/main/installer-kfreebsd-$arch/current/images/netboot/netboot.tar.gz -O $TMPDIR/netboot-debian-kfreebsd-$dist-$arch.tar.gz
wget $WGETOPT -c $DEBIAN_FTP/$dist/main/installer-kfreebsd-$arch/current/images/netboot/netboot.tar.gz -O $TMPDIR/netboot-debian-kfreebsd-$dist-$arch.tar.gz
mkdir -p $TMPDIR/netboot-debian-$dist-kfreebsd-$arch/
tar zxf $TMPDIR/netboot-debian-kfreebsd-$dist-$arch.tar.gz -C $TMPDIR/netboot-debian-$dist-kfreebsd-$arch/
mkdir -p $TFTPROOT/debian-$dist/kfreebsd-$arch/
......@@ -230,8 +230,8 @@ EOF
#rm -r $TMPDIR/netboot-debian-backport-* || true;
for dist in $DEBIAN_BACKPORT_DISTS; do
for arch in $DEBIAN_BACKPORT_ARCHS; do
url=`wget $DEBIAN_BACKPORT_FTP/$dist/ -O- | grep netboot | grep $arch | sort | tail -n 1 | sed 's/">/ /g;s/href="//;s@</a>@@' | awk '{print $6}'`
wget -c $url -O $TMPDIR/netboot-debian-backport-$dist-$arch.tar.gz
url=`wget $WGETOPT $DEBIAN_BACKPORT_FTP/$dist/ -O- | grep netboot | grep $arch | sort | tail -n 1 | sed 's/">/ /g;s/href="//;s@</a>@@' | awk '{print $6}'`
wget $WGETOPT -c $url -O $TMPDIR/netboot-debian-backport-$dist-$arch.tar.gz
mkdir -p $TMPDIR/netboot-debian-backport-$dist-$arch/
tar zxf $TMPDIR/netboot-debian-backport-$dist-$arch.tar.gz -C $TMPDIR/netboot-debian-backport-$dist-$arch/
mkdir -p $TFTPROOT/debian-backport-$dist/$arch
......@@ -299,7 +299,7 @@ EOF
for dist in $UBUNTU_DISTS; do
for arch in $UBUNTU_ARCHS; do
wget -c $UBUNTU_FTP/$dist/main/installer-$arch/current/images/netboot/netboot.tar.gz -O $TMPDIR/netboot-ubuntu-$dist-$arch.tar.gz
wget $WGETOPT -c $UBUNTU_FTP/$dist/main/installer-$arch/current/images/netboot/netboot.tar.gz -O $TMPDIR/netboot-ubuntu-$dist-$arch.tar.gz
mkdir -p $TMPDIR/netboot-ubuntu-$dist-$arch/
tar zxf $TMPDIR/netboot-ubuntu-$dist-$arch.tar.gz -C $TMPDIR/netboot-ubuntu-$dist-$arch/
mkdir -p $TFTPROOT/ubuntu-$dist/$arch
......@@ -431,8 +431,8 @@ if [[ $MANDRIVA_DISTS != "" ]]; then
for dist in $MANDRIVA_DISTS; do
for arch in $MANDRIVA_ARCHS; do
mkdir -p $TFTPROOT/mandriva-$dist/$arch/
wget -c $MANDRIVA_FTP/$dist/$arch/isolinux/alt0/all.rdz -O $TFTPROOT/mandriva-$dist/$arch/initrd.img
wget -c $MANDRIVA_FTP/$dist/$arch/isolinux/alt0/vmlinuz -O $TFTPROOT/mandriva-$dist/$arch/vmlinuz
wget $WGETOPT -c $MANDRIVA_FTP/$dist/$arch/isolinux/alt0/all.rdz -O $TFTPROOT/mandriva-$dist/$arch/initrd.img
wget $WGETOPT -c $MANDRIVA_FTP/$dist/$arch/isolinux/alt0/vmlinuz -O $TFTPROOT/mandriva-$dist/$arch/vmlinuz
done
done
......@@ -495,8 +495,8 @@ fi
for dist in $CENTOS_DISTS; do
for arch in $CENTOS_ARCHS; do
mkdir -p $TMPDIR/centos-$dist/$arch/
wget -c $CENTOS_FTP/$dist/os/$arch/images/pxeboot/initrd.img -O $TMPDIR/centos-$dist/$arch/initrd.img
wget -c $CENTOS_FTP/$dist/os/$arch/images/pxeboot/vmlinuz -O $TMPDIR/centos-$dist/$arch/vmlinuz
wget $WGETOPT -c $CENTOS_FTP/$dist/os/$arch/images/pxeboot/initrd.img -O $TMPDIR/centos-$dist/$arch/initrd.img
wget $WGETOPT -c $CENTOS_FTP/$dist/os/$arch/images/pxeboot/vmlinuz -O $TMPDIR/centos-$dist/$arch/vmlinuz
done
done
cp -r $TMPDIR/centos-* $TFTPROOT/
......@@ -560,10 +560,10 @@ EOF
for dist in $FEDORA_DISTS; do
for arch in $FEDORA_ARCHS; do
mkdir -p $TMPDIR/fedora-$dist/$arch/
wget -c $FEDORA_FTP/releases/$dist/Fedora/$arch/os/images/pxeboot/initrd.img -O $TMPDIR/fedora-$dist/$arch/initrd.img ||\
wget -c $FEDORA_FTP/development/$dist/$arch/os/images/pxeboot/initrd.img -O $TMPDIR/fedora-$dist/$arch/initrd.img
wget -c $FEDORA_FTP/releases/$dist/Fedora/$arch/os/images/pxeboot/vmlinuz -O $TMPDIR/fedora-$dist/$arch/vmlinuz ||\
wget -c $FEDORA_FTP/development/$dist/$arch/os/images/pxeboot/vmlinuz -O $TMPDIR/fedora-$dist/$arch/vmlinuz
wget $WGETOPT -c $FEDORA_FTP/releases/$dist/Fedora/$arch/os/images/pxeboot/initrd.img -O $TMPDIR/fedora-$dist/$arch/initrd.img ||\
wget $WGETOPT -c $FEDORA_FTP/development/$dist/$arch/os/images/pxeboot/initrd.img -O $TMPDIR/fedora-$dist/$arch/initrd.img
wget $WGETOPT -c $FEDORA_FTP/releases/$dist/Fedora/$arch/os/images/pxeboot/vmlinuz -O $TMPDIR/fedora-$dist/$arch/vmlinuz ||\
wget $WGETOPT -c $FEDORA_FTP/development/$dist/$arch/os/images/pxeboot/vmlinuz -O $TMPDIR/fedora-$dist/$arch/vmlinuz
done
done
cp -r $TMPDIR/fedora-* $TFTPROOT/
......@@ -622,8 +622,8 @@ EOF
###########################
for dist in $OPENSUSE_DISTS; do
mkdir -p $TMPDIR/opensuse-$dist/$arch/
wget $OPENSUSE_FTP/$dist/repo/oss/boot/$arch/loader/linux -O $TMPDIR/opensuse-$dist/$arch/linux
wget $OPENSUSE_FTP/$dist/repo/oss/boot/$arch/loader/initrd -O $TMPDIR/opensuse-$dist/$arch/initrd
wget $WGETOPT $OPENSUSE_FTP/$dist/repo/oss/boot/$arch/loader/linux -O $TMPDIR/opensuse-$dist/$arch/linux
wget $WGETOPT $OPENSUSE_FTP/$dist/repo/oss/boot/$arch/loader/initrd -O $TMPDIR/opensuse-$dist/$arch/initrd
done
cp -r $TMPDIR/opensuse-* $TFTPROOT/
......@@ -679,7 +679,7 @@ if [[ $FREEBSD_DISTS != "" ]]; then
for dist in $FREEBSD_DISTS; do
for arch in $FREEBSD_ARCHS; do
mkdir -p $TMPDIR/freebsd-$dist/$arch/
wget -c $FREEBSD_FTP/releases/$arch/ISO-IMAGES/$dist/FreeBSD-$dist-RELEASE-$arch-bootonly.iso -O $TMPDIR/freebsd-$dist/$arch/bootonly.iso
wget $WGETOPT -c $FREEBSD_FTP/releases/$arch/ISO-IMAGES/$dist/FreeBSD-$dist-RELEASE-$arch-bootonly.iso -O $TMPDIR/freebsd-$dist/$arch/bootonly.iso
done
done
cp -r $TMPDIR/freebsd-* $TFTPROOT/
......@@ -738,12 +738,12 @@ fi
# On prend toujours le plus récent
#~ mkdir -p $TFTPROOT/netbsd/
#~ dist=4.0.1
#~ wget -c $NETBSD_FTP/NetBSD-$dist/amd64/installation/misc/pxeboot_ia32.bin -O $TFTPROOT/netbsd/pxeboot_ia32.bin
#~ wget $WGETOPT -c $NETBSD_FTP/NetBSD-$dist/amd64/installation/misc/pxeboot_ia32.bin -O $TFTPROOT/netbsd/pxeboot_ia32.bin
# Hack moche : la version 5.0.1 ne supporte pas le netboot (le kernel freeze)
#for dist in $NETBSD_DISTS; do
#~ for arch in $NETBSD_ARCHS; do
#~ wget -c $NETBSD_FTP/NetBSD-$dist/$arch/binary/kernel/netbsd-INSTALL.gz -O $TFTPROOT/netbsd/netbsd-$dist-$arch.gz
#~ wget $WGETOPT -c $NETBSD_FTP/NetBSD-$dist/$arch/binary/kernel/netbsd-INSTALL.gz -O $TFTPROOT/netbsd/netbsd-$dist-$arch.gz
#~ done
#done
......@@ -764,8 +764,8 @@ mkdir -p $TMPDIR/openbsd
for dist in $OPENBSD_DIST; do
for arch in $OPENBSD_ARCHS; do
# On ne garde que le dernier fichier de boot
wget -c $OPENBSD_FTP/$dist/$arch/pxeboot -O $TMPDIR/openbsd/openbsd.$arch.0
wget -c $OPENBSD_FTP/$dist/$arch/bsd.rd -O $TMPDIR/openbsd/bsd.rd-$dist.$arch
wget $WGETOPT -c $OPENBSD_FTP/$dist/$arch/pxeboot -O $TMPDIR/openbsd/openbsd.$arch.0
wget $WGETOPT -c $OPENBSD_FTP/$dist/$arch/bsd.rd -O $TMPDIR/openbsd/bsd.rd-$dist.$arch
done
done
cp -r $TMPDIR/openbsd/ $TFTPROOT/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment