From: Tobias Brunner Date: Fri, 21 Mar 2025 14:12:06 +0000 (+0100) Subject: testing: Move removal of charon.pid into posttest section X-Git-Tag: 6.0.2dr1~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02c43fa6e40998c3126e221a3d5e26e882165877;p=thirdparty%2Fstrongswan.git testing: Move removal of charon.pid into posttest section Fixes: a103f3a2849f ("testing: Add options to only run pre- or posttest scripts of a scenario") --- diff --git a/testing/do-tests b/testing/do-tests index 610e1a1699..e2a60aa630 100755 --- a/testing/do-tests +++ b/testing/do-tests @@ -879,6 +879,16 @@ else $DIR/scripts/restore-defaults $testname + ########################################################################## + # remove any charon.pid files that still may exist + # + + for host in $IPSECHOSTS + do + eval HOSTLOGIN=root@\$ipv4_${host} + ssh $SSHCONF $HOSTLOGIN 'if [ -f /var/run/charon.pid ]; then rm /var/run/charon.pid; echo " removed charon.pid on `hostname`"; fi' + done + fi ############################################################################ @@ -928,17 +938,6 @@ fi @EOF - - ########################################################################## - # remove any charon.pid files that still may exist - # - - for host in $IPSECHOSTS - do - eval HOSTLOGIN=root@\$ipv4_${host} - ssh $SSHCONF $HOSTLOGIN 'if [ -f /var/run/charon.pid ]; then rm /var/run/charon.pid; echo " removed charon.pid on `hostname`"; fi' - done - ########################################################################## # exit if aborted or running only pre-/posttest scripts #