From ecf4a93a481efb4dc1a2e867440b80a866446d3d Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 4 Aug 2019 01:53:07 +1000 Subject: start-sim wait for the [RegionReady]: INITIALIZATION COMPLETE FOR message. --- scripts/start-sim | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/start-sim b/scripts/start-sim index 3966ac8..330b16b 100755 --- a/scripts/start-sim +++ b/scripts/start-sim @@ -12,6 +12,7 @@ tmux_send="${tmux_command} send-keys -t ${tmux_session}" bindir="${PRGDIR}/../bin" date=$(date '+%F_%T') quiet="" +waiting="" inventory="" function wait_for_text() @@ -36,6 +37,12 @@ then shift 1 fi +if [ "$1" = "-w" ] +then + waiting="true" + shift 1 +fi + if [ "x$1" = "x" ]; then tgt=$(basename $(pwd)) num="$(echo ${tgt} | cut -c 4-)" @@ -105,7 +112,11 @@ case $(basename $0) in fi fi - ${tmux_send}:"${title}" Enter Enter Enter + if [ ! "x$waiting" = "x" ] + then + wait_for_text "${title}" "[RegionReady]: INITIALIZATION COMPLETE FOR ${title}" + fi + ;; "backup-inventory") -- cgit v1.1