1#!/bin/sh -e 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# shellcheck source=conf.sh 15. ../../conf.sh 16 17set -e 18 19zone=. 20infile=root.db.in 21zonefile=root.db 22 23echo_i "ns1/setup.sh" 24 25cp "../ns2/dsset-checkds." . 26 27ksk=$("$KEYGEN" -q -fk -a "$DEFAULT_ALGORITHM" -b "$DEFAULT_BITS" -n zone "$zone") 28zsk=$("$KEYGEN" -q -a "$DEFAULT_ALGORITHM" -b "$DEFAULT_BITS" -n zone "$zone") 29cp "$ksk.key" "../ns10/" 30cp "$zsk.key" "../ns10/" 31cp "$ksk.private" "../ns10/" 32cp "$zsk.private" "../ns10/" 33 34cat "$infile" "$ksk.key" "$zsk.key" >"$zonefile" 35"$SIGNER" -g -o "$zone" "$zonefile" >/dev/null 2>&1 36 37( 38 cd ../ns10 39 cat "$infile" "$ksk.key" "$zsk.key" >"$zonefile" 40 "$SIGNER" -g -o "$zone" "$zonefile" >/dev/null 2>&1 41) 42 43# Configure the resolving server with a static key. 44keyfile_to_static_ds "$ksk" >trusted.conf 45cp trusted.conf ../ns3/trusted.conf 46cp trusted.conf ../ns8/trusted.conf 47