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
various fixes for bullseye and new ssh key changes
[automated-distro-installer]
/
myfai-chboot
diff --git
a/myfai-chboot
b/myfai-chboot
index cbba8b5b97abe269d5e4b41b138e9b31fd1256aa..308b1c70a04e317cb47e1aeacdefbc831d2c4426 100755
(executable)
--- a/
myfai-chboot
+++ b/
myfai-chboot
@@
-7,7
+7,7
@@
x=$(readlink -f "$BASH_SOURCE"); cd ${x%/*}
usage() {
cat <<EOF
usage() {
cat <<EOF
-usage: ${0##*/} [
-h|--help
] [HOSTNAME|IP|default]
+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,7
+23,10
@@
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
@@
-34,5
+37,10
@@
case $1 in
esac
esac
+faiserver_addr=$(host faiserver | sed -rn 's/^\S+ has address //p;T;q' ||:)
host=$(./chost faiserver)
host=$(./chost faiserver)
-ssh root@$host bash -s -- "$@" <myfai-chboot-local
+if ip a | grep "^ *inet.\? $faiserver_addr" &>/dev/null; then
+ ./myfai-chboot-local "$@"
+else
+ ssh root@$host bash -s -- "$@" <myfai-chboot-local
+fi