Author: arichardson
Date: Fri Jun 29 21:15:17 2018
New Revision: 335804
URL: https://svnweb.freebsd.org/changeset/base/335804

Log:
  Fix missing files in METALOG with -DNO_ROOT
  
  By using INSTALL_LINK instead of calling ln during install the files
  end up in the METALOG file as well if we use -DNO_ROOT and will be
  included in a disk image when using makefs with METALOG as the input.
  The other file that was not included in METALOG was /var/db/services.db
  which is now also included for -DNO_ROOT.
  
  Approved By:  brooks (mentor)
  Differential Revision: https://reviews.freebsd.org/D15665

Modified:
  head/etc/Makefile
  head/usr.sbin/rmt/Makefile

Modified: head/etc/Makefile
==============================================================================
--- head/etc/Makefile   Fri Jun 29 20:17:47 2018        (r335803)
+++ head/etc/Makefile   Fri Jun 29 21:15:17 2018        (r335804)
@@ -213,6 +213,7 @@ distribution:
                echo "./etc/passwd type=file mode=0644 uname=root gname=wheel"; 
\
                echo "./etc/pwd.db type=file mode=0644 uname=root gname=wheel"; 
\
                echo "./etc/spwd.db type=file mode=0600 uname=root 
gname=wheel"; \
+               echo "./var/db/services.db type=file mode=0644 uname=root 
gname=wheel"; \
        ) | ${METALOG.add}
 .endif
 .if ${MK_AUTOFS} != "no"
@@ -270,7 +271,7 @@ distribution:
            ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
                dot.profile ${DESTDIR}/root/.profile; \
            rm -f ${DESTDIR}/.profile; \
-           ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
+           ${INSTALL_LINK} ${DESTDIR}/root/.profile ${DESTDIR}/.profile
 .if ${MK_TCSH} != "no"
        cd ${.CURDIR}/root; \
            ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
@@ -278,14 +279,14 @@ distribution:
            ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
                dot.login ${DESTDIR}/root/.login; \
            rm -f ${DESTDIR}/.cshrc; \
-           ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
+           ${INSTALL_LINK} ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
 .endif
 .if ${MK_MAIL} != "no"
        cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
            ${ETCMAIL} ${DESTDIR}/etc/mail
        if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
              ! -f ${DESTDIR}/etc/aliases ]; then \
-               ln -s mail/aliases ${DESTDIR}/etc/aliases; \
+               ${INSTALL_SYMLINK} mail/aliases ${DESTDIR}/etc/aliases; \
        fi
 .endif
        ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \

Modified: head/usr.sbin/rmt/Makefile
==============================================================================
--- head/usr.sbin/rmt/Makefile  Fri Jun 29 20:17:47 2018        (r335803)
+++ head/usr.sbin/rmt/Makefile  Fri Jun 29 21:15:17 2018        (r335804)
@@ -7,6 +7,6 @@ MAN=    rmt.8
 # called from /usr/src/etc/Makefile
 etc-rmt:
        rm -f ${DESTDIR}/etc/rmt
-       ln -s ..${BINDIR}/rmt ${DESTDIR}/etc/rmt
+       ${INSTALL_RSYMLINK} ..${BINDIR}/rmt ${DESTDIR}/etc/rmt
 
 .include <bsd.prog.mk>
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to