Updating onos-uninstall
- Wait for the onos process to die - Remove /etc/init/onos.conf Change-Id: I7e81adc6f94eca638fd46c0d503cfc1e843b4c0b
Showing
1 changed file
with
10 additions
and
0 deletions
... | @@ -10,5 +10,15 @@ remote=$ONOS_USER@${1:-$OCI} | ... | @@ -10,5 +10,15 @@ remote=$ONOS_USER@${1:-$OCI} |
10 | 10 | ||
11 | ssh $remote " | 11 | ssh $remote " |
12 | sudo stop onos 1>/dev/null 2>/dev/null | 12 | sudo stop onos 1>/dev/null 2>/dev/null |
13 | + | ||
14 | + # Wait for onos to stop up to 5 seconds | ||
15 | + for i in \$(seq 1 5); do | ||
16 | + [ -z \"\$(ps -ef | grep karaf.jar | grep -v grep)\" ] && break | ||
17 | + sleep 1 | ||
18 | + done | ||
19 | + [ -z \"\$(ps -ef | grep karaf.jar | grep -v grep)\" ] || echo 'ONOS failed to stop.' | ||
20 | + | ||
21 | + # Remove onos directory and init file | ||
13 | sudo rm -fr $ONOS_INSTALL_DIR | 22 | sudo rm -fr $ONOS_INSTALL_DIR |
23 | + [ -f /etc/init/onos.conf ] && sudo rm /etc/init/onos.conf | ||
14 | " | 24 | " | ... | ... |
-
Please register or login to post a comment