+
+usage() {
+ cat <<EOF
+Usage: ${0##*/} [OPTIONS] TYPE [HOST]
+One line description
+
+TYPE is one of arch, plain, fai, or : for no pxe server.
+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=()
+redep=false
+while [[ $1 ]]; do
+ case $1 in
+ --) shift; break ;;
+ -h|--help) usage ;;
+ -r) redep=true; shift ;;
+ -p) persist=true; shift ;;
+ *) args+=("$1"); shift ;;
+ esac
+done
+args+=("$@")
+
+
+read type host <<<"${args[@]}"
+
+if [[ ! $type ]]; then