]> gitweb.fluxo.info Git - hydra.git/commitdiff
Use hydra_get_fqdn_from_nodename on import-keys
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 12 May 2016 20:40:34 +0000 (17:40 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 12 May 2016 20:40:34 +0000 (17:40 -0300)
share/hydra/import-keys

index b180d2846bb1f940ccefce64d990f23c5d3db33c..dc9d57546016b17b725ce8eb2baf70cf6e82b7f3 100755 (executable)
@@ -30,7 +30,7 @@ function hydra_import_keys_openpgp {
     continue
   fi
 
-  $HYDRA_CONNECT $node <<EOF
+  $HYDRA_CONNECT $hostname <<EOF
   ##### BEGIN REMOTE SCRIPT #####
   echo ""
   echo "-----------------------------"
@@ -71,7 +71,7 @@ for node in $NODES; do
   if [ ! -z "$HOST" ]; then
     hostname="$HOST"
   else
-    hostname="`echo $node | cut -d . -f 1`"
+    hostname="`hydra_get_fqdn_from_nodename $node`"
   fi
 
   # Import OpenPGP keypair