2 # This shell-script will import some GNS authorities into your GNS
7 while getopts "c:" opt; do
13 echo "Invalid option: -$OPTARG" >&2
17 echo "Option -$OPTARG requires an argument." >&2
23 # By default, we create three GNS zones:
24 gnunet-identity -C master-zone $options
25 gnunet-identity -C short-zone $options
26 gnunet-identity -C private-zone $options
28 # Additionally, we create the FS SKS zone
29 gnunet-identity -C sks-zone $options
31 # Integrate those with the respective subsystems.
32 gnunet-identity -e short-zone -s gns-short $options
33 gnunet-identity -e master-zone -s gns-master $options
34 gnunet-identity -e master-zone -s gns-proxy $options
35 gnunet-identity -e private-zone -s gns-private $options
36 gnunet-identity -e sks-zone -s fs-sks $options
38 # Get the public keys as strings (so we can create PKEY records)
39 MASTER=`gnunet-identity -d $options | grep master-zone | awk '{print $3}'`
40 SHORT=`gnunet-identity -d $options | grep short-zone | awk '{print $3}'`
41 PRIVATE=`gnunet-identity -d $options | grep private-zone | awk '{print $3}'`
43 # Link short and private zones into master zone
44 gnunet-namestore -z master-zone -a -e never -n private -p -t PKEY -V $PRIVATE $options
45 gnunet-namestore -z master-zone -a -e never -n short -p -t PKEY -V $SHORT $options
47 # Link GNUnet's FCFS zone into master zone under label "pin"
48 gnunet-namestore -z master-zone -a -e never -n pin -p -t PKEY -V 72QC35CO20UJN1E91KPJFNT9TG4CLKAPB4VK9S3Q758S9MLBRKOG $options