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
fix bug on buster
[automated-distro-installer]
/
myfai-chboot
diff --git
a/myfai-chboot
b/myfai-chboot
index d0c0a97323d89d02d9b7da9748f5b1d4ad0235c2..7d775ea66cd1e13663ed38df4098e6b49f518a9b 100755
(executable)
--- a/
myfai-chboot
+++ b/
myfai-chboot
@@
-6,8
+6,8
@@
trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
x=$(readlink -f "$BASH_SOURCE"); cd ${x%/*}
usage() {
x=$(readlink -f "$BASH_SOURCE"); cd ${x%/*}
usage() {
-
cat <<EOF
-usage: ${0##*/} [
-h|--help] [hostname|ip
]
+ cat <<EOF
+usage: ${0##*/} [
OPTIONS] [HOSTNAME|IP|default
]
Sets up tftp pxe config and nfs server on host "faiserver".
Sets up tftp pxe config and nfs server on host "faiserver".
@@
-23,16
+23,22
@@
config for all hosts, but leaves nfs server alone. Use faiserver-disable
to disable the nfs server.
-S sets FAI_ACTION=sysinfo, and remove fai flag reboot.
to disable the nfs server.
-S sets FAI_ACTION=sysinfo, and remove fai flag reboot.
- Usefull for doing a system recovery.
+ Usefull for doing a system recovery. It reboots automatically anyways :(
+-k Add serial port output for kgped16
+-i sets FAI_ACTION=inventory and remove fai flag reboot.
+ I'm not sure what this is usefull for.
-h|--help Print help and exit.
EOF
-h|--help Print help and exit.
EOF
-
exit $1
+ exit $1
}
case $1 in
}
case $1 in
-
-h|--help) usage ;;
+ -h|--help) usage ;;
esac
esac
-
-host=$(chost faiserver)
-ssh root@$host bash -s -- "$@" <myfai-chboot-local
+host=$(./chost faiserver)
+if [[ $host == $(./chost $HOSTNAME) ]]; then
+ ./myfai-chboot-local "$@"
+else
+ ssh root@$host bash -s -- "$@" <myfai-chboot-local
+fi