X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=myfai-chboot;h=308b1c70a04e317cb47e1aeacdefbc831d2c4426;hb=53b932c6f960b7f4a9bd2171cdfd630304f15fd8;hp=7991542d75e1ca717da1cde0edaf0004a51ebdd4;hpb=5ccaac3779f6bcf991e6ab0f7d545b37e3a4db63;p=automated-distro-installer diff --git a/myfai-chboot b/myfai-chboot index 7991542..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 "$@"