#!/bin/bash

source common-functions.sh

init_out qemu-ns3-nopaxos
run_corundum_bm c0
run_corundum_bm r0
run_corundum_bm r1
run_corundum_bm r2
sleep 0.5
run_ns3_sequencer nopaxos "c0" "r0 r1 r2"
sleep 5
run_qemu r0 r0 build/qemu-nopaxos-replica-0.tar
run_qemu r1 r1 build/qemu-nopaxos-replica-1.tar
run_qemu r2 r2 build/qemu-nopaxos-replica-2.tar
#run_qemu c0 c0 build/qemu-nopaxos-client.tar
client_pid=$!
wait $client_pid
cleanup
