]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/testsuite/getpid.sh
Test suite: Use $USER in getpid.sh when $LOGNAME is not set
[ngircd-alex.git] / src / testsuite / getpid.sh
index 465def64605356d0c74b45a6348f7a1bcde4a8cd..8505914208e68538013bd0777d40d380ccbe2fc7 100755 (executable)
@@ -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