diff options
author | brooks <brooks@FreeBSD.org> | 2013-01-29 22:17:58 +0000 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2013-01-29 22:17:58 +0000 |
commit | 1a89a21cbd61e82e4c1a20a42cb30342e26ef1a6 (patch) | |
tree | 2bf04924ba8f1646aa92b928679934680e0bde69 | |
parent | a8142ddc534e9291c974ada3864a6dc5b87de4eb (diff) | |
download | FreeBSD-src-1a89a21cbd61e82e4c1a20a42cb30342e26ef1a6.zip FreeBSD-src-1a89a21cbd61e82e4c1a20a42cb30342e26ef1a6.tar.gz |
Log the addition of login.conf.db, passwd, pwd.db, and spwd.db via cat -l.
Make cat a bootstrap tool to facilitate this.
-rw-r--r-- | Makefile.inc1 | 9 | ||||
-rw-r--r-- | etc/Makefile | 18 |
2 files changed, 22 insertions, 5 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index cbf10ea..d5f6f2e 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -185,7 +185,7 @@ OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET}.${TARGET_ARCH} .endif WORLDTMP= ${OBJTREE}${.CURDIR}/tmp # /usr/games added for fortune which depend on strfile -BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games +BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games:${WORLDTMP}/legacy/bin XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games STRICTTMPPATH= ${BPATH}:${XPATH} TMPPATH= ${STRICTTMPPATH}:${PATH} @@ -412,7 +412,7 @@ _worldtmp: rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c .endif .for _dir in \ - lib usr legacy/usr + lib usr legacy/bin legacy/usr mkdir -p ${WORLDTMP}/${_dir} .endfor mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ @@ -1136,6 +1136,10 @@ _nmtree= lib/libnetbsd \ _nmtree_itools= nmtree .endif +.if ${BOOTSTRAPPING} < 1000027 +_cat= bin/cat +.endif + .if ${BOOTSTRAPPING} >= 900040 && ${BOOTSTRAPPING} < 900041 _awk= usr.bin/awk .endif @@ -1191,6 +1195,7 @@ bootstrap-tools: ${_ar} \ ${_dtc} \ ${_awk} \ + ${_cat} \ usr.bin/lorder \ usr.bin/makewhatis \ ${_mklocale} \ diff --git a/etc/Makefile b/etc/Makefile index 164cbd4..dfa9953 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -180,6 +180,10 @@ CAP_MKDB_ENDIAN?= PWD_MKDB_ENDIAN?= .endif +.if defined(NO_ROOT) +METALOG.add?= cat -l >> ${METALOG} +.endif + distribution: .if !defined(DESTDIR) @echo "set DESTDIR before running \"make ${.TARGET}\"" @@ -201,6 +205,14 @@ distribution: .endif pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \ ${DESTDIR}/etc/master.passwd +.if defined(NO_ROOT) + ( \ + echo "./etc/login.conf.db type=file mode=0644 uname=root gname=wheel"; \ + echo "./etc/passwd type=file mode=0644 uname=root gname=wheel"; \ + echo "./etc/pwd.db type=file mode=0644 uname=root gname=wheel"; \ + echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \ + ) | ${METALOG.add} +.endif .if ${MK_ATF} != "no" ${_+_}cd ${.CURDIR}/atf; ${MAKE} install .endif @@ -336,9 +348,9 @@ distrib-dirs: test "$$d" == "/" && d=""; \ d=${DISTBASE}$$d; \ shift; \ - ${ECHO} "${MTREE_CMD} -C -f $$m | sed s#^\.#.$$d# >>" \ - "${METALOG}" ; \ - ${MTREE_CMD} -C -f $$m | sed s#^\.#.$$d# >> ${METALOG} ; \ + ${ECHO} "${MTREE_CMD} -C -f $$m | sed s#^\.#.$$d# |" \ + "${METALOG.add}" ; \ + ${MTREE_CMD} -C -f $$m | sed s#^\.#.$$d# | ${METALOG.add} ; \ done; true .endif ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys |