about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2024-04-13 16:04:29 +0200
committerAlexander Barton <alex@barton.de>2024-04-13 16:04:29 +0200
commitb77b9432c45d6f38c0ad6d9021afb4dd91f163e4 (patch)
tree78493c6fd6b7f3da7eb117331058efc42667a60c
parenta33d15751b3e3910bd06125efbeae6569844f313 (diff)
downloadngircd-b77b9432c45d6f38c0ad6d9021afb4dd91f163e4.tar.gz
ngircd-b77b9432c45d6f38c0ad6d9021afb4dd91f163e4.zip
Test suite: Correctly test for LOGNAME and USER
-rwxr-xr-xsrc/testsuite/getpid.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testsuite/getpid.sh b/src/testsuite/getpid.sh
index 3cc186e1..7a3dbe37 100755
--- a/src/testsuite/getpid.sh
+++ b/src/testsuite/getpid.sh
@@ -23,7 +23,7 @@ if [ -x /usr/bin/pgrep ]; then
 		*)
 			PGREP_FLAGS=""
 	esac
-	if [ -n "$LOGNAME" ] || [ -n "$USER" ]; then
+	if [ -n "${LOGNAME:-}" ] || [ -n "${USER:-}" ]; then
 		# Try to narrow the search down to the current user ...
 		exec /usr/bin/pgrep $PGREP_FLAGS -n -u "${LOGNAME:-$USER}" "$1"
 	else