#! /usr/bin/env sh DOWNLOADDIR=/tmp/debian/wheezy/amd64 # remove EVERYTHING in tftp server root rm -fR /srv/tftp/* # only execute this if file has not been downloaded if [ ! -e $DOWNLOADDIR ] then mkdir -p $DOWNLOADDIR cd $DOWNLOADDIR wget ftp://ftp.us.debian.org/debian/dists/wheezy/main/installer-amd64/current/images/netboot/netboot.tar.gz fi cd /srv/tftp tar -xzvf $DOWNLOADDIR/netboot.tar.gz