16 original_image="${1#--original-image=}"
23 image_prefix="${1#--image-prefix=}"
40 echo "Usage: $0 [options] --original-image=<name> <host1> [<host2> [...]] -- <rbd-replay-args>"
42 echo " --original-image=name Name (and snap) of the image that was originally traced"
43 echo " --image-prefix=prefix Prefix of the image names to replay against"
44 echo " --exec=program Path to the rbd-replay executable"
45 echo " --delay=seconds Wait <seconds> between starting each replay"
49 # remaining args are passed directly to rbd-replay
54 echo "Unrecognized argument: $1" >&2
55 echo "(If you want to pass an argument directly to rbd-replay, use it after '--'.)" >&2
65 if test -z "$original_image"; then
66 echo "Specify the original image name with --original-image." >&2
70 if test -z "$hosts"; then
71 echo "No hosts specified." >&2
75 if test -z "$image_prefix"; then
76 image_prefix="$original_image"
80 for host in $hosts; do
81 echo ssh $host "'$prog'" --map-image "'${original_image}=${image_prefix}-${index}'" "$@"
82 ssh $host "'$prog'" --map-image "'${original_image}=${image_prefix}-${index}'" "$@" &
84 if [ $delay -gt 0 ]; then