# 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 $?"' ERR
+trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
if [[ ! $1 ]]; then
echo "$0: error: exptected 1 argument of type"
action=$1
arch() {
- default
+ plain-tftp
cat <<'EOF'
dhcp-option-force=209,boot/syslinux/archiso.cfg
dhcp-option-force=210,/arch/