The "-x" flag used to set the exit code non-zero on error, thus making
it easier to detect errors in shell scripts. But I can imagine no
situation where returning zero unconditionally is preferable; and so,
I've removed the flag and enabled the "-x" behavior by default.
Changes from version 0.7
========================
Changes from version 0.7
========================
+* Dropped "-x" flag; the return code is always non-zero on error now.
* Warn about IP addresses in hostname fields
* Add support for SRV records
* Allow underscore characters in FQDNs and pointers
* Warn about IP addresses in hostname fields
* Add support for SRV records
* Allow underscore characters in FQDNs and pointers
Usage:
Simple validation:
Usage:
Simple validation:
- valtz [-qrRix] <zonefiles>
+ valtz [-qrRi] <zonefiles>
- valtz -f[qrRiItTx] <zonefiles>
+ valtz -f[qrRiItT] <zonefiles>
- valtz -F[qrRiItTx] <filterfiles>
+ valtz -F[qrRiItT] <filterfiles>
- valtz [-hfFqrRiItTx] <file(s)>
+ valtz [-hfFqrRiItT] <file(s)>
A commandline way to explicitly set the allowed recordtypes.
This is _concatenated_ to the allowtype-allowed recordtypes.
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.
All errors in the zonefiles are sent to STDERR.
-getopts('?fFhHiIqrRstT:x', \%opt);
+getopts('?fFhHiIqrRstT:', \%opt);
my $FILESUFFIXREGEXP = '('.join('|', qw/
,v ~ .bak .log .old .swp .tmp
/).')$';
my $FILESUFFIXREGEXP = '('.join('|', qw/
,v ~ .bak .log .old .swp .tmp
/).')$';
+
+# "Permission" errors with respect to what record types are allowed
valtz $VERSION, $COPYRIGHT
validates tinydns-data zone files
Usage:
valtz $VERSION, $COPYRIGHT
validates tinydns-data zone files
Usage:
- $0 [-hfFqrRiItTx] <file(s)>
+ $0 [-hfFqrRiItT] <file(s)>
A commandline way to explicitly set the allowed recordtypes.
This is _concatenated_ to the allowtype-allowed recordtypes.
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.
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;
{
my $exitcode = $verrs_total > 0 ? 1 : 0;
$exitcode += $perrs_total > 0 ? 2 : 0;