better support for systems with no pxe
[automated-distro-installer] / myfai-chboot
diff --git a/myfai-chboot b/myfai-chboot
new file mode 100755 (executable)
index 0000000..e216aa0
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+set -eE -o pipefail
+trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
+
+
+usage() {
+    cat <<'EOF'
+usage $0 [hostname|ip|default]...
+
+Sets up tftp pxe config. No argument disables for all hosts.
+EOF
+    exit $1
+}
+
+cd "${BASH_SOURCE%/*}" # directory of the script
+
+ssh root@faiserver bash -s "$@" <myfai-chboot-local