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 7d775ea66cd1e13663ed38df4098e6b49f518a9b..308b1c70a04e317cb47e1aeacdefbc831d2c4426 100755
(executable)
--- a/
myfai-chboot
+++ b/
myfai-chboot
@@
-36,8
+36,10
@@
case $1 in
-h|--help) usage ;;
esac
-h|--help) usage ;;
esac
+
+faiserver_addr=$(host faiserver | sed -rn 's/^\S+ has address //p;T;q' ||:)
host=$(./chost faiserver)
host=$(./chost faiserver)
-if
[[ $host == $(./chost $HOSTNAME) ]]
; then
+if
ip a | grep "^ *inet.\? $faiserver_addr" &>/dev/null
; then
./myfai-chboot-local "$@"
else
ssh root@$host bash -s -- "$@" <myfai-chboot-local
./myfai-chboot-local "$@"
else
ssh root@$host bash -s -- "$@" <myfai-chboot-local