diff options
author | Romain Francoise <rfrancoise@debian.org> | 2014-10-21 19:28:38 +0200 |
---|---|---|
committer | Romain Francoise <rfrancoise@debian.org> | 2014-10-21 19:28:38 +0200 |
commit | 2b8de74ff4c334c25e89988c4a401b24b5bcf03d (patch) | |
tree | 10fb49ca94bfd0c8b8a583412281abfc0186836e /testing/scripts/function.sh | |
parent | 81c63b0eed39432878f78727f60a1e7499645199 (diff) | |
download | vyos-strongswan-2b8de74ff4c334c25e89988c4a401b24b5bcf03d.tar.gz vyos-strongswan-2b8de74ff4c334c25e89988c4a401b24b5bcf03d.zip |
Import upstream release 5.2.1
Diffstat (limited to 'testing/scripts/function.sh')
-rwxr-xr-x | testing/scripts/function.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testing/scripts/function.sh b/testing/scripts/function.sh index c4769678c..2dd465c85 100755 --- a/testing/scripts/function.sh +++ b/testing/scripts/function.sh @@ -156,6 +156,18 @@ check_commands() done } +# check if any of the given virtual guests are running +# $* - names of guests to check +running_any() +{ + command -v virsh >/dev/null || return 1 + for host in $* + do + virsh list --name | grep "^$host$" >/dev/null && return 0 + done + return 1 +} + ############################################# # search and replace strings throughout a # whole directory |