add devbyid dependency
[automated-distro-installer] / myfai-chboot
1 #!/bin/bash
2
3 set -eE -o pipefail
4 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
5
6
7 usage() {
8 cat <<'EOF'
9 usage $0 [hostname|ip|default]...
10
11 Sets up tftp pxe config. No argument disables for all hosts.
12 EOF
13 exit $1
14 }
15
16 cd "${BASH_SOURCE%/*}" # directory of the script
17
18 host=$(chost faiserver)
19 ssh root@$host bash -s "$@" <myfai-chboot-local
20 if [[ $1 ]]; then
21 ./faiserver-enable
22 else
23 ./faiserver-disable
24 fi