aboutsummaryrefslogtreecommitdiff
path: root/vhostcname/vhostcname
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2016-02-02 15:15:37 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2016-02-02 15:15:37 +0200
commit0225fb12aa45a259f728951693d5b101c010c3fd (patch)
tree1e8990874b8370cdb8ee1d2f3f29f4b4c8b31004 /vhostcname/vhostcname
parent814257a140f499653d9cf3dbc64be9fac53a09fe (diff)
downloaddnstools-0225fb12aa45a259f728951693d5b101c010c3fd.tar.gz
dnstools-0225fb12aa45a259f728951693d5b101c010c3fd.tar.bz2
Bugfixes
Diffstat (limited to 'vhostcname/vhostcname')
-rwxr-xr-xvhostcname/vhostcname13
1 files changed, 7 insertions, 6 deletions
diff --git a/vhostcname/vhostcname b/vhostcname/vhostcname
index 5981871..91a2c8d 100755
--- a/vhostcname/vhostcname
+++ b/vhostcname/vhostcname
@@ -88,7 +88,7 @@ sub parse_section {
$input = $2;
$quote = undef;
} else {
- die "unparsable input $input";
+ abend(EX_CONFIG, "unparsable input $input");
}
}
@@ -527,9 +527,9 @@ sub com_status {
my %comtab = (
start => \&com_start,
- restart => \&com_reload,
- 'force-restart' => \&com_start,
+ 'force-restart' => 'start',
reload => \&com_reload,
+ restart => 'reload',
stop => \&com_stop,
status => \&com_status
);
@@ -537,11 +537,12 @@ my %comtab = (
sub getcom {
my $com = shift;
- while (defined($comtab{$com}) and ref($comtab{$com}) ne 'CODE') {
+ while (exists($comtab{$com}) and ref($comtab{$com}) ne 'CODE') {
+ die "internal error: unresolved command alias"
+ unless exists $comtab{$com};
$com = $comtab{$com};
}
- die "internal error: unresolved command alias" unless defined $com;
- return $comtab{$com} if defined $comtab{$com};
+ return $comtab{$com} if exists $comtab{$com};
my @v = map { /^$com/ ? $_ : () } sort keys %comtab;
if ($#v == -1) {

Return to:

Send suggestions and report system problems to the System administrator.