Add the last of the compatibility mods from openbsd. Neatly, the

"install && rm" change fits in with the new FreeBSD default of
copy instead of move for install. Changing the order of the deletion
of the spurious password files doesn't affect FreeBSD functionality,
but it's done in such a way as not to matter.

Obtained from:	Christian Weisgerber <naddy@mips.inka.de>
This commit is contained in:
Doug Barton 2001-05-30 08:50:10 +00:00
parent 94c99813a4
commit 370b8c6831
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77478

View File

@ -479,12 +479,6 @@ case "${RERUN}" in
;;
esac
# We really don't want to have to deal with these files, since
# master.passwd is the real file that should be compared, then
# the user should run pwd_mkdb if necessary.
#
rm ${TEMPROOT}/etc/spwd.db ${TEMPROOT}/etc/passwd ${TEMPROOT}/etc/pwd.db
# Avoid comparing the motd if the user specifies it in .mergemasterrc
case "${IGNORE_MOTD}" in
'') ;;
@ -500,6 +494,14 @@ case "${RERUN}" in
;; # End of the "RERUN" test
esac
# We really don't want to have to deal with these files, since
# master.passwd is the real file that should be compared, then
# the user should run pwd_mkdb if necessary.
#
[ -f "${TEMPROOT}/etc/spwd.db" ] && rm "${TEMPROOT}/etc/spwd.db"
[ -f "${TEMPROOT}/etc/passwd" ] && rm "${TEMPROOT}/etc/passwd"
[ -f "${TEMPROOT}/etc/pwd.db" ] && rm "${TEMPROOT}/etc/pwd.db"
# Get ready to start comparing files
# Check umask if not specified on the command line,
@ -596,7 +598,8 @@ mm_install () {
NEED_CAP_MKDB=yes
;;
/etc/master.passwd)
install -m 600 "${1}" "${DESTDIR}${INSTALL_DIR}"
install -m 600 "${1}" "${DESTDIR}${INSTALL_DIR}" &&
[ -f "${1}" ] && rm "${1}"
NEED_PWD_MKDB=yes
DONT_INSTALL=yes
;;
@ -654,7 +657,8 @@ mm_install () {
case "${DONT_INSTALL}" in
'')
install -m "${FILE_MODE}" "${1}" "${DESTDIR}${INSTALL_DIR}"
install -m "${FILE_MODE}" "${1}" "${DESTDIR}${INSTALL_DIR}" &&
[ -f "${1}" ] && rm "${1}"
;;
*)
unset DONT_INSTALL
@ -666,7 +670,8 @@ mm_install () {
NEED_MAKEDEV=yes
;;
esac
install -m "${FILE_MODE}" "${1}" "${DESTDIR}${INSTALL_DIR}"
install -m "${FILE_MODE}" "${1}" "${DESTDIR}${INSTALL_DIR}" &&
[ -f "${1}" ] && rm "${1}"
fi
return $?
}