[Openvpn-devel,v2] t_client.sh.in: Do not try to guess the absolute path to LOGDIR

Message ID 20260807131443.53351-1-frank@lichtenheld.com
State New
Headers
Series [Openvpn-devel,v2] t_client.sh.in: Do not try to guess the absolute path to LOGDIR |

Commit Message

Frank Lichtenheld Aug. 7, 2026, 1:14 p.m. UTC
  We know it, we do not need to guess it. Makes it easier
to move LOGDIR around.

Change-Id: I752e03eabec085e47e8d74a9b4fa99e9ff267efb
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1764
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1764
This mail reflects revision 2 of this Change.

Acked-by according to Gerrit (reflected above):
Arne Schwabe <arne-openvpn@rfc2549.org>
  

Patch

diff --git a/tests/t_client.sh.in b/tests/t_client.sh.in
index fc12dda..6c9c8ae 100755
--- a/tests/t_client.sh.in
+++ b/tests/t_client.sh.in
@@ -126,6 +126,7 @@ 
 fi
 
 LOGDIR=t_client-`hostname`-`date +%Y%m%d-%H%M%S`
+LOGDIR_ABS="$PWD/$LOGDIR"
 if mkdir $LOGDIR
 then :
 else
@@ -383,7 +384,7 @@ 
 	printf "$outbuf" ; continue
     fi
 
-    pidfile="${top_builddir}/tests/$LOGDIR/openvpn-$SUF.pid"
+    pidfile="$LOGDIR_ABS/openvpn-$SUF.pid"
     openvpn_conf="$openvpn_conf --writepid $pidfile $up"
     output " run openvpn $openvpn_conf"
     echo "# ${openvpn} $openvpn_conf" >$LOGDIR/$SUF:openvpn.log