summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-07-09 14:37:00 -0300
committerSilvio Rhatto <rhatto@riseup.net>2012-07-09 14:37:00 -0300
commit70602b414634c0827eb809509e72530175ec5cbc (patch)
tree002cdbce8f844dc0a7231f53de8ad7b6c647747f
parent32920d1e4ed2d79d1fe3618ed7cdc54fa568634e (diff)
downloadhydra-70602b414634c0827eb809509e72530175ec5cbc.tar.gz
hydra-70602b414634c0827eb809509e72530175ec5cbc.tar.bz2
Using temp file for newkeys
-rwxr-xr-xshare/hydra/newkeys10
1 files changed, 8 insertions, 2 deletions
diff --git a/share/hydra/newkeys b/share/hydra/newkeys
index d742fd9..f6a606f 100755
--- a/share/hydra/newkeys
+++ b/share/hydra/newkeys
@@ -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) )