diff --git a/Makefile b/Makefile index 10ca41098b46..64df16c7daa4 100644 --- a/Makefile +++ b/Makefile @@ -84,9 +84,9 @@ # TGTS= afterdistribute all all-man buildkernel buildworld checkdpadd clean \ cleandepend cleandir depend distribute distribworld everything \ - hierarchy includes install installkernel kernel reinstallkernel \ - installmost installworld libraries lint maninstall mk most obj \ - objlink regress rerelease tags update + hierarchy includes install installcheck installkernel kernel \ + reinstallkernel installmost installworld libraries lint maninstall \ + mk most obj objlink regress rerelease tags update PATH= /sbin:/bin:/usr/sbin:/usr/bin MAKE= PATH=${PATH} make -m ${.CURDIR}/share/mk -f Makefile.inc1 diff --git a/Makefile.inc1 b/Makefile.inc1 index 1d20a5e5c43c..5468f0f3b083 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -312,12 +312,29 @@ everything: @echo "--------------------------------------------------------------" cd ${.CURDIR}; ${WMAKE} all +# +# installcheck +# +# Checks to be sure system is ready for installworld +# +installcheck: +.if !defined(NO_SENDMAIL) + @if ! `grep -q '^smmsp:' /etc/passwd`; then \ + echo "ERROR: Required smmsp user is missing, see /usr/src/UPDATING."; \ + false; \ + fi + @if ! `grep -q '^smmsp:' /etc/group`; then \ + echo "ERROR: Required smmsp group is missing, see /usr/src/UPDATING."; \ + false; \ + fi +.endif + # # installworld # # Installs everything compiled by a 'buildworld'. # -installworld: +installworld: installcheck mkdir -p ${INSTALLTMP} for prog in [ awk cat chflags chmod chown date echo egrep find grep \ ln make makewhatis mkdir mtree mv perl rm sed sh sysctl \