From 2ff05f90ae5fc7380cbdbd5a93b8e4dab6e4ae0d Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Fri, 12 Mar 2004 13:20:24 +0000 Subject: Use find(1) instead of ``pw groupshow'' to detect missing groups. Restore checks for recently added PF groups. Reviewed by: mlaier --- Makefile.inc1 | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'Makefile.inc1') diff --git a/Makefile.inc1 b/Makefile.inc1 index 943831f72fdd..2ff3ff604e46 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -407,23 +407,29 @@ sparc64_installcheck: # # Checks to be sure system is ready for installworld # -installcheck: ${SPECIAL_INSTALLCHECKS} +CHECK_UIDS= +CHECK_GIDS= .if !defined(NO_SENDMAIL) - @if ! `id -u smmsp > /dev/null`; then \ - echo "ERROR: Required smmsp user is missing, see /usr/src/UPDATING."; \ - false; \ - fi - @if ! `pw groupshow smmsp > /dev/null`; then \ - echo "ERROR: Required smmsp group is missing, see /usr/src/UPDATING."; \ - false; \ - fi +CHECK_UIDS+= smmsp +CHECK_GIDS+= smmsp .endif .if !defined(NO_PF) - @if ! `id -u proxy > /dev/null`; then \ - echo "ERROR: Required proxy user is missing, see /usr/src/UPDATING."; \ +CHECK_UIDS+= proxy +CHECK_GIDS+= proxy authpf +.endif +installcheck: ${SPECIAL_INSTALLCHECKS} +.for uid in ${CHECK_UIDS} + @if ! `id -u ${uid} > /dev/null`; then \ + echo "ERROR: Required ${uid} user is missing, see /usr/src/UPDATING."; \ false; \ fi -.endif +.endfor +.for gid in ${CHECK_GIDS} + @if ! `find / -prune -group ${gid} > /dev/null`; then \ + echo "ERROR: Required ${gid} group is missing, see /usr/src/UPDATING."; \ + false; \ + fi +.endfor # # distributeworld -- cgit v1.2.3