summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRihab Banday <rihab.banday@ericsson.com>2020-08-19 07:35:35 +0000
committerGerrit Code Review <gerrit@opnfv.org>2020-08-19 07:35:35 +0000
commit90ff3b4def93e228423f515a6e98466a5cd78727 (patch)
tree4c40f26977b7252b57d2b4e8fcea67b50c475a8d
parenta0809c1a7c96820f659fd9c57b48008b76ac5b13 (diff)
parent357f4a4c278c95ecddab7fce1e69b1571cdd0bea (diff)
Merge ""Better" pattern matching for name of jump VM"
-rwxr-xr-xfunctions.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/functions.sh b/functions.sh
index fd19209..7d867cd 100755
--- a/functions.sh
+++ b/functions.sh
@@ -10,10 +10,10 @@
# Clean up
clean_up() {
- if sudo virsh list --all | grep "${VM_NAME}.*running" ; then
+ if sudo virsh list --all | grep " ${VM_NAME} .*running" ; then
sudo virsh destroy "$VM_NAME"
fi
- if sudo virsh list --all | grep "${VM_NAME}" ; then
+ if sudo virsh list --all | grep " ${VM_NAME} " ; then
sudo virsh undefine "$VM_NAME"
fi
sudo rm -rf "/var/lib/libvirt/images/$VM_NAME"