X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=pxe-server;h=5507e5d1196ba6b219916f2774be16b3d4759dd1;hb=5177fb7a211b9056ad8f0df41371bbeaac25ed32;hp=1664253761ae818d846d07521291214a0a42f64b;hpb=a8ec695d6a39792133a21e9eca70e69f9fab107b;p=automated-distro-installer diff --git a/pxe-server b/pxe-server index 1664253..5507e5d 100755 --- a/pxe-server +++ b/pxe-server @@ -1,44 +1,137 @@ -#!/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 <