X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=myfai-chboot;h=308b1c70a04e317cb47e1aeacdefbc831d2c4426;hb=d9993568d38dd7d2d18ced6b5007e9cc07d1e576;hp=7d775ea66cd1e13663ed38df4098e6b49f518a9b;hpb=ed3681256885d295f39d5df60784d3281a2f8719;p=automated-distro-installer diff --git a/myfai-chboot b/myfai-chboot index 7d775ea..308b1c7 100755 --- a/myfai-chboot +++ b/myfai-chboot @@ -36,8 +36,10 @@ 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 -- "$@"