]> gitweb.fluxo.info Git - hydra.git/commitdiff
Newkeys: more flexibility for single node generation
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 26 Apr 2014 22:59:47 +0000 (19:59 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 26 Apr 2014 22:59:47 +0000 (19:59 -0300)
share/hydra/newkeys

index 3f04311c077955c928e947a3ed1e13756405a848..c418f5c2f7a143797cb8582af9a7b523d2916001 100755 (executable)
@@ -26,11 +26,11 @@ function hydra_newkeys {
     if [ "$1" == "all" ]; then
       hydra_genpairs
     elif [ "$1" == "all-ssh" ]; then
-      hydra_genpairs all-ssh
+      hydra_genpairs ssh
     elif [ "$1" == "all-pgp" ]; then
-      hydra_genpairs all-pgp
+      hydra_genpairs pgp
     elif [ ! -z "$1" ]; then
-      hydra_genpairs
+      hydra_genpairs $2
       exit $?
     elif [ ! -e "$privkey" ] || [ ! -e "$pubkey" ]; then
       hydra_genpairs
@@ -41,11 +41,11 @@ function hydra_newkeys {
 function hydra_genpairs {
   BASEDIR="/tmp"
 
-  if [ "$1" != "all-pgp" ]; then
+  if [ "$1" != "pgp" ]; then
     keyringer $HYDRA genpair ssh $node/ssh/id_rsa $host $privkey
   fi
 
-  if [ "$1" != "all-ssh" ]; then
+  if [ "$1" != "ssh" ]; then
     keyringer $HYDRA genpair gpg $node/gpg/key    $host
   fi