aboutsummaryrefslogtreecommitdiff
path: root/contrib/gnunet-gns-import.sh
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-10 23:23:12 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-10 23:23:12 +0000
commitc9c2a2e547a50357ef1db49e0de9fb8d5b07c231 (patch)
tree496d548b862cd92e8410847ed447f7627ef65365 /contrib/gnunet-gns-import.sh
parent472e134ca8d527c92535a5221b69faea6af00579 (diff)
downloadgnunet-c9c2a2e547a50357ef1db49e0de9fb8d5b07c231.tar.gz
gnunet-c9c2a2e547a50357ef1db49e0de9fb8d5b07c231.zip
-anonymous contribution: patch to add -c support to gnunet-gns-import.sh
Diffstat (limited to 'contrib/gnunet-gns-import.sh')
-rwxr-xr-xcontrib/gnunet-gns-import.sh48
1 files changed, 33 insertions, 15 deletions
diff --git a/contrib/gnunet-gns-import.sh b/contrib/gnunet-gns-import.sh
index 21156bc52..dacdf7887 100755
--- a/contrib/gnunet-gns-import.sh
+++ b/contrib/gnunet-gns-import.sh
@@ -1,30 +1,48 @@
1#!/bin/sh 1#!/bin/sh
2# This shell-script will import some GNS authorities into your GNS 2# This shell-script will import some GNS authorities into your GNS
3# namestore. 3# namestore.
4# 4
5options=''
6
7while getopts "c:" opt; do
8 case $opt in
9 c)
10 options+="-c $OPTARG"
11 ;;
12 \?)
13 echo "Invalid option: -$OPTARG" >&2
14 exit 1
15 ;;
16 :)
17 echo "Option -$OPTARG requires an argument." >&2
18 exit 1
19 ;;
20 esac
21done
22
5# By default, we create three GNS zones: 23# By default, we create three GNS zones:
6gnunet-identity -C master-zone 24gnunet-identity -C master-zone $options
7gnunet-identity -C short-zone 25gnunet-identity -C short-zone $options
8gnunet-identity -C private-zone 26gnunet-identity -C private-zone $options
9 27
10# Additionally, we create the FS SKS zone 28# Additionally, we create the FS SKS zone
11gnunet-identity -C sks-zone 29gnunet-identity -C sks-zone $options
12 30
13# Integrate those with the respective subsystems. 31# Integrate those with the respective subsystems.
14gnunet-identity -e short-zone -s gns-short 32gnunet-identity -e short-zone -s gns-short $options
15gnunet-identity -e master-zone -s gns-master 33gnunet-identity -e master-zone -s gns-master $options
16gnunet-identity -e private-zone -s gns-private 34gnunet-identity -e private-zone -s gns-private $options
17gnunet-identity -e sks-zone -s fs-sks 35gnunet-identity -e sks-zone -s fs-sks $options
18 36
19# Get the public keys as strings (so we can create PKEY records) 37# Get the public keys as strings (so we can create PKEY records)
20MASTER=`gnunet-identity -d | grep master-zone | awk '{print $3}'` 38MASTER=`gnunet-identity -d $options | grep master-zone | awk '{print $3}'`
21SHORT=`gnunet-identity -d | grep short-zone | awk '{print $3}'` 39SHORT=`gnunet-identity -d $options | grep short-zone | awk '{print $3}'`
22PRIVATE=`gnunet-identity -d | grep private-zone | awk '{print $3}'` 40PRIVATE=`gnunet-identity -d $options | grep private-zone | awk '{print $3}'`
23 41
24# Link short and private zones into master zone 42# Link short and private zones into master zone
25gnunet-namestore -z master-zone -a -e never -n private -p -t PKEY -V $PRIVATE 43gnunet-namestore -z master-zone -a -e never -n private -p -t PKEY -V $PRIVATE $options
26gnunet-namestore -z master-zone -a -e never -n short -p -t PKEY -V $SHORT 44gnunet-namestore -z master-zone -a -e never -n short -p -t PKEY -V $SHORT $options
27 45
28# Link GNUnet's FCFS zone into master zone under label "pin" 46# Link GNUnet's FCFS zone into master zone under label "pin"
29gnunet-namestore -z master-zone -a -e never -n pin -p -t PKEY -V 72QC35CO20UJN1E91KPJFNT9TG4CLKAPB4VK9S3Q758S9MLBRKOG 47gnunet-namestore -z master-zone -a -e never -n pin -p -t PKEY -V 72QC35CO20UJN1E91KPJFNT9TG4CLKAPB4VK9S3Q758S9MLBRKOG $options
30 48