diff options
-rwxr-xr-x | share/hydra/newkeys | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/share/hydra/newkeys b/share/hydra/newkeys index 37e76e8..3fe782f 100755 --- a/share/hydra/newkeys +++ b/share/hydra/newkeys @@ -19,7 +19,13 @@ function hydra_newkeys { # Generates ssh and gpg keys for new or existing nodes # GPG keys should be manually imported in the nodes - for host in `hydra $HYDRA nodes`; do + if [ ! -z "$1" ]; then + NODES="$*" + else + NODES="`hydra $HYDRA nodes`" + fi + + for host in $NODES; do node="`echo $host | cut -d . -f 1`" sshkey="$HYDRA_FOLDER/keyring/keys/nodes/$node/ssh/id_rsa.asc" gpgkey="$HYDRA_FOLDER/keyring/keys/nodes/$node/gpg/key.asc" |