X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=pxe-server;h=5a157636b943f8eed2e65d2177eb5f14aef7086b;hb=a199d585d33ace63662c0fea99a5c5d6d498d14b;hp=e6680883201c5f11d4a096120a779e4dfb25c852;hpb=cf3b64c21818d0033ffe5447d30e45141c81ee1b;p=automated-distro-installer diff --git a/pxe-server b/pxe-server index e668088..5a15763 100755 --- a/pxe-server +++ b/pxe-server @@ -132,9 +132,9 @@ fi archlike() { cat </dev/null || sudo apt-get -y install dnsutils +faiserverip=$(host faiserver | sed -rn 's/^\S+ has address //p;T;q' ||:) +if [[ ! $faiserverip || $faiserverip =~ [[:space:]] ]]; then + echo "$0: error: failed to get \$faiserverip, got: $faiserverip" + exit 1 +fi + if $set; then set-pxe if [[ $type == fai ]]; then - m myfai-chboot ${chboot_args[@]} $host if $redep; then m fai-redep fi + m myfai-chboot ${chboot_args[@]} $host else # This will fail if faiserver is not setup, so ignore any # failure and don't bother us about it.