Page MenuHomeFreeBSD

D52834.diff
No OneTemporary

D52834.diff

diff --git a/etc/Makefile b/etc/Makefile
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -64,9 +64,12 @@
${INSTALL_SYMLINK} -T "package=runtime" ../var/run/os-release \
${DESTDIR}/etc/os-release
.if ${MK_UNBOUND} != "no"
- if [ ! -e ${DESTDIR}/etc/unbound ]; then \
- ${INSTALL_SYMLINK} -T "package=unbound" \
- ../var/unbound ${DESTDIR}/etc/unbound; \
+# If NO_ROOT is defined, we are doing a stage install and always need to
+# install the /etc/unbound symlink, otherwise, don't overwrite the user's
+# existing symlink.
+ if [ "${NO_ROOT:Dtrue}" = true -o ! -e ${DESTDIR}/etc/unbound ]; then \
+ ${INSTALL_SYMLINK} -Tpackage=unbound ../var/unbound \
+ ${DESTDIR}/etc/unbound; \
fi
.endif
.if ${MK_SENDMAIL} != "no"
@@ -82,12 +85,16 @@
.if ${MK_MAIL} != "no"
cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
-T "package=runtime,config" ${ETCMAIL} ${DESTDIR}/etc/mail
- if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
- ! -f ${DESTDIR}/etc/aliases ]; then \
- ${INSTALL_SYMLINK} -T "package=runtime" \
- mail/aliases ${DESTDIR}/etc/aliases; \
+# If NO_ROOT is defined, we are doing a stage install and always need to
+# install the /etc/aliases symlink, otherwise, don't overwrite the user's
+# existing symlink.
+ if [ "${NO_ROOT:Dtrue}" = true -o \( -f ${DESTDIR}/etc/mail/aliases -a \
+ ! -f ${DESTDIR}/etc/aliases \) ]; then \
+ ${INSTALL_SYMLINK} -Tpackage=runtime mail/aliases \
+ ${DESTDIR}/etc/aliases; \
fi
-.endif
+.endif # ${MK_MAIL} != "no"
+
.if ${MK_SENDMAIL} != "no"
cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
-T "package=sendmail" ${ETCMAIL_SENDMAIL} ${DESTDIR}/etc/mail
diff --git a/usr.sbin/ypserv/Makefile b/usr.sbin/ypserv/Makefile
--- a/usr.sbin/ypserv/Makefile
+++ b/usr.sbin/ypserv/Makefile
@@ -41,7 +41,10 @@
FILESDIR= /var/yp
SCRIPTS= ypinit.sh
-.if !exists(${DESTDIR}${FILESDIR}/Makefile)
+# If NO_ROOT is defined, we are doing a stage install and always need to
+# install the symlink, otherwise, don't overwrite the user's existing
+# symlink.
+.if defined(NO_ROOT) || !exists(${DESTDIR}${FILESDIR}/Makefile)
SYMLINKS= ${FILESNAME} ${FILESDIR}/Makefile
.endif

File Metadata

Mime Type
text/plain
Expires
Thu, Jul 16, 6:46 AM (18 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35127045
Default Alt Text
D52834.diff (2 KB)

Event Timeline