key_setup.sh
diff --git a/key_setup.sh b/key_setup.sh
index 46f5d4c..65a653a 100755
--- a/key_setup.sh
+++ b/key_setup.sh
@@ -6,7 +6,7 @@
if [ $# -ne $EXPECTED_ARGS ]
then
echo "Usage: `basename $0` <site name> <operator name> <router name>"
- echo "Example: `basename $0` memphis.edu user1 cs/rtr1"
+ echo "Example: `basename $0` memphis.edu user1 memphis.edu/cs/rtr1 (full router name without /ndn/ prefix"
exit $E_BADARGS
fi
@@ -19,7 +19,8 @@
fi
-KSUITE=/home/"$(whoami)"/ndn-testbed-key-suite/bin
+KSUITE=${HOME}ndn-testbed-key-suite/
+echo $KSUITE
if [ ! -d ${KSUITE} ]; then
echo "This script requires key signing suite available at:"
echo "git://github.com/named-data/ndn-testbed-key-suite.git"
@@ -54,21 +55,21 @@
-$KSUITE/ndn-extract-public-key.sh -i ${SITE}_key/.ccnx/.ccnx_keystore -o ${SITE}_key/$SITE.pem
-$KSUITE/ndn-extract-public-key.sh -i ${OP}_key/.ccnx/.ccnx_keystore -o ${OP}_key/$OP.pem
-$KSUITE/ndn-extract-public-key.sh -i router_key/.ccnx/.ccnx_keystore -o router_key/router.pem
-$KSUITE/ndn-extract-public-key.sh -i nlsr_key/.ccnx/.ccnx_keystore -o nlsr_key/nlsr.pem
+$KSUITE/bin/ndn-extract-public-key.sh -i ${SITE}_key/.ccnx/.ccnx_keystore -o ${SITE}_key/$SITE.pem
+$KSUITE/bin/ndn-extract-public-key.sh -i ${OP}_key/.ccnx/.ccnx_keystore -o ${OP}_key/$OP.pem
+$KSUITE/bin/ndn-extract-public-key.sh -i router_key/.ccnx/.ccnx_keystore -o router_key/router.pem
+$KSUITE/bin/ndn-extract-public-key.sh -i nlsr_key/.ccnx/.ccnx_keystore -o nlsr_key/nlsr.pem
-./sign.sh -s
+.$KSUITE/sign.sh -s
#signing operator key
-echo "$KSUITE/ndn-publish-key.sh -i "$OP" -a "$SITE" -f ${OP}_key/$OP.pem -F ${SITE}_key/.ccnx/ -P /ndn/keys/$SITE -p /ndn/keys/$SITE/%C1.O.N.Start/$OP -x 365"
-$KSUITE/ndn-publish-key.sh -i "$OP" -a "$SITE" -f ${OP}_key/$OP.pem -F ${SITE}_key/.ccnx/ -P /ndn/keys/$SITE -p /ndn/keys/$SITE/%C1.O.N.Start/$OP -x 365
+echo "$KSUITE/bin/ndn-publish-key.sh -i "$OP" -a "$SITE" -f ${OP}_key/$OP.pem -F ${SITE}_key/.ccnx/ -P /ndn/keys/$SITE -p /ndn/keys/$SITE/%C1.O.N.Start/$OP -x 365"
+$KSUITE/bin/ndn-publish-key.sh -i "$OP" -a "$SITE" -f ${OP}_key/$OP.pem -F ${SITE}_key/.ccnx/ -P /ndn/keys/$SITE -p /ndn/keys/$SITE/%C1.O.N.Start/$OP -x 365
#signing routing key
-echo "$KSUITE/ndn-publish-key.sh -i "$RTR" -a "$SITE" -f router_key/router.pem -F ${OP}_key/.ccnx/ -P /ndn/keys/$SITE/%C1.O.N.Start/$OP -p /ndn/keys/$SITE/%C1.R.N.Start/ndn/$SITE/$RTR -x 365"
-$KSUITE/ndn-publish-key.sh -i "$RTR" -a "$SITE" -f router_key/router.pem -F ${OP}_key/.ccnx/ -P /ndn/keys/$SITE/%C1.O.N.Start/$OP -p /ndn/keys/$SITE/%C1.R.N.Start/ndn/$SITE/$RTR -x 365
+echo "$KSUITE/bin/ndn-publish-key.sh -i "$RTR" -a "$SITE" -f router_key/router.pem -F ${OP}_key/.ccnx/ -P /ndn/keys/$SITE/%C1.O.N.Start/$OP -p /ndn/keys/$SITE/%C1.R.N.Start/ndn/$RTR -x 365"
+$KSUITE/bin/ndn-publish-key.sh -i "$RTR" -a "$SITE" -f router_key/router.pem -F ${OP}_key/.ccnx/ -P /ndn/keys/$SITE/%C1.O.N.Start/$OP -p /ndn/keys/$SITE/%C1.R.N.Start/ndn/$RTR -x 365
#signing nlsr key
-echo "$KSUITE/ndn-publish-key.sh -i "NLSR" -a "$RTR" -f nlsr_key/nlsr.pem -F router_key/.ccnx/ -P /ndn/keys/$SITE/%C1.R.N.Start/ndn/$SITE/$RTR -p /ndn/keys/$SITE/%C1.R.N.Start/ndn/$SITE/$RTR/nlsr -x 365"
-$KSUITE/ndn-publish-key.sh -i "NLSR" -a "$RTR" -f nlsr_key/nlsr.pem -F router_key/.ccnx/ -P /ndn/keys/$SITE/%C1.R.N.Start/ndn/$SITE/$RTR -p /ndn/keys/$SITE/%C1.R.N.Start/ndn/$SITE/$RTR/nlsr -x 365
+echo "$KSUITE/bin/ndn-publish-key.sh -i "NLSR" -a "$RTR" -f nlsr_key/nlsr.pem -F router_key/.ccnx/ -P /ndn/keys/$SITE/%C1.R.N.Start/ndn/$SITE/$RTR -p /ndn/keys/$SITE/%C1.R.N.Start/ndn/$RTR/nlsr -x 365"
+$KSUITE/bin/ndn-publish-key.sh -i "NLSR" -a "$RTR" -f nlsr_key/nlsr.pem -F router_key/.ccnx/ -P /ndn/keys/$SITE/%C1.R.N.Start/ndn/$SITE/$RTR -p /ndn/keys/$SITE/%C1.R.N.Start/ndn/$RTR/nlsr -x 365