X-Git-Url: https://git.exim.org/users/heiko/exim.git/blobdiff_plain/4670e9d3b06f6f14c5d868f786b75e2d6b921c8d..32c5107fabc2f87670d63dacb236b324a4a9b259:/test/runtest diff --git a/test/runtest b/test/runtest index 5360b3303..b601e01cb 100755 --- a/test/runtest +++ b/test/runtest @@ -3145,8 +3145,15 @@ if ($parm_ipv6 =~ /^[\da-f]/) chomp($temp = `hostname`); die "'hostname' didn't return anything\n" unless defined $temp and length $temp; -$parm_hostname = (gethostbyname($temp))[0]; -$parm_hostname = "no.host.name.found" unless defined $parm_hostname and length $parm_hostname; +if ($temp =~ /\./) + { + $parm_hostname = $temp; + } +else + { + $parm_hostname = (gethostbyname($temp))[0]; + $parm_hostname = "no.host.name.found" unless defined $parm_hostname and length $parm_hostname; + } print "Hostname is $parm_hostname\n"; if ($parm_hostname !~ /\./)