iankelling.org
/
git
/
automated-distro-installer
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add syncthing port forward
[automated-distro-installer]
/
fai-redep
diff --git
a/fai-redep
b/fai-redep
index b035ef55a74283163b544f8d58b78f0b89c0121e..b8fabac4ac14e42da83fd3f6afc6a83cd44ae8ac 100755
(executable)
--- a/
fai-redep
+++ b/
fai-redep
@@
-16,13
+16,23
@@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
set -x
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
set -x
-# Deploy fai configuration to faiserver,
-# then start a virtual machine to test the config.
+
set -eE -o pipefail
trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
set -eE -o pipefail
trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
-cd $(dirname $(readlink -f "$BASH_SOURCE"))
+x="$(readlink -f "$BASH_SOURCE")"; cd ${x%/*}
+
+usage() {
+ cat <<EOF
+usage: ${0##*/} [-h|--help]
+Deploy fai configuration to host "faiserver"
+EOF
+ exit $1
+}
+case $1 in
+ -h|--help) usage ;;
+esac
# i use faiserver as a dns alias, but ssh key is associated with
# i use faiserver as a dns alias, but ssh key is associated with