X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=pxe-server;h=574a896f05ea3e19bb73590655f5b8e816772252;hb=c8bd51084bc4d90b9653d521e7cb05e17e417d97;hp=f53bdef0f5f35dd054519a06eac5c8b16be24964;hpb=4c0b3d508093cd1561f6ae887f154f06383b67d3;p=automated-distro-installer diff --git a/pxe-server b/pxe-server index f53bdef..574a896 100755 --- a/pxe-server +++ b/pxe-server @@ -1,44 +1,115 @@ -#!/bin/bash -x +#!/bin/bash # Setup dhcp server to point to tftp server, # and depending on the type, setup the tftp server. # usage: $0 TYPE -# default distro is the base debian/fedora type. others are fai & arch +# default distro is the base debian/fedora type. others are fai & arch. +# for no pxe server, use a no-op like : or true. set -eE -o pipefail trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR -if [[ ! $1 ]]; then + +usage() { + cat <