From: Alexander Barton Date: Sat, 13 Apr 2024 14:04:29 +0000 (+0200) Subject: Test suite: Correctly test for LOGNAME and USER X-Git-Tag: rel-27~8 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git;a=commitdiff_plain;h=b77b9432c45d6f38c0ad6d9021afb4dd91f163e4 Test suite: Correctly test for LOGNAME and USER --- 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