diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-02-02 15:15:37 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-02-02 15:15:37 +0200 |
commit | 0225fb12aa45a259f728951693d5b101c010c3fd (patch) | |
tree | 1e8990874b8370cdb8ee1d2f3f29f4b4c8b31004 /vhostcname/vhostcname | |
parent | 814257a140f499653d9cf3dbc64be9fac53a09fe (diff) | |
download | dnstools-0225fb12aa45a259f728951693d5b101c010c3fd.tar.gz dnstools-0225fb12aa45a259f728951693d5b101c010c3fd.tar.bz2 |
Bugfixes
Diffstat (limited to 'vhostcname/vhostcname')
-rwxr-xr-x | vhostcname/vhostcname | 13 |
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) { |