X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai-revm;h=d8833ab4b01e2e920f6f31bc2793a64c56f0b763;hb=bf19e9969f50a637c8fabf724eb9e292da472e01;hp=aa10dfc8eeb18bc9b3f04f9067c4c43ee4736605;hpb=c8bd51084bc4d90b9653d521e7cb05e17e417d97;p=automated-distro-installer diff --git a/fai-revm b/fai-revm index aa10dfc..d8833ab 100755 --- a/fai-revm +++ b/fai-revm @@ -1,28 +1,80 @@ #!/bin/bash -l -set -x +# Copyright (C) 2016 Ian Kelling -# Assumes pxe config for dhcp has been setup. -# 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 $?" >&2' ERR +trap 'cleanup; echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR +script_dir=$(dirname $(readlink -f "$BASH_SOURCE")) + +e() { echo "$*"; "$@"; } -# I had this set false as default before, can't remember why. oh well. + +usage() { + cat <