blob: 62cf360c26a2d7092f5ec60263259845a98b1855 [file] [log] [blame]
tom2d7acb72014-09-22 22:13:00 -07001#!/bin/bash
Pavlin Radoslavov91413792014-10-15 11:00:32 -07002# -----------------------------------------------------------------------------
tom1a2908c2014-09-23 16:37:39 -07003# Waits for ONOS to reach run-level 100 on the specified remote node.
Pavlin Radoslavov91413792014-10-15 11:00:32 -07004# -----------------------------------------------------------------------------
tom2d7acb72014-09-22 22:13:00 -07005
6[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7. $ONOS_ROOT/tools/build/envDefaults
8
9remote=$ONOS_USER@${1:-$OCI}
10
11ssh $remote "
12 # Wait until we reach the run-level 100
13 running=""
14 while [ -z \$running ]; do
15 $ONOS_INSTALL_DIR/bin/onos bundle:list 2>/dev/null | \
16 grep -q 'START LEVEL 100' && running=1 || sleep 2
17 done
18
19"