aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ypserv/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ypserv/Makefile')
-rw-r--r--usr.sbin/ypserv/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/ypserv/Makefile b/usr.sbin/ypserv/Makefile
index ba7eb1f86267..b4e59b719692 100644
--- a/usr.sbin/ypserv/Makefile
+++ b/usr.sbin/ypserv/Makefile
@@ -41,7 +41,10 @@ FILESNAME= Makefile.dist
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