]> arthur.barton.de Git - ngircd.git/commitdiff
Test suite: Correctly test for LOGNAME and USER
authorAlexander Barton <alex@barton.de>
Sat, 13 Apr 2024 14:04:29 +0000 (16:04 +0200)
committerAlexander Barton <alex@barton.de>
Sat, 13 Apr 2024 14:04:29 +0000 (16:04 +0200)
src/testsuite/getpid.sh

index 3cc186e1c9b8ff3c1b02d38484614dffb20aeb20..7a3dbe3789fddb14bf4a931b3aaa501d3f298e3c 100755 (executable)
@@ -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