aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2016-02-02 14:52:24 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2016-02-02 14:52:24 +0200
commit814257a140f499653d9cf3dbc64be9fac53a09fe (patch)
treef31f33b35db6b153139e859caad4b7c370dd424b
parent64db421ec14bef3cdd4fd530e7709ae9a1035271 (diff)
downloaddnstools-814257a140f499653d9cf3dbc64be9fac53a09fe.tar.gz
dnstools-814257a140f499653d9cf3dbc64be9fac53a09fe.tar.bz2
Bugfix
-rwxr-xr-xvhostcname/vhostcname11
1 files changed, 5 insertions, 6 deletions
diff --git a/vhostcname/vhostcname b/vhostcname/vhostcname
index fc6dd2d..5981871 100755
--- a/vhostcname/vhostcname
+++ b/vhostcname/vhostcname
@@ -287,13 +287,13 @@ sub get_cnames($) {
287 if (/^Server(Name|Alias)\s+(.*)/) { 287 if (/^Server(Name|Alias)\s+(.*)/) {
288 foreach my $name (split /\s+/, $2) { 288 foreach my $name (split /\s+/, $2) {
289 unless (valid_domain_name($name)) { 289 unless (valid_domain_name($name)) {
290 print STDERR "$progname: $file:$line: $name: invalid domain name\n"; 290 err("$file:$line: $name: invalid domain name");
291 next; 291 next;
292 } 292 }
293 foreach my $z (keys %{$config{zone}}) { 293 foreach my $z (keys %{$config{zone}}) {
294 if ($name =~ /.*\.$z$/) { 294 if ($name =~ /.*\.$z$/) {
295 if ($name =~ /^\*\.(.+)/ and $1 eq $z) { 295 if ($name =~ /^\*\.(.+)/ and $1 eq $z) {
296 print STDERR "$progname: $file:$line: $name: first-level wildcard\n"; 296 err("$file:$line: $name: first-level wildcard");
297 next; 297 next;
298 } 298 }
299 $ret{$name} = $z; 299 $ret{$name} = $z;
@@ -496,7 +496,7 @@ sub com_reload {
496 : $config{core}{'apache-config-directory'}; 496 : $config{core}{'apache-config-directory'};
497 my %cnames = get_cnames($confdir); 497 my %cnames = get_cnames($confdir);
498 update_cnames_from_hash(%cnames); 498 update_cnames_from_hash(%cnames);
499 print STDERR "$progname: no cnames defined\n" unless (keys(%cnames) > 0); 499 err("no cnames defined") unless (keys(%cnames) > 0);
500} 500}
501 501
502sub com_stop { 502sub com_stop {
@@ -681,11 +681,10 @@ if ($#ARGV == -1) {
681 } 681 }
682 682
683 update_cnames_from_dir($update_dir) if defined($update_dir); 683 update_cnames_from_dir($update_dir) if defined($update_dir);
684} else {
685 &{getcom($ARGV[0])}(@ARGV);
684} 686}
685 687
686my $command = getcom($ARGV[0]);
687&{$command}(@ARGV);
688
689exit($status); 688exit($status);
690 689
691__END__ 690__END__

Return to:

Send suggestions and report system problems to the System administrator.