From b56fc406ef9198d308d4b9ee543ac5587c6fc20a Mon Sep 17 00:00:00 2001 From: brd Date: Wed, 15 Aug 2018 16:22:12 +0000 Subject: [PATCH] Fix build after r337849 This moves the symlink creation to after where the files are installed. This also inverts the shell change so that it only happens if MK_TCSH is on. Approved by: will (mentor) Differential Revision: https://reviews.freebsd.org/D16725 --- bin/csh/Makefile | 5 ++--- bin/sh/Makefile | 4 +++- etc/master.passwd | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/csh/Makefile b/bin/csh/Makefile index 2e54483721ab..6abf35076c48 100644 --- a/bin/csh/Makefile +++ b/bin/csh/Makefile @@ -49,8 +49,7 @@ MLINKS= csh.1 tcsh.1 LIBADD= termcapw crypt -LINKS= ${BINDIR}/csh ${BINDIR}/tcsh \ - /root/.cshrc /.cshrc +LINKS= ${BINDIR}/csh ${BINDIR}/tcsh CLEANFILES= ${GENHDRS} gethost csh.1 @@ -158,7 +157,7 @@ beforeinstall: rm -f ${DESTDIR}/.cshrc afterinstallconfig: - sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd + sed -i "" -e 's;/bin/sh;/bin/csh;' ${DESTDIR}/etc/master.passwd pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd .include diff --git a/bin/sh/Makefile b/bin/sh/Makefile index 1e8684051a47..b50e3217e97f 100644 --- a/bin/sh/Makefile +++ b/bin/sh/Makefile @@ -37,7 +37,6 @@ WFORMAT=0 CLEANFILES+= mknodes mksyntax CLEANFILES+= ${GENSRCS} ${GENHDRS} -LINKS= /root/.profile /.profile build-tools: mknodes mksyntax @@ -67,4 +66,7 @@ SUBDIR.${MK_TESTS}+= tests beforeinstall: rm -f ${DESTDIR}/.profile +afterinstallconfig: + ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.profile ${DESTDIR}/.profile + .include diff --git a/etc/master.passwd b/etc/master.passwd index a7903f08a576..094d2da13832 100644 --- a/etc/master.passwd +++ b/etc/master.passwd @@ -1,6 +1,6 @@ # $FreeBSD$ # -root::0:0::0:0:Charlie &:/root:/bin/csh +root::0:0::0:0:Charlie &:/root:/bin/sh toor:*:0:0::0:0:Bourne-again Superuser:/root: daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin operator:*:2:5::0:0:System &:/:/usr/sbin/nologin