X-Git-Url: https://git.exim.org/users/heiko/exim.git/blobdiff_plain/cb340d8d9746cdaab9ebe2eb5c1e72b4e29dd24e..32c5107fabc2f87670d63dacb236b324a4a9b259:/test/runtest?ds=sidebyside 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 !~ /\./)