From 52dc7fd89d573420ce811ab88f475be306ec36c7 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 29 May 2020 15:43:18 +1000 Subject: [PATCH] remove ' // not configured' comment when generating options.active --- bin/named/named.conf.rst | 20 ++++++++------------ doc/misc/Makefile.am | 2 +- doc/misc/format-options.pl | 7 +++++++ doc/misc/options.active | 8 ++++---- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/bin/named/named.conf.rst b/bin/named/named.conf.rst index 1e54707ee7..4d5e9d8901 100644 --- a/bin/named/named.conf.rst +++ b/bin/named/named.conf.rst @@ -225,15 +225,12 @@ OPTIONS dnssec-secure-to-insecure boolean; dnssec-update-mode ( maintain | no-resign ); dnssec-validation ( yes | no | auto ); - dnstap { ( all | auth | client | forwarder | - resolver | update ) [ ( query | response ) ]; - ... }; - dnstap-identity ( quoted_string | none | - hostname ); - dnstap-output ( file | unix ) quoted_string [ - size ( unlimited | size ) ] [ versions ( - unlimited | integer ) ] [ suffix ( increment - | timestamp ) ]; + dnstap { ( all | auth | client | forwarder | resolver | update ) [ + ( query | response ) ]; ... }; + dnstap-identity ( quoted_string | none | hostname ); + dnstap-output ( file | unix ) quoted_string [ size ( unlimited | + size ) ] [ versions ( unlimited | integer ) ] [ suffix ( + increment | timestamp ) ]; dnstap-version ( quoted_string | none ); dscp integer; dual-stack-servers [ port integer ] { ( quoted_string [ port @@ -599,9 +596,8 @@ VIEW dnssec-secure-to-insecure boolean; dnssec-update-mode ( maintain | no-resign ); dnssec-validation ( yes | no | auto ); - dnstap { ( all | auth | client | forwarder | - resolver | update ) [ ( query | response ) ]; - ... }; + dnstap { ( all | auth | client | forwarder | resolver | update ) [ + ( query | response ) ]; ... }; dual-stack-servers [ port integer ] { ( quoted_string [ port integer ] [ dscp integer ] | ipv4_address [ port integer ] [ dscp integer ] | ipv6_address [ port diff --git a/doc/misc/Makefile.am b/doc/misc/Makefile.am index 1296038cd1..3eaace0b59 100644 --- a/doc/misc/Makefile.am +++ b/doc/misc/Makefile.am @@ -58,7 +58,7 @@ options: cfg_test $(AM_V_CFG_TEST)$(builddir)/cfg_test --named --grammar | $(PERL) $(srcdir)/sort-options.pl | $(PERL) $(srcdir)/format-options.pl > $@ options.active: cfg_test - $(AM_V_CFG_TEST)$(builddir)/cfg_test --named --grammar --active | $(PERL) $(srcdir)/sort-options.pl | $(PERL) $(srcdir)/format-options.pl > $@ + $(AM_V_CFG_TEST)$(builddir)/cfg_test --named --grammar --active | $(PERL) $(srcdir)/sort-options.pl | $(PERL) $(srcdir)/format-options.pl --strip-not-configured > $@ master.zoneopt: cfg_test $(AM_V_CFG_TEST)$(builddir)/cfg_test --zonegrammar master --active > $@ diff --git a/doc/misc/format-options.pl b/doc/misc/format-options.pl index 5fa3db11a0..797a014726 100644 --- a/doc/misc/format-options.pl +++ b/doc/misc/format-options.pl @@ -9,6 +9,12 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +use Getopt::Long; + +my $strip_not_configured = ''; + +GetOptions ('strip-not-configured' => \$strip_not_configured); + print <) { m!^( *)!; my $indent = $1; my $comment = ""; + $line =~ s! // not configured!! if $strip_not_configured; if ( $line =~ m!//.*! ) { $comment = $&; $line =~ s!//.*!!; diff --git a/doc/misc/options.active b/doc/misc/options.active index 8abd4e1f5d..40dec8ba63 100644 --- a/doc/misc/options.active +++ b/doc/misc/options.active @@ -143,8 +143,8 @@ options { dns64-contact ; dns64-server ; dnskey-sig-validity ; - dnsrps-enable ; // not configured - dnsrps-options { }; // not configured + dnsrps-enable ; + dnsrps-options { }; dnssec-accept-expired ; dnssec-dnskey-kskonly ; dnssec-loadkeys-interval ; @@ -482,8 +482,8 @@ view [ ] { dns64-contact ; dns64-server ; dnskey-sig-validity ; - dnsrps-enable ; // not configured - dnsrps-options { }; // not configured + dnsrps-enable ; + dnsrps-options { }; dnssec-accept-expired ; dnssec-dnskey-kskonly ; dnssec-loadkeys-interval ;