summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Davis <brd@FreeBSD.org>2019-05-16 21:50:12 +0000
committerBrad Davis <brd@FreeBSD.org>2019-05-16 21:50:12 +0000
commit11f8f36fb9b2126dad9da6af6f6cc6200362b968 (patch)
treede78863d000949a1f84b3717c68e3fa9f481d78b
parent6a65ca35dd606eaa5f89691cd45c4ac329e25dda (diff)
downloadsrc-test2-11f8f36fb9b2126dad9da6af6f6cc6200362b968.tar.gz
src-test2-11f8f36fb9b2126dad9da6af6f6cc6200362b968.zip
Fix mergemaster after r347638 and the master.passwd / group move.
Check the legacy directory and use it instead if present. Install these first if using beinstall. UPDATING entry to follow. Approved by: allanjude (mentor, in person) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D20279
Notes
Notes: svn path=/head/; revision=347893
-rwxr-xr-xusr.sbin/etcupdate/etcupdate.sh4
-rwxr-xr-xusr.sbin/mergemaster/mergemaster.sh9
2 files changed, 9 insertions, 4 deletions
diff --git a/usr.sbin/etcupdate/etcupdate.sh b/usr.sbin/etcupdate/etcupdate.sh
index 97a4c500a0fc..a7ec1df1be5c 100755
--- a/usr.sbin/etcupdate/etcupdate.sh
+++ b/usr.sbin/etcupdate/etcupdate.sh
@@ -1737,7 +1737,9 @@ WARNINGS=$WORKDIR/warnings
EDITOR=${EDITOR:-/usr/bin/vi}
# Files that need to be updated before installworld.
-PREWORLD_FILES="etc/master.passwd etc/group"
+PREWORLD_FILES="lib/libc/gen/master.passwd lib/libc/gen/group"
+# If on an older tree, use it instead. Delete after 13.0.
+[ -f ${SRCDIR}/etc/master.passwd ] && PREWORLD_FILES="etc/master.passwd etc/group"
# Handle command-specific argument processing such as complaining
# about unsupported options. Since the configuration file is always
diff --git a/usr.sbin/mergemaster/mergemaster.sh b/usr.sbin/mergemaster/mergemaster.sh
index b6106f60bff2..9a92a13a947e 100755
--- a/usr.sbin/mergemaster/mergemaster.sh
+++ b/usr.sbin/mergemaster/mergemaster.sh
@@ -669,9 +669,12 @@ case "${RERUN}" in
;;
*)
# Only set up files that are crucial to {build|install}world
- { mkdir -p ${TEMPROOT}/etc &&
- cp -p ${SOURCEDIR}/etc/master.passwd ${TEMPROOT}/etc &&
- install -p -o root -g wheel -m 0644 ${SOURCEDIR}/etc/group ${TEMPROOT}/etc;} ||
+ { MM_PASSDIR="${SOURCEDIR}/lib/libc/gen"
+ # If on an older tree, use it instead. Delete after 13.0.
+ [ -f ${SOURCEDIR}/etc/master.passwd ] && MM_PASSDIR="${SOURCEDIR}/etc"
+ mkdir -p ${TEMPROOT}/etc &&
+ cp -p ${MM_PASSDIR}/master.passwd ${TEMPROOT}/etc &&
+ install -p -o root -g wheel -m 0644 ${MM_PASSDIR}/group ${TEMPROOT}/etc;} ||
{ echo '';
echo ' *** FATAL ERROR: Cannot copy files to the temproot environment';
echo '';