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
fixes mostly for bootstrap vol, better docs
[automated-distro-installer]
/
myfai-chboot
diff --git
a/myfai-chboot
b/myfai-chboot
index e216aa077e0e9afe19b0fc572e173c4e55afa43e..310969e2708f42015284bc8945d780f405506856 100755
(executable)
--- a/
myfai-chboot
+++ b/
myfai-chboot
@@
-3,16
+3,24
@@
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
+x=$(readlink -f "$BASH_SOURCE"); cd ${x%/*}
usage() {
usage() {
- cat <<
'EOF'
-usage
$0
[hostname|ip|default]...
+ cat <<
EOF
+usage
: ${0##*/} [-h|--help]
[hostname|ip|default]...
-Sets up tftp pxe config. No argument disables for all hosts.
+Sets up tftp pxe config on host "faiserver". Argument sets the host to
+enable it for, "default" is for all hosts. No argument disables for all
+hosts.
EOF
exit $1
}
EOF
exit $1
}
-cd "${BASH_SOURCE%/*}" # directory of the script
-ssh root@faiserver bash -s "$@" <myfai-chboot-local
+case $1 in
+ -h|--help) usage ;;
+esac
+
+
+host=$(chost faiserver)
+ssh root@$host bash -s "$@" <myfai-chboot-local