summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtest/runtest11
1 files changed, 9 insertions, 2 deletions
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 !~ /\./)