diff options
author | Reto Buerki <reet@codelabs.ch> | 2012-12-14 09:06:55 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2013-01-17 16:54:57 +0100 |
commit | 50fb9b845718416ce4f360b9142f50fdaf1c9dee (patch) | |
tree | 5b0d9786b106f89bb65fc948893f937dab5ae43b | |
parent | 16cd6f63e29fd1597804c167c68f103ca20cbf5e (diff) | |
download | strongswan-50fb9b845718416ce4f360b9142f50fdaf1c9dee.tar.bz2 strongswan-50fb9b845718416ce4f360b9142f50fdaf1c9dee.tar.xz |
Use exit trap to kill open ssh sessions
-rwxr-xr-x | testing/do-tests | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/testing/do-tests b/testing/do-tests index 7f7d9147a..59e1634b6 100755 --- a/testing/do-tests +++ b/testing/do-tests @@ -98,6 +98,7 @@ for host in $STRONGSWANHOSTS do ssh $SSHCONF -N root@`eval echo \\\$ipv4_$host` >/dev/null 2>&1 & eval ssh_pid_$host="`echo $!`" + do_on_exit kill `eval echo \\\$ssh_pid_$host` done @@ -786,11 +787,3 @@ echo "or via the link http://$ipv4_winnetou/testresults/$TESTDATE" ENDDATE=`date +%Y%m%d-%H%M` echo echo "Finished : $ENDDATE" - -########################################################################## -# close ssh sessions -# -for host in $STRONGSWANHOSTS -do - kill `eval echo \\\$ssh_pid_$host` -done |