sh: install hard link with same mode as target

Previously when using NO_ROOT we recorded a METALOG entry for the
/.profile hard link with a different mode than the link target, which is
not permitted.

Reviewed by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37476
This commit is contained in:
Ed Maste 2022-11-23 10:20:49 -05:00
parent abb9a940bb
commit 1dbb9994d4

View File

@ -68,6 +68,7 @@ SUBDIR.${MK_TESTS}+= tests
beforeinstallconfig:
rm -f ${DESTDIR}/.profile
LINKMODE=${CONFMODE}
afterinstallconfig:
${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.profile ${DESTDIR}/.profile