summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2016-02-02 12:52:24 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2016-02-02 12:52:24 (GMT)
commit814257a140f499653d9cf3dbc64be9fac53a09fe (patch) (side-by-side diff)
treef31f33b35db6b153139e859caad4b7c370dd424b
parent64db421ec14bef3cdd4fd530e7709ae9a1035271 (diff)
downloaddnstools-814257a140f499653d9cf3dbc64be9fac53a09fe.tar.gz
dnstools-814257a140f499653d9cf3dbc64be9fac53a09fe.tar.bz2
Bugfix
Diffstat (more/less context) (ignore whitespace changes)
-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($) {
if (/^Server(Name|Alias)\s+(.*)/) {
foreach my $name (split /\s+/, $2) {
unless (valid_domain_name($name)) {
- print STDERR "$progname: $file:$line: $name: invalid domain name\n";
+ err("$file:$line: $name: invalid domain name");
next;
}
foreach my $z (keys %{$config{zone}}) {
if ($name =~ /.*\.$z$/) {
if ($name =~ /^\*\.(.+)/ and $1 eq $z) {
- print STDERR "$progname: $file:$line: $name: first-level wildcard\n";
+ err("$file:$line: $name: first-level wildcard");
next;
}
$ret{$name} = $z;
@@ -496,7 +496,7 @@ sub com_reload {
: $config{core}{'apache-config-directory'};
my %cnames = get_cnames($confdir);
update_cnames_from_hash(%cnames);
- print STDERR "$progname: no cnames defined\n" unless (keys(%cnames) > 0);
+ err("no cnames defined") unless (keys(%cnames) > 0);
}
sub com_stop {
@@ -681,11 +681,10 @@ if ($#ARGV == -1) {
}
update_cnames_from_dir($update_dir) if defined($update_dir);
+} else {
+ &{getcom($ARGV[0])}(@ARGV);
}
-my $command = getcom($ARGV[0]);
-&{$command}(@ARGV);
-
exit($status);
__END__

Return to:

Send suggestions and report system problems to the System administrator.