Use 'id' instead of 'grep' to detect the presence of the smmsp user/group.

This fixes the check for users with smmsp in NIS instead of their local
files.

Suggested by:	peter
MFC after:	5 days
This commit is contained in:
Gregory Neil Shapiro 2003-07-06 19:37:40 +00:00
parent 6e82f17aa8
commit d0c749d35f

View File

@ -373,11 +373,11 @@ buildworld: ${WMAKE_TGTS}
#
installcheck:
.if !defined(NO_SENDMAIL)
@if ! `grep -q '^smmsp:' /etc/passwd`; then \
@if ! `id -u smmsp > /dev/null`; then \
echo "ERROR: Required smmsp user is missing, see /usr/src/UPDATING."; \
false; \
fi
@if ! `grep -q '^smmsp:' /etc/group`; then \
@if ! `id -g smmsp > /dev/null`; then \
echo "ERROR: Required smmsp group is missing, see /usr/src/UPDATING."; \
false; \
fi