diff options
author | 2016-09-13 11:40:12 +0800 | |
---|---|---|
committer | 2016-09-13 11:41:53 +0800 | |
commit | b731e2f1dd0972409b136aebc7b463dd72c9cfad (patch) | |
tree | 5107d7d80c19ad8076c2c97c2b5ef8d1cf3ab903 /framework/src/onos/tools/test/bin/onos-uninstall | |
parent | ee93993458266114c29271a481ef9ce7ce621b2a (diff) |
ONOSFW-171
O/S-SFC-ONOS scenario documentation
Change-Id: I51ae1cf736ea24ab6680f8edca1b2bf5dd598365
Signed-off-by: CNlucius <lukai1@huawei.com>
Diffstat (limited to 'framework/src/onos/tools/test/bin/onos-uninstall')
-rwxr-xr-x | framework/src/onos/tools/test/bin/onos-uninstall | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/framework/src/onos/tools/test/bin/onos-uninstall b/framework/src/onos/tools/test/bin/onos-uninstall deleted file mode 100755 index ff8ff536..00000000 --- a/framework/src/onos/tools/test/bin/onos-uninstall +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# ----------------------------------------------------------------------------- -# Remotely stops & uninstalls ONOS on the specified node. -# ----------------------------------------------------------------------------- - -function _usage () { -cat << _EOF_ -usage: - $(basename $0) [node] - -options: -- [node] : The remote instance to uninstall ONOS from. - -summary: - Remotely stops and uninstalls ONOS on the specified node. - - If [node] isn't specified, \$OCI becomes the target. - -_EOF_ -} - -[ "$1" = "-h" ] && _usage && exit 0 - -[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 -. $ONOS_ROOT/tools/build/envDefaults - -remote=$ONOS_USER@${1:-$OCI} - -ssh $remote " - sudo stop onos 1>/dev/null 2>/dev/null - - # Wait for onos to stop up to 5 seconds - for i in \$(seq 1 5); do - [ -z \"\$(ps -ef | grep karaf.jar | grep -v grep)\" ] && break - sleep 1 - done - [ -z \"\$(ps -ef | grep karaf.jar | grep -v grep)\" ] || \ - (echo 'ONOS failed to stop.'; status=1) - - # Remove onos directory and init file - [ -d $ONOS_INSTALL_DIR ] && sudo rm -fr $ONOS_INSTALL_DIR - [ -f /etc/init/onos.conf ] && sudo rm -f /etc/init/onos.conf - - exit \${status:-0}; -" |