ensure $LOGNAME is set in tests

This commit is contained in:
Damien Miller 2020-12-22 18:31:50 +11:00
parent 3eb647cbb3
commit 3e9811e57b
1 changed files with 4 additions and 0 deletions

View File

@ -42,6 +42,10 @@ elif logname >/dev/null 2>&1; then
else
USER=`id -un`
fi
if test -z "$LOGNAME"; then
LOGNAME="${USER}"
export LOGNAME
fi
OBJ=$1
if [ "x$OBJ" = "x" ]; then