]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[rt46602] Convert allow_query to dynamic port
authorOndřej Surý <ondrej@sury.org>
Wed, 18 Oct 2017 11:38:20 +0000 (13:38 +0200)
committerEvan Hunt <each@isc.org>
Sun, 25 Feb 2018 03:13:24 +0000 (19:13 -0800)
(cherry picked from commit 992a2bafec6ab120909402ea3e0d2831d92dac59)
(cherry picked from commit 1d10178e83c6c63ecaaa97c297434f65ed4b25a6)

36 files changed:
bin/tests/system/Makefile.in
bin/tests/system/allow_query/clean.sh
bin/tests/system/allow_query/ns2/named01.conf.in [moved from bin/tests/system/allow_query/ns2/named01.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named02.conf.in [moved from bin/tests/system/allow_query/ns2/named02.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named03.conf.in [moved from bin/tests/system/allow_query/ns2/named03.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named04.conf.in [moved from bin/tests/system/allow_query/ns2/named04.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named05.conf.in [moved from bin/tests/system/allow_query/ns2/named05.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named06.conf.in [moved from bin/tests/system/allow_query/ns2/named06.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named07.conf.in [moved from bin/tests/system/allow_query/ns2/named07.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named08.conf.in [moved from bin/tests/system/allow_query/ns2/named08.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named09.conf.in [moved from bin/tests/system/allow_query/ns2/named09.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named10.conf.in [moved from bin/tests/system/allow_query/ns2/named10.conf with 96% similarity]
bin/tests/system/allow_query/ns2/named11.conf.in [moved from bin/tests/system/allow_query/ns2/named11.conf with 96% similarity]
bin/tests/system/allow_query/ns2/named12.conf.in [moved from bin/tests/system/allow_query/ns2/named12.conf with 96% similarity]
bin/tests/system/allow_query/ns2/named21.conf.in [moved from bin/tests/system/allow_query/ns2/named21.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named22.conf.in [moved from bin/tests/system/allow_query/ns2/named22.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named23.conf.in [moved from bin/tests/system/allow_query/ns2/named23.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named24.conf.in [moved from bin/tests/system/allow_query/ns2/named24.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named25.conf.in [moved from bin/tests/system/allow_query/ns2/named25.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named26.conf.in [moved from bin/tests/system/allow_query/ns2/named26.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named27.conf.in [moved from bin/tests/system/allow_query/ns2/named27.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named28.conf.in [moved from bin/tests/system/allow_query/ns2/named28.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named29.conf.in [moved from bin/tests/system/allow_query/ns2/named29.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named30.conf.in [moved from bin/tests/system/allow_query/ns2/named30.conf with 96% similarity]
bin/tests/system/allow_query/ns2/named31.conf.in [moved from bin/tests/system/allow_query/ns2/named31.conf with 96% similarity]
bin/tests/system/allow_query/ns2/named32.conf.in [moved from bin/tests/system/allow_query/ns2/named32.conf with 96% similarity]
bin/tests/system/allow_query/ns2/named33.conf.in [moved from bin/tests/system/allow_query/ns2/named33.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named34.conf.in [moved from bin/tests/system/allow_query/ns2/named34.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named40.conf.in [moved from bin/tests/system/allow_query/ns2/named40.conf with 97% similarity]
bin/tests/system/allow_query/ns2/named53.conf.in [moved from bin/tests/system/allow_query/ns2/named53.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named54.conf.in [moved from bin/tests/system/allow_query/ns2/named54.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named55.conf.in [moved from bin/tests/system/allow_query/ns2/named55.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named56.conf.in [moved from bin/tests/system/allow_query/ns2/named56.conf with 95% similarity]
bin/tests/system/allow_query/ns2/named57.conf.in [moved from bin/tests/system/allow_query/ns2/named57.conf with 96% similarity]
bin/tests/system/allow_query/setup.sh
bin/tests/system/allow_query/tests.sh

index f2ceb69b882277fdac0d186b39540168853e8d59..e9c85f37ad10ea79e045cde2d68385653fd8d8d5 100644 (file)
@@ -52,11 +52,16 @@ feature-test@EXEEXT@: feature-test.@O@
 
 check: test
 
-test: subdirs
+TESTS = allow_query serve-stale
+
+test: subdirs $(TESTS)
        if test -f ./runall.sh; then $(SHELL) ./runall.sh; fi
 
-server-stale:
-       $(SHELL) ./run.sh -p 5310 -c 9954 server-stale
+serve-stale:
+       $(SHELL) ./run.sh -p 5304 -c 9954 $@
+
+allow_query:
+       $(SHELL) ./run.sh -p 5305 -c 9955 $@
 
 testclean clean distclean::
        if test -f ./cleanall.sh; then sh ./cleanall.sh; fi
@@ -74,4 +79,4 @@ install::
 
 uninstall::
 
-.PHONY: server-stale
+.PHONY: $(TESTS)
index 0c353d0a09b2c97ece19e8bb629bef1d72b492b3..f86007d11d8eb695f6bc7c81b62d8e61cba8a178 100644 (file)
@@ -21,6 +21,6 @@
 #
 
 rm -f dig.out.*
-rm -f ns2/named.conf
+rm -f ns2/named.conf ns2/named.port ns2/controls.conf
 rm -f */named.memstats
 rm -f ns*/named.run
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named01.conf
rename to bin/tests/system/allow_query/ns2/named01.conf.in
index ea0f22ef23ca21de0a78793dfdec48c371fef520..98f0dc50c4216e494f8dffaba6a8568d74f1b19e 100644 (file)
 controls { /* empty */ };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
         recursion no;
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 zone "." {
        type hint;
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named02.conf
rename to bin/tests/system/allow_query/ns2/named02.conf.in
index d6b1187a744353f9354c3f920b66cdb4e42ec792..0260ede9073f6debfaf6c7f57ba9c6a715b781bd 100644 (file)
@@ -19,7 +19,7 @@
 controls { /* empty */ };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
@@ -27,7 +27,7 @@ options {
        allow-query { any; };
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 zone "." {
        type hint;
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named03.conf
rename to bin/tests/system/allow_query/ns2/named03.conf.in
index 5a033d6916727e1b1ef104e5b4955fb6072d3235..3c782e8c6cd5dd58a5d31ca11bcdd097ae882b9c 100644 (file)
@@ -19,7 +19,7 @@
 controls { /* empty */ };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
@@ -27,7 +27,7 @@ options {
        allow-query { none; };
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 zone "." {
        type hint;
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named04.conf
rename to bin/tests/system/allow_query/ns2/named04.conf.in
index 2ec251609a1194ca2aae7f11a25e55ff679f5413..9760ed40c8a03e964f32138a6c1da57ab798ca5a 100644 (file)
@@ -19,7 +19,7 @@
 controls { /* empty */ };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
@@ -27,7 +27,7 @@ options {
        allow-query { 10.53.0.2; };
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 zone "." {
        type hint;
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named05.conf
rename to bin/tests/system/allow_query/ns2/named05.conf.in
index 56dc508f2238bf089a7fccd346d5c01576049be7..0830ba414d75d2f1aa0948a531a5eb8550f43e8d 100644 (file)
@@ -19,7 +19,7 @@
 controls { /* empty */ };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
@@ -27,7 +27,7 @@ options {
        allow-query { 10.53.0.1; };
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 zone "." {
        type hint;
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named06.conf
rename to bin/tests/system/allow_query/ns2/named06.conf.in
index 4af7dda30b94f9939c862aa5ec2cbd81a7e71e64..370e24e70a70d30a546802d31de90a2197adbeb5 100644 (file)
@@ -19,7 +19,7 @@
 controls { /* empty */ };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
@@ -27,7 +27,7 @@ options {
        allow-query {! 10.53.0.2; };
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 zone "." {
        type hint;
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named07.conf
rename to bin/tests/system/allow_query/ns2/named07.conf.in
index 7438b632101a1aacd5fb62839e57774b7ee5b4f7..54abd42b7a0b8918a0e15283a20a966a2fa0e895 100644 (file)
@@ -21,7 +21,7 @@ controls { /* empty */ };
 acl accept { 10.53.0.2; };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
@@ -29,7 +29,7 @@ options {
        allow-query { accept; };
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 zone "." {
        type hint;
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named08.conf
rename to bin/tests/system/allow_query/ns2/named08.conf.in
index 16ab1c8ba1d27afa66143fde0dced02a4f80a33f..74872a02d2d419c8266958ead5111511700012bb 100644 (file)
@@ -21,7 +21,7 @@ controls { /* empty */ };
 acl accept { 10.53.0.1; };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
@@ -29,7 +29,7 @@ options {
        allow-query { accept; };
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 zone "." {
        type hint;
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named09.conf
rename to bin/tests/system/allow_query/ns2/named09.conf.in
index 468baee5bd2aef5a29430875e077dbfdaaf648d2..99241c933af1b4b800dcd74afdd6dc4e2c5e4dd6 100644 (file)
@@ -21,7 +21,7 @@ controls { /* empty */ };
 acl accept { 10.53.0.2; };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
@@ -29,7 +29,7 @@ options {
        allow-query {! accept; };
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 zone "." {
        type hint;
similarity index 96%
rename from bin/tests/system/allow_query/ns2/named10.conf
rename to bin/tests/system/allow_query/ns2/named10.conf.in
index 17786e6f872c9985fbb18b0f1d1e81446f2ee895..c12391b4d87caf155b7b2c4296719b6cb2a52584 100644 (file)
@@ -25,7 +25,7 @@ key one {
 };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
@@ -33,7 +33,7 @@ options {
        allow-query { key one; };
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 zone "." {
        type hint;
similarity index 96%
rename from bin/tests/system/allow_query/ns2/named11.conf
rename to bin/tests/system/allow_query/ns2/named11.conf.in
index 3d225bd9a29dc21e62610a9a5bde291d9549ab5c..326645f6fd7920bf73ff802cf0a4b6786ee16c4c 100644 (file)
@@ -31,7 +31,7 @@ key two {
 
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
@@ -39,7 +39,7 @@ options {
        allow-query { key one; };
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 zone "." {
        type hint;
similarity index 96%
rename from bin/tests/system/allow_query/ns2/named12.conf
rename to bin/tests/system/allow_query/ns2/named12.conf.in
index e5e64184c805d7c5f4bb2f9a1368915bbf3cbd29..3ac1356b93ec07e06db3084108b786bbb979c47b 100644 (file)
@@ -24,7 +24,7 @@ key one {
 };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
@@ -32,7 +32,7 @@ options {
        allow-query {! key one; };
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 zone "." {
        type hint;
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named21.conf
rename to bin/tests/system/allow_query/ns2/named21.conf.in
index 1b6a507282336d07f5a69ddd5af00c29fdb9cc48..f9325e873c53f5c3d429e05d8b0de0c4cb397342 100644 (file)
 controls { /* empty */ };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
         recursion no;
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 view "internal" {
 
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named22.conf
rename to bin/tests/system/allow_query/ns2/named22.conf.in
index 78d492d85607a4f023c684157430378cfd098a81..d02e04afef9d24c30326bb68f9b1b358a92863a2 100644 (file)
 controls { /* empty */ };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
         recursion no;
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 view "internal" {
 
@@ -42,4 +42,4 @@ view "internal" {
                file "normal.db";
        };
 
-};
\ No newline at end of file
+};
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named23.conf
rename to bin/tests/system/allow_query/ns2/named23.conf.in
index 1e85ed789d68b0ff8bfb351f41f72ab347682467..bbc5e2f16a3d887162e14fe8b93dffca0b888c62 100644 (file)
 controls { /* empty */ };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
         recursion no;
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 view "internal" {
 
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named24.conf
rename to bin/tests/system/allow_query/ns2/named24.conf.in
index 68618bdd38494ec3d82b5dfc950f1b5f54269f27..090ee2299eda9ad9da1e1a4dedd81d36039e7a07 100644 (file)
 controls { /* empty */ };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
         recursion no;
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 view "internal" {
 
@@ -41,4 +41,4 @@ view "internal" {
                type master;
                file "normal.db";
        };
-};
\ No newline at end of file
+};
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named25.conf
rename to bin/tests/system/allow_query/ns2/named25.conf.in
index 48a73df6976b1472da8a654396e0440caecf41a0..045e274071f8d73c19699ab2296112468c7cbfa9 100644 (file)
 controls { /* empty */ };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
         recursion no;
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 view "internal" {
 
@@ -41,4 +41,4 @@ view "internal" {
                type master;
                file "normal.db";
        };
-};
\ No newline at end of file
+};
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named26.conf
rename to bin/tests/system/allow_query/ns2/named26.conf.in
index ad9cd6ac1ca852aa38e365c74096e7c212e09df1..059b3d057d164c2c3cec89bb4ec1c60681a6154c 100644 (file)
 controls { /* empty */ };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
         recursion no;
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 view "internal" {
 
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named27.conf
rename to bin/tests/system/allow_query/ns2/named27.conf.in
index 4f39625978a100553c5ddbf769f6ddaa96f1e2e8..3624e281ca7a253c6b3e59402749797dbdda8d17 100644 (file)
@@ -21,14 +21,14 @@ controls { /* empty */ };
 acl accept { 10.53.0.2; };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
         recursion no;
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 view "internal" {
 
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named28.conf
rename to bin/tests/system/allow_query/ns2/named28.conf.in
index 0a33ae0a47cb44e00bf1023f3d8248affe072954..eb86143ab582ec34431fef7a4451d3350b63a159 100644 (file)
@@ -21,14 +21,14 @@ controls { /* empty */ };
 acl accept { 10.53.0.1; };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
         recursion no;
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 view "internal" {
 
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named29.conf
rename to bin/tests/system/allow_query/ns2/named29.conf.in
index d27d0f91eac2b32f4508e4dd4fdc5fc52aa64bad..27cc30e6e09bba93cd1b6957a17fb23bb94bfb1a 100644 (file)
@@ -21,14 +21,14 @@ controls { /* empty */ };
 acl accept { 10.53.0.2; };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
         recursion no;
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 view "internal" {
 
similarity index 96%
rename from bin/tests/system/allow_query/ns2/named30.conf
rename to bin/tests/system/allow_query/ns2/named30.conf.in
index 9182f21af3dbdd4b0f6789a5fbd6f12db7a98057..32cd263e6297fff8e605317fb43ab38c4e538b0f 100644 (file)
@@ -25,14 +25,14 @@ key one {
 };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
         recursion no;
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 view "internal" {
 
similarity index 96%
rename from bin/tests/system/allow_query/ns2/named31.conf
rename to bin/tests/system/allow_query/ns2/named31.conf.in
index 19efdf397e69a1f6a73031e4d799905d633bd28d..f20e03cd05ba108ca09ec9620776f68056c8a246 100644 (file)
@@ -31,7 +31,7 @@ key two {
 
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
@@ -39,7 +39,7 @@ options {
        allow-query { key one; };
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 view "internal" {
 
@@ -54,4 +54,4 @@ view "internal" {
                type master;
                file "normal.db";
        };
-};
\ No newline at end of file
+};
similarity index 96%
rename from bin/tests/system/allow_query/ns2/named32.conf
rename to bin/tests/system/allow_query/ns2/named32.conf.in
index 3c207f34225bf2c00b96ab41ca46e66ee413e987..076b71b64bc48658bc56ecf388ae4b2288caf118 100644 (file)
@@ -24,14 +24,14 @@ key one {
 };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
         recursion no;
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 view "internal" {
 
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named33.conf
rename to bin/tests/system/allow_query/ns2/named33.conf.in
index d5683e302b114c1f012a66c5c2051a5f4c51e1c1..584d687ff2162f4c175c0f6626df8cba892c046d 100644 (file)
@@ -19,7 +19,7 @@
 controls { /* empty */ };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
@@ -27,7 +27,7 @@ options {
        allow-query { none; };
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 view "internal" {
 
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named34.conf
rename to bin/tests/system/allow_query/ns2/named34.conf.in
index 177b3365786c2f9a4d2ca2854f4740d541e8f2ef..6f67f7d9bcf44b920d6c9a00bdd4fc6845e3db28 100644 (file)
@@ -19,7 +19,7 @@
 controls { /* empty */ };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
@@ -27,7 +27,7 @@ options {
        allow-query { any; };
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 view "internal" {
 
similarity index 97%
rename from bin/tests/system/allow_query/ns2/named40.conf
rename to bin/tests/system/allow_query/ns2/named40.conf.in
index cb81c79e5d474308f6304daed7c80c55b6b74357..2593927a9ca5cd401b8910786d8b98e729b53708 100644 (file)
@@ -33,14 +33,14 @@ key two {
 };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
         recursion no;
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 zone "." {
        type hint;
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named53.conf
rename to bin/tests/system/allow_query/ns2/named53.conf.in
index b5b7e9ee166c83320d66373c919a725d18afbc19..60417b532db596aa90d0db9fdf46b37e7261c6c7 100644 (file)
@@ -19,7 +19,7 @@
 controls { /* empty */ };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
@@ -27,7 +27,7 @@ options {
        allow-query { none; };
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 zone "." {
        type hint;
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named54.conf
rename to bin/tests/system/allow_query/ns2/named54.conf.in
index 4a3b95fd304a151dc1980e8b53d6659c6dbe7937..a0fe0da10aa50f9f59bdde9b18466f9e8e9eb67f 100644 (file)
@@ -19,7 +19,7 @@
 controls { /* empty */ };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
@@ -27,7 +27,7 @@ options {
        allow-query { any; };
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 zone "." {
        type hint;
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named55.conf
rename to bin/tests/system/allow_query/ns2/named55.conf.in
index a79f12768971af970c66bf21e7a81c205bffc584..fbd6135bf5bab3263931fd01b6011b2b46ad1d8c 100644 (file)
 controls { /* empty */ };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
         recursion no;
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 view "internal" {
 
similarity index 95%
rename from bin/tests/system/allow_query/ns2/named56.conf
rename to bin/tests/system/allow_query/ns2/named56.conf.in
index 20bb98fec4c4f2fcdacbb60d3998b9c6de154a6c..a513b618e24b328ab735adb1495813c200dcbfa6 100644 (file)
 controls { /* empty */ };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
         recursion no;
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 view "internal" {
 
similarity index 96%
rename from bin/tests/system/allow_query/ns2/named57.conf
rename to bin/tests/system/allow_query/ns2/named57.conf.in
index 881e6a711bc88910cd067ddc75b09abbc8550452..d509e6c6e1eefa44e107e0da1dd6c31e1ead12fe 100644 (file)
 controls { /* empty */ };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
        recursion no;
 };
 
-include "../../common/controls.conf";
+include "controls.conf";
 
 view "internal" {
        allow-query-on { any; };
index 00ae75f69b097ee554f04fe2d429dfc11bb4658f..7a2b4dbb7a6bf5eef3d25850583a8e620f505730 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -e
 #
 # Copyright (C) 2010, 2012  Internet Systems Consortium, Inc. ("ISC")
 #
@@ -16,4 +16,8 @@
 
 # $Id: setup.sh,v 1.2 2010/11/16 01:37:36 sar Exp $
 
-cp -f ns2/named01.conf ns2/named.conf
+. ../getopts.sh
+
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ../common/controls.conf.in > ns2/controls.conf
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named01.conf.in > ns2/named.conf
+echo "${port}" > ns2/named.port
index be51397554aaae60ae01063365403606e901ddd0..9447990fdb8d559a0bfb4463828fd466d6e7ca34 100644 (file)
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
-DIGOPTS="+tcp +nosea +nostat +nocmd +norec +noques +noauth +noadd +nostats +dnssec -p 5300"
+. ../getopts.sh
+
+DIGOPTS="+tcp +nosea +nostat +nocmd +norec +noques +noauth +noadd +nostats +dnssec -p ${port}"
+RNDCCMD="$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p ${controlport}"
 status=0
 n=0
 
@@ -76,8 +79,8 @@ status=`expr $status + $ret`
 
 # Test 2 - explicit any, query allowed
 n=`expr $n + 1`
-cp -f ns2/named02.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named02.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: explicit any - query allowed"
@@ -90,8 +93,8 @@ status=`expr $status + $ret`
 
 # Test 3 - none, query refused
 n=`expr $n + 1`
-cp -f ns2/named03.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named03.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: none - query refused"
@@ -104,8 +107,8 @@ status=`expr $status + $ret`
 
 # Test 4 - address allowed, query allowed
 n=`expr $n + 1`
-cp -f ns2/named04.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named04.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: address allowed - query allowed"
@@ -118,8 +121,8 @@ status=`expr $status + $ret`
 
 # Test 5 - address not allowed, query refused
 n=`expr $n + 1`
-cp -f ns2/named05.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named05.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: address not allowed - query refused"
@@ -132,8 +135,8 @@ status=`expr $status + $ret`
 
 # Test 6 - address disallowed, query refused
 n=`expr $n + 1`
-cp -f ns2/named06.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named06.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: address disallowed - query refused"
@@ -146,8 +149,8 @@ status=`expr $status + $ret`
 
 # Test 7 - acl allowed, query allowed
 n=`expr $n + 1`
-cp -f ns2/named07.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named07.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: acl allowed - query allowed"
@@ -160,8 +163,8 @@ status=`expr $status + $ret`
 
 # Test 8 - acl not allowed, query refused
 n=`expr $n + 1`
-cp -f ns2/named08.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named08.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: acl not allowed - query refused"
@@ -175,8 +178,8 @@ status=`expr $status + $ret`
 
 # Test 9 - acl disallowed, query refused
 n=`expr $n + 1`
-cp -f ns2/named09.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named09.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: acl disallowed - query refused"
@@ -189,8 +192,8 @@ status=`expr $status + $ret`
 
 # Test 10 - key allowed, query allowed
 n=`expr $n + 1`
-cp -f ns2/named10.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named10.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: key allowed - query allowed"
@@ -203,8 +206,8 @@ status=`expr $status + $ret`
 
 # Test 11 - key not allowed, query refused
 n=`expr $n + 1`
-cp -f ns2/named11.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named11.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: key not allowed - query refused"
@@ -217,8 +220,8 @@ status=`expr $status + $ret`
 
 # Test 12 - key disallowed, query refused
 n=`expr $n + 1`
-cp -f ns2/named12.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named12.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: key disallowed - query refused"
@@ -234,8 +237,8 @@ status=`expr $status + $ret`
 n=20
 # Test 21 - views default, query allowed
 n=`expr $n + 1`
-cp -f ns2/named21.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named21.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: views default - query allowed"
@@ -248,8 +251,8 @@ status=`expr $status + $ret`
 
 # Test 22 - views explicit any, query allowed
 n=`expr $n + 1`
-cp -f ns2/named22.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named22.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: views explicit any - query allowed"
@@ -262,8 +265,8 @@ status=`expr $status + $ret`
 
 # Test 23 - views none, query refused
 n=`expr $n + 1`
-cp -f ns2/named23.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named23.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: views none - query refused"
@@ -276,8 +279,8 @@ status=`expr $status + $ret`
 
 # Test 24 - views address allowed, query allowed
 n=`expr $n + 1`
-cp -f ns2/named24.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named24.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: views address allowed - query allowed"
@@ -290,8 +293,8 @@ status=`expr $status + $ret`
 
 # Test 25 - views address not allowed, query refused
 n=`expr $n + 1`
-cp -f ns2/named25.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named25.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: views address not allowed - query refused"
@@ -304,8 +307,8 @@ status=`expr $status + $ret`
 
 # Test 26 - views address disallowed, query refused
 n=`expr $n + 1`
-cp -f ns2/named26.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named26.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: views address disallowed - query refused"
@@ -318,8 +321,8 @@ status=`expr $status + $ret`
 
 # Test 27 - views acl allowed, query allowed
 n=`expr $n + 1`
-cp -f ns2/named27.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named27.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: views acl allowed - query allowed"
@@ -332,8 +335,8 @@ status=`expr $status + $ret`
 
 # Test 28 - views acl not allowed, query refused
 n=`expr $n + 1`
-cp -f ns2/named28.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named28.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: views acl not allowed - query refused"
@@ -346,8 +349,8 @@ status=`expr $status + $ret`
 
 # Test 29 - views acl disallowed, query refused
 n=`expr $n + 1`
-cp -f ns2/named29.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named29.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: views acl disallowed - query refused"
@@ -360,8 +363,8 @@ status=`expr $status + $ret`
 
 # Test 30 - views key allowed, query allowed
 n=`expr $n + 1`
-cp -f ns2/named30.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named30.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: views key allowed - query allowed"
@@ -374,8 +377,8 @@ status=`expr $status + $ret`
 
 # Test 31 - views key not allowed, query refused
 n=`expr $n + 1`
-cp -f ns2/named31.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named31.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: views key not allowed - query refused"
@@ -388,8 +391,8 @@ status=`expr $status + $ret`
 
 # Test 32 - views key disallowed, query refused
 n=`expr $n + 1`
-cp -f ns2/named32.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named32.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: views key disallowed - query refused"
@@ -402,8 +405,8 @@ status=`expr $status + $ret`
 
 # Test 33 - views over options, views allow, query allowed
 n=`expr $n + 1`
-cp -f ns2/named33.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named33.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: views over options, views allow - query allowed"
@@ -416,8 +419,8 @@ status=`expr $status + $ret`
 
 # Test 34 - views over options, views disallow, query refused
 n=`expr $n + 1`
-cp -f ns2/named34.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named34.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: views over options, views disallow - query refused"
@@ -434,8 +437,8 @@ n=40
 
 # Test 41 - zone default, query allowed
 n=`expr $n + 1`
-cp -f ns2/named40.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named40.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: zone default - query allowed"
@@ -558,8 +561,8 @@ status=`expr $status + $ret`
 
 # Test 53 - zones over options, zones allow, query allowed
 n=`expr $n + 1`
-cp -f ns2/named53.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named53.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: views over options, views allow - query allowed"
@@ -572,8 +575,8 @@ status=`expr $status + $ret`
 
 # Test 54 - zones over options, zones disallow, query refused
 n=`expr $n + 1`
-cp -f ns2/named54.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named54.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: views over options, views disallow - query refused"
@@ -586,8 +589,8 @@ status=`expr $status + $ret`
 
 # Test 55 - zones over views, zones allow, query allowed
 n=`expr $n + 1`
-cp -f ns2/named55.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named55.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: zones over views, views allow - query allowed"
@@ -600,8 +603,8 @@ status=`expr $status + $ret`
 
 # Test 56 - zones over views, zones disallow, query refused
 n=`expr $n + 1`
-cp -f ns2/named56.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named56.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: zones over views, views disallow - query refused"
@@ -614,8 +617,8 @@ status=`expr $status + $ret`
 
 # Test 57 - zones over views, zones disallow, query refused (allow-query-on)
 n=`expr $n + 1`
-cp -f ns2/named57.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named57.conf.in > ns2/named.conf
+$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
 sleep 5
 
 echo "I:test $n: zones over views, allow-query-on"