diff options
| author | Alexander Barton <alex@barton.de> | 2024-04-13 12:00:49 +0200 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2024-04-13 12:22:35 +0200 |
| commit | e3f96d446dd88241a94de51b676fd118d47ab7d7 (patch) | |
| tree | 3d6edfcba853c71a1024bcb2bfc87ecdb4f0cb29 /src | |
| parent | 0d42ea7709c786cd9c405cf04395afd0091e580e (diff) | |
| download | ngircd-e3f96d446dd88241a94de51b676fd118d47ab7d7.tar.gz ngircd-e3f96d446dd88241a94de51b676fd118d47ab7d7.zip | |
Test suite: Use $USER in getpid.sh when $LOGNAME is not set
The LOGNAME environment variable is not set in GitHub "actions", for example ...
Diffstat (limited to 'src')
| -rwxr-xr-x | src/testsuite/getpid.sh | 2 | ||||
| -rwxr-xr-x | src/testsuite/start-server.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/testsuite/getpid.sh b/src/testsuite/getpid.sh index 465def64..85059142 100755 --- a/src/testsuite/getpid.sh +++ b/src/testsuite/getpid.sh @@ -23,7 +23,7 @@ if [ -x /usr/bin/pgrep ]; then *) PGREP_FLAGS="" esac - exec /usr/bin/pgrep $PGREP_FLAGS -n -u "$LOGNAME" "$1" + exec /usr/bin/pgrep $PGREP_FLAGS -n -u "${LOGNAME:-$USER}" "$1" fi # pidof(1) could be a good alternative on elder Linux systems diff --git a/src/testsuite/start-server.sh b/src/testsuite/start-server.sh index 599bf3ad..bc6eb7ea 100755 --- a/src/testsuite/start-server.sh +++ b/src/testsuite/start-server.sh @@ -20,7 +20,7 @@ echo_n "starting server ${id} ..." # check weather getpid.sh returns valid PIDs. If not, don't start up the # test-server, because we won't be able to kill it at the end of the test. -./getpid.sh sh >/dev/null 2>&1 +./getpid.sh sh >/dev/null if [ $? -ne 0 ]; then echo " getpid.sh failed!" exit 1 |