From 3b9b6d0b8e7f798023c9d109c490449d528fde80 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 17:59:48 +0200 Subject: Adding upstream version 1:9.18.19. Signed-off-by: Daniel Baumann --- bin/tests/system/rpz/clean.sh | 57 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 bin/tests/system/rpz/clean.sh (limited to 'bin/tests/system/rpz/clean.sh') diff --git a/bin/tests/system/rpz/clean.sh b/bin/tests/system/rpz/clean.sh new file mode 100644 index 0000000..35d6211 --- /dev/null +++ b/bin/tests/system/rpz/clean.sh @@ -0,0 +1,57 @@ +#!/bin/sh + +# Copyright (C) Internet Systems Consortium, Inc. ("ISC") +# +# SPDX-License-Identifier: MPL-2.0 +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, you can obtain one at https://mozilla.org/MPL/2.0/. +# +# See the COPYRIGHT file distributed with this work for additional +# information regarding copyright ownership. + +# Clean up after rpz tests. + +USAGE="$0: [-Px]" +DEBUG= +while getopts "Px" c; do + case $c in + x) set -x ;; + P) PARTIAL=set ;; + *) echo "$USAGE" 1>&2; exit 1;; + esac +done +shift $((OPTIND - 1)) +if test "$#" -ne 0; then + echo "$USAGE" 1>&2 + exit 1 +fi + +# this might be called from setup.sh to partially clean up the files +# from the first test pass so the second pass can be set up correctly. +# remove those files first, then decide whether to remove the others. +rm -f ns*/*.key ns*/*.private +rm -f ns2/tld2s.db */bl.tld2.db */bl.tld2s.db +rm -f ns3/bl*.db ns3/fast-expire.db ns*/empty.db +rm -f ns3/manual-update-rpz.db +rm -f ns3/mixed-case-rpz.db +rm -f ns5/example.db ns5/bl.db ns5/fast-expire.db ns5/expire.conf +rm -f ns8/manual-update-rpz.db +rm -f */policy2.db +rm -f */*.jnl + +if [ ${PARTIAL:-unset} = unset ]; then + rm -f proto.* dsset-* trusted.conf dig.out* nsupdate.tmp ns*/*tmp + rm -f ns5/requests ns5/*.perf + rm -f */named.memstats */*.run */*.run.prev */named.stats */session.key + rm -f */*.log */*core */*.pid + rm -f ns*/named.lock + rm -f ns*/named.conf + rm -f ns*/*switch + rm -f dnsrps*.conf + rm -f dnsrpzd.conf + rm -f dnsrpzd-license-cur.conf dnsrpzd.rpzf dnsrpzd.sock dnsrpzd.pid + rm -f ns*/managed-keys.bind* + rm -f tmp +fi -- cgit v1.2.3