X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=chost;h=18c0aacb1f0ec73f2ca956efa1aa12bb4f93be99;hp=a26529fee9efbeaf3a14632946d59d4e84d7bc8d;hb=6ca069946c8ff88d79d1ae421e0eda60ae1c514c;hpb=3d9cc96092cdc8aa05bc95cf83c07bb1af692013 diff --git a/chost b/chost index a26529f..18c0aac 100755 --- a/chost +++ b/chost @@ -11,5 +11,11 @@ host=$1 # a valid address and we just use that addr=$(host $host | sed -rn 's/^\S+ has address //p;T;q' ||:) h=$(host $addr) +case $h in + *"no PTR record") + echo "error: chost: $h" >&2 + exit 1 + ;; +esac h=${h##* } echo $h