$| = 1;
my %opt;
-getopts('?fFhHiIqrRstT:x', \%opt);
+getopts('?fFhHiIqrRstT:', \%opt);
my $FILESUFFIXREGEXP = '('.join('|', qw/
,v ~ .bak .log .old .swp .tmp
/).')$';
+# Validation errors
my $verrs_total = 0;
+
+# "Permission" errors with respect to what record types are allowed
my $perrs_total = 0;
valtz $VERSION, $COPYRIGHT
validates tinydns-data zone files
Usage:
- $0 [-hfFqrRiItTx] <file(s)>
+ $0 [-hfFqrRiItT] <file(s)>
-h shows this help.
A commandline way to explicitly set the allowed recordtypes.
This is _concatenated_ to the allowtype-allowed recordtypes.
- -x Exit with non-null exit code on errors; i.e. make errors detectable by
- e.g. shell scripts; 1 = validation error, 2 = permission error,
- 3 = combination of 1 and 2.
-
All errors in the zonefiles are sent to STDERR.
}
}
-if ($opt{x} && ($verrs_total + $perrs_total))
+if ($verrs_total + $perrs_total)
{
my $exitcode = $verrs_total > 0 ? 1 : 0;
$exitcode += $perrs_total > 0 ? 2 : 0;