X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=myfai-chboot;h=308b1c70a04e317cb47e1aeacdefbc831d2c4426;hp=b5bc847e1a2f4e60d76ff2696d41ce3432b8a48f;hb=6ca069946c8ff88d79d1ae421e0eda60ae1c514c;hpb=659fbf0c0467af986aadb6d76693eb3011e62ac4 diff --git a/myfai-chboot b/myfai-chboot index b5bc847..308b1c7 100755 --- a/myfai-chboot +++ b/myfai-chboot @@ -36,9 +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 "$@"