Sync usage with man page.
[netbsd-mini2440.git] / external / bsd / bind / dist / bin / tests / system / metadata / setup.sh
blob577dc966194bb90b8de2e8640bddb95d7c887913
1 #!/bin/sh -e
3 # Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
5 # Permission to use, copy, modify, and/or distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
9 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 # PERFORMANCE OF THIS SOFTWARE.
17 # Id: setup.sh,v 1.3 2009/11/30 23:48:02 tbox Exp
19 SYSTEMTESTTOP=..
20 . $SYSTEMTESTTOP/conf.sh
21 . ./clean.sh
23 RANDFILE=./random.data
25 pzone=parent.nil
26 czone=child.parent.nil
28 ../../../tools/genrandom 400 $RANDFILE
30 echo "I:generating keys"
32 # active zsk
33 zsk=`$KEYGEN -q -r $RANDFILE $czone`
34 echo $zsk > zsk.key
36 # not yet published or active
37 pending=`$KEYGEN -q -r $RANDFILE -P none -A none $czone`
38 echo $pending > pending.key
40 # published but not active
41 standby=`$KEYGEN -q -r $RANDFILE -A none $czone`
42 echo $standby > standby.key
44 # inactive
45 inact=`$KEYGEN -q -r $RANDFILE -P now-24h -A now-24h -I now $czone`
46 echo $inact > inact.key
48 # active ksk
49 ksk=`$KEYGEN -q -r $RANDFILE -fk $czone`
50 echo $ksk > ksk.key
52 # published but not YET active; will be active in 15 seconds
53 rolling=`$KEYGEN -q -r $RANDFILE -fk $czone`
54 $SETTIME -A now+15s $rolling > /dev/null
55 echo $rolling > rolling.key
57 # revoked
58 revoke1=`$KEYGEN -q -r $RANDFILE -fk $czone`
59 echo $revoke1 > prerev.key
60 revoke2=`$REVOKE $revoke1`
61 echo $revoke2 | sed -e 's#\./##' -e "s/\.key.*$//" > postrev.key
63 pzsk=`$KEYGEN -q -r $RANDFILE $pzone`
64 echo $pzsk > parent.zsk.key
66 pksk=`$KEYGEN -q -r $RANDFILE -fk $pzone`
67 echo $pksk > parent.ksk.key