summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2016-10-25 23:48:23 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2016-10-25 23:48:23 +0100
commit32c5107fabc2f87670d63dacb236b324a4a9b259 (patch)
tree2302ba241418c785b01c4d4b89a10c5e0751ba2b /test
parent4670e9d3b06f6f14c5d868f786b75e2d6b921c8d (diff)
Testsuite: for $parm_hostname use method more similar to readconf() $primary_hostname coding
Diffstat (limited to 'test')
-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 !~ /\./)