summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgshapiro <gshapiro@FreeBSD.org>2002-04-20 19:04:59 +0000
committergshapiro <gshapiro@FreeBSD.org>2002-04-20 19:04:59 +0000
commitd0aa6dec50d73ea0941349617d4b1985e2f8b285 (patch)
treef74f34018b206d4d30ed466f3e9426142d312cf5
parent5badd84013a2d038292544a680b317349abf2830 (diff)
downloadFreeBSD-src-d0aa6dec50d73ea0941349617d4b1985e2f8b285.zip
FreeBSD-src-d0aa6dec50d73ea0941349617d4b1985e2f8b285.tar.gz
Despite the fact that it is documented in the handbook, the release notes,
and UPDATING and has been posted to both freebsd-current and freebsd-stable, users are still not adding the required smmsp user and group before doing an installworld. Therefore, don't let users do an installworld unless they have followed directions. Add a new installcheck Makefile target which installworld runs before actually starting the installation. This target can be used by other parts of userland as well. The first addition to the target is to check for the smmsp user and group if NO_SENDMAIL isn't defined. Others may add checks to this target as they see fit. MFC after: 1 week
-rw-r--r--Makefile6
-rw-r--r--Makefile.inc119
2 files changed, 21 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 10ca410..64df16c 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 1d20a5e..5468f0f 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -313,11 +313,28 @@ everything:
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 \
OpenPOWER on IntegriCloud