]> gitweb.fluxo.info Git - hydra.git/commitdiff
Using temp file for newkeys
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 9 Jul 2012 17:37:00 +0000 (14:37 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 9 Jul 2012 17:37:00 +0000 (14:37 -0300)
share/hydra/newkeys

index d742fd949274abfaa953860f7deca89c64101996..f6a606f0a683640038bd6a35b5ea3e2ef9a25fe3 100755 (executable)
@@ -34,8 +34,14 @@ function hydra_newkeys {
 function hydra_genpairs {
   keyringer $HYDRA genpair ssh $node/ssh/id_rsa $host $privkey
   keyringer $HYDRA genpair gpg $node/gpg/key    $host
-  keyringer $HYDRA git     commit # TODO: -m "Importing keys from $host"
-  keyringer $HYDRA git     push
+
+  hydra_set_tmpfile genpair
+  echo "Importing keys from $host" > $TMPWORK
+
+  keyringer $HYDRA git commit -F $TMPWORK
+  keyringer $HYDRA git push
+
+  hydra_unset_tmpfile $TMPWORK
 
   # Add key into puppet git repository.
   ( cd $PUPPET_KEYS && git add $(basename $privkey) $(basename $pubkey) )