X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai-revm;h=d8833ab4b01e2e920f6f31bc2793a64c56f0b763;hb=bf19e9969f50a637c8fabf724eb9e292da472e01;hp=3b1b514a3b662eaf0eb0e37a12171f0ef8dfe9c1;hpb=593c7e9993e4f2110846f869f468c4247a349700;p=automated-distro-installer diff --git a/fai-revm b/fai-revm index 3b1b514..d8833ab 100755 --- a/fai-revm +++ b/fai-revm @@ -1,56 +1,141 @@ #!/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 $?"' ERR +trap 'cleanup; echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR +script_dir=$(dirname $(readlink -f "$BASH_SOURCE")) + +e() { echo "$*"; "$@"; } + + +usage() { + cat <