1#!/bin/sh
2
3# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
4#
5# SPDX-License-Identifier: MPL-2.0
6#
7# This Source Code Form is subject to the terms of the Mozilla Public
8# License, v. 2.0.  If a copy of the MPL was not distributed with this
9# file, you can obtain one at https://mozilla.org/MPL/2.0/.
10#
11# See the COPYRIGHT file distributed with this work for additional
12# information regarding copyright ownership.
13
14. ../conf.sh
15
16$SHELL clean.sh
17
18copy_setports ns1/named.conf.in ns1/named.conf
19copy_setports ns2/named.conf.in ns2/named.conf
20
21$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 1 >ns1/primary.db
22$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 1 >ns1/duplicate.db
23cp bigserial.db ns1/
24cd ns1
25touch primary.db.signed
26echo '$INCLUDE "primary.db.signed"' >>primary.db
27$KEYGEN -a ${DEFAULT_ALGORITHM} -q primary.example >/dev/null 2>&1
28$KEYGEN -a ${DEFAULT_ALGORITHM} -qfk primary.example >/dev/null 2>&1
29$SIGNER -SD -o primary.example primary.db >/dev/null \
30  2>signer.err || cat signer.err
31echo '$INCLUDE "soa.db"' >reload.db
32echo '@ 0 NS .' >>reload.db
33echo '@ 0 SOA . . 1 0 0 0 0' >soa.db
34