1#!/bin/sh 2# 3# Copyright (C) 2004, 2007, 2011, 2012, 2014 Internet Systems Consortium, Inc. ("ISC") 4# Copyright (C) 2000, 2001 Internet Software Consortium. 5# 6# Permission to use, copy, modify, and/or distribute this software for any 7# purpose with or without fee is hereby granted, provided that the above 8# copyright notice and this permission notice appear in all copies. 9# 10# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 11# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 12# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 13# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 14# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 15# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16# PERFORMANCE OF THIS SOFTWARE. 17 18SYSTEMTESTTOP=.. 19. $SYSTEMTESTTOP/conf.sh 20 21cp -f ns1/example1.db ns1/example.db 22rm -f ns1/example.db.jnl ns2/example.bk ns2/example.bk.jnl 23rm -f ns1/example2.db.jnl ns2/example2.bk ns2/example2.bk.jnl 24cp -f ns3/nomaster.db ns3/nomaster1.db 25rm -f Ksig0.example2.* 26 27# 28# SIG(0) required cryptographic support which may not be configured. 29# 30test -r $RANDFILE || $GENRANDOM 400 $RANDFILE 31keyname=`$KEYGEN -q -r $RANDFILE -n HOST -a RSASHA1 -b 1024 -T KEY sig0.example2 2>/dev/null` 32if test -n "$keyname" 33then 34 cat ns1/example1.db $keyname.key > ns1/example2.db 35 echo $keyname > keyname 36else 37 cat ns1/example1.db > ns1/example2.db 38 rm -f keyname 39fi 40