Skip to content

Instantly share code, notes, and snippets.

Created February 21, 2014 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/9131673 to your computer and use it in GitHub Desktop.
Save anonymous/9131673 to your computer and use it in GitHub Desktop.
diff --git a/src/datastore_mad/remotes/ceph/cp b/src/datastore_mad/remotes/ceph/cp
index 505ce23..d4db533 100755
--- a/src/datastore_mad/remotes/ceph/cp
+++ b/src/datastore_mad/remotes/ceph/cp
@@ -141,7 +141,11 @@ REGISTER_CMD=$(cat <<EOF
EOF
)
-ssh_exec_and_log "$DST_HOST" "$REGISTER_CMD" \
- "Error registering $RBD_SOURCE in $DST_HOST"
+if [ "$DST_HOST" = `hostname` ]; then
+ exec_and_log "$REGISTER_CMD" "Error registering $RBD_SOURCE in $DST_HOST"
+else
+ ssh_exec_and_log "$DST_HOST" "$REGISTER_CMD" \
+ "Error registering $RBD_SOURCE in $DST_HOST"
+fi
echo "$RBD_SOURCE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment