X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=myfai-chboot;h=308b1c70a04e317cb47e1aeacdefbc831d2c4426;hp=2d6b527523239fc55f9cb7e2ac1f2e7c95b228c7;hb=bfd6bbd3a188aac6871f8b5e1116a0979682d52b;hpb=0d7f79362d601b278236cd1c533c7333e342b54a diff --git a/myfai-chboot b/myfai-chboot index 2d6b527..308b1c7 100755 --- a/myfai-chboot +++ b/myfai-chboot @@ -36,10 +36,11 @@ case $1 in -h|--help) usage ;; esac + +faiserver_addr=$(host faiserver | sed -rn 's/^\S+ has address //p;T;q' ||:) 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 -- - "$@"