X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=pxe-server;h=d3625d692cef0441f40be9ab032691c60bd73eb9;hb=afabe0c27af744200aa6b6e05c5b2ab7d7518c1e;hp=4fcf40c134cd472d3ba50aaa26687298846c5da1;hpb=cbdfb4aeffe56f5a1f00a006e94d328653957770;p=automated-distro-installer diff --git a/pxe-server b/pxe-server index 4fcf40c..d3625d6 100755 --- a/pxe-server +++ b/pxe-server @@ -1,4 +1,4 @@ -#!/bin/bash -x +#!/bin/bash # Setup dhcp server to point to tftp server, # and depending on the type, setup the tftp server. @@ -21,18 +21,20 @@ HOST makes the pxe server only for that specific host -h|--help Print help and exit -- Subsequent arguments are never treated as options +-p Persist. Otherwise, wait for 2 dhcp acks then remove. EOF exit $1 } ##### begin command line parsing ######## - +persist=false args=() while [[ $1 ]]; do case $1 in --) shift; break ;; -h|--help) usage ;; + -p) persist=true; shift ;; *) args+=("$1"); shift ;; esac done @@ -50,10 +52,18 @@ if [[ $host ]]; then host_tag="tag:$host," fi +case $type in + :|true) persist=true ;; +esac + ##### end command line parsing ######## +sv() { + echo "$@" + "$@" +} + arch() { - plain cat <