git://git.exim.org
/
users
/
jgh
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4670e9d
)
Testsuite: for $parm_hostname use method more similar to readconf() $primary_hostname...
author
Jeremy Harris
<jgh146exb@wizmail.org>
Tue, 25 Oct 2016 22:48:23 +0000
(23:48 +0100)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Tue, 25 Oct 2016 22:48:23 +0000
(23:48 +0100)
test/runtest
patch
|
blob
|
history
diff --git
a/test/runtest
b/test/runtest
index 5360b3303c36d21941459b58a5e66c4ef7fc998c..b601e01cbb29ce9cf9d55499a516a3a7fa9a99ba 100755
(executable)
--- 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;
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 !~ /\./)
print "Hostname is $parm_hostname\n";
if ($parm_hostname !~ /\./)