+cleanup() { :; }
+trap 'cleanup; echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
+
+reboot=true
+if [[ $1 == -r ]]; then
+ reboot=false
+ shift
+fi
+
+usage() {
+ cat <<EOF
+Usage: ${0##*/} [OPTIONS] HOST
+"distro setup full" using fai.
+
+Note: relies on other repos and paths specific to Ian's system.
+Note: disables btrbk.timer. If it was active before, it should
+be manual reenabled after completion.
+
+--no-r Don't ssh to host and reboot.
+-k ssh to host and kexec, don't use pxe. implies --no-r
+-h|--help Print help and exit.
+
+Note: Uses GNU getopt options parsing style
+EOF
+ exit $1
+}
+
+##### begin command line parsing ########