X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=pxe-server;h=9e74eeb757a030c9a367fabb3c8440597188d043;hb=7f77555b3d92709034fe41919358053c650c71e1;hp=0bdd13401e4238995ca0ccec985c0ca88d7ddf73;hpb=2eebb95531424e04797094d622eebdd7ece5b38b;p=automated-distro-installer diff --git a/pxe-server b/pxe-server index 0bdd134..9e74eeb 100755 --- a/pxe-server +++ b/pxe-server @@ -28,19 +28,31 @@ trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR usage() { cat < tftpboot + + +-r Don't redeploy fai config. For example, if there is a different host + that is mid-install. + +-a Don't setup pxe, just Wait for 2 dhcp acks, then disable the pxe + server after a delay. First ack is for pxe boot, 2nd ack is + for os boot. Sometimes on debian, there is a 3rd one shortly + after the 2nd. I can't remember exactly why this caused a + problem, but I'm hoping the sleep will take care of it. + +-w Setup pxe, then wait like -a. -h|--help Print help and exit @@ -68,12 +80,16 @@ while true; do esac done -read type host <<<"$@" +read host type <<<"$@" -if [[ ! $type ]]; then - echo "$0: error: exptected 1 argument of type" - usage 1 -fi +case $# in + 0|2);; + *) + echo "$0: error: expected 0 or 2 arguments" + echo + usage 1 + ;; +esac if [[ $host ]]; then host_tag="tag:$host," @@ -105,7 +121,7 @@ EOF fai() { cat <