X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai-redep;h=97302608703b55acb479795740e663e12e3a79de;hb=afabe0c27af744200aa6b6e05c5b2ab7d7518c1e;hp=29f4d158c5e832597e599db83cf97b408a0bbe12;hpb=cbdfb4aeffe56f5a1f00a006e94d328653957770;p=automated-distro-installer diff --git a/fai-redep b/fai-redep index 29f4d15..9730260 100755 --- a/fai-redep +++ b/fai-redep @@ -10,21 +10,10 @@ trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR cd $(dirname $(readlink -f "$BASH_SOURCE")) -faiserver_host=faiserver # i use faiserver as a dns alias, but ssh key is associated with # a canonical hostname and we will have ssh warning spam unless we # use it, so look it up. -if addr=$(host faiserver); then - addr=${addr##* } - if h=$(host $addr); then - h=${h##* } - faiserver_host=${h%%.*} - else - echo "$0: warning: host \$addr($addr) failed" - fi -else - echo "$0: warning: host faiserver failed" -fi +faiserver_host=$(chost faiserver) || faiserver_host=faiserver ssh root@$faiserver_host rm -rf /srv/fai/config