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
minor fixes
[automated-distro-installer]
/
myfai-chboot
diff --git
a/myfai-chboot
b/myfai-chboot
index b5bc847e1a2f4e60d76ff2696d41ce3432b8a48f..308b1c70a04e317cb47e1aeacdefbc831d2c4426 100755
(executable)
--- a/
myfai-chboot
+++ b/
myfai-chboot
@@
-36,9
+36,11
@@
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
./myfai-chboot-local "$@"
else
- ssh root@$host bash -s "$@" <myfai-chboot-local
+ ssh root@$host bash -s
--
"$@" <myfai-chboot-local
fi
fi