X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai-revm;h=d8833ab4b01e2e920f6f31bc2793a64c56f0b763;hb=bf19e9969f50a637c8fabf724eb9e292da472e01;hp=3b3e003c7e35ba20c0960c29de98ce4b59aadfe3;hpb=eae06d9028e4e70a211afef4a73b971067203da1;p=automated-distro-installer diff --git a/fai-revm b/fai-revm index 3b3e003..d8833ab 100755 --- a/fai-revm +++ b/fai-revm @@ -1,21 +1,141 @@ -#!/bin/bash -lx +#!/bin/bash -l +# Copyright (C) 2016 Ian Kelling -# Deploy fai configuration to faiserver, -# then start a virtual machine to test the config. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + + +cleanup() { :; } set -eE -o pipefail -trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?"' ERR +trap 'cleanup; echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR +script_dir=$(dirname $(readlink -f "$BASH_SOURCE")) + +e() { echo "$*"; "$@"; } + + +usage() { + cat <