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
This commit is contained in:
parent
64928717a3
commit
b56f8802e5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=95146
6
Makefile
6
Makefile
@ -84,9 +84,9 @@
|
|||||||
#
|
#
|
||||||
TGTS= afterdistribute all all-man buildkernel buildworld checkdpadd clean \
|
TGTS= afterdistribute all all-man buildkernel buildworld checkdpadd clean \
|
||||||
cleandepend cleandir depend distribute distribworld everything \
|
cleandepend cleandir depend distribute distribworld everything \
|
||||||
hierarchy includes install installkernel kernel reinstallkernel \
|
hierarchy includes install installcheck installkernel kernel \
|
||||||
installmost installworld libraries lint maninstall mk most obj \
|
reinstallkernel installmost installworld libraries lint maninstall \
|
||||||
objlink regress rerelease tags update
|
mk most obj objlink regress rerelease tags update
|
||||||
|
|
||||||
PATH= /sbin:/bin:/usr/sbin:/usr/bin
|
PATH= /sbin:/bin:/usr/sbin:/usr/bin
|
||||||
MAKE= PATH=${PATH} make -m ${.CURDIR}/share/mk -f Makefile.inc1
|
MAKE= PATH=${PATH} make -m ${.CURDIR}/share/mk -f Makefile.inc1
|
||||||
|
@ -312,12 +312,29 @@ everything:
|
|||||||
@echo "--------------------------------------------------------------"
|
@echo "--------------------------------------------------------------"
|
||||||
cd ${.CURDIR}; ${WMAKE} all
|
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
|
# installworld
|
||||||
#
|
#
|
||||||
# Installs everything compiled by a 'buildworld'.
|
# Installs everything compiled by a 'buildworld'.
|
||||||
#
|
#
|
||||||
installworld:
|
installworld: installcheck
|
||||||
mkdir -p ${INSTALLTMP}
|
mkdir -p ${INSTALLTMP}
|
||||||
for prog in [ awk cat chflags chmod chown date echo egrep find grep \
|
for prog in [ awk cat chflags chmod chown date echo egrep find grep \
|
||||||
ln make makewhatis mkdir mtree mv perl rm sed sh sysctl \
|
ln make makewhatis mkdir mtree mv perl rm sed sh sysctl \
|
||||||
|
Loading…
Reference in New Issue
Block a user