1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-12-13 02:10:27 +00:00

Test suite: Use $USER in getpid.sh when $LOGNAME is not set

The LOGNAME environment variable is not set in GitHub "actions", for
example ...
This commit is contained in:
Alexander Barton 2024-04-13 12:00:49 +02:00
parent 0d42ea7709
commit e3f96d446d
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ if [ -x /usr/bin/pgrep ]; then
*) *)
PGREP_FLAGS="" PGREP_FLAGS=""
esac esac
exec /usr/bin/pgrep $PGREP_FLAGS -n -u "$LOGNAME" "$1" exec /usr/bin/pgrep $PGREP_FLAGS -n -u "${LOGNAME:-$USER}" "$1"
fi fi
# pidof(1) could be a good alternative on elder Linux systems # pidof(1) could be a good alternative on elder Linux systems

View File

@ -20,7 +20,7 @@ echo_n "starting server ${id} ..."
# check weather getpid.sh returns valid PIDs. If not, don't start up the # check weather getpid.sh returns valid PIDs. If not, don't start up the
# test-server, because we won't be able to kill it at the end of the test. # test-server, because we won't be able to kill it at the end of the test.
./getpid.sh sh >/dev/null 2>&1 ./getpid.sh sh >/dev/null
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo " getpid.sh failed!" echo " getpid.sh failed!"
exit 1 exit 1