]> arthur.barton.de Git - ngircd.git/blobdiff - src/testsuite/getpid.sh
Test suite: Correctly test for LOGNAME and USER
[ngircd.git] / 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