From 94ec7ec758aad2cdfd976ef5385ca2b345a6d64d Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Wed, 29 Aug 2018 16:59:19 +0000 Subject: [PATCH] Finish moving dot.cshrc and dot.profile to bin/csh/ and bin/sh/. Approved by: re (gjb), will (mentor) Differential Revision: https://reviews.freebsd.org/D16770 --- bin/csh/Makefile | 9 ++++++++- {etc/root => bin/csh}/dot.cshrc | 0 bin/sh/Makefile | 10 +++++++++- {etc/root => bin/sh}/dot.profile | 0 etc/Makefile | 12 ------------ 5 files changed, 17 insertions(+), 14 deletions(-) rename {etc/root => bin/csh}/dot.cshrc (100%) rename {etc/root => bin/sh}/dot.profile (100%) diff --git a/bin/csh/Makefile b/bin/csh/Makefile index 78d6fba3791c..b0d4435d970c 100644 --- a/bin/csh/Makefile +++ b/bin/csh/Makefile @@ -10,8 +10,9 @@ CONFGROUPS= ETC ROOT ETC= csh.cshrc csh.login csh.logout -ROOT= dot.login +ROOT= dot.cshrc dot.login ROOTDIR= /root +ROOTNAME_dot.cshrc= .cshrc ROOTNAME_dot.login= .login PACKAGE=runtime TCSHDIR= ${SRCTOP}/contrib/tcsh @@ -153,4 +154,10 @@ tc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h ${BUILD sort >> ${.TARGET} @echo '#endif /* _h_tc_const */' >> ${.TARGET} +beforeinstallconfig: + rm -f ${DESTDIR}/.cshrc + +afterinstallconfig: + ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc + .include diff --git a/etc/root/dot.cshrc b/bin/csh/dot.cshrc similarity index 100% rename from etc/root/dot.cshrc rename to bin/csh/dot.cshrc diff --git a/bin/sh/Makefile b/bin/sh/Makefile index 652e9ddc3dbf..abd756bb8e6d 100644 --- a/bin/sh/Makefile +++ b/bin/sh/Makefile @@ -3,7 +3,9 @@ .include -CONFS= profile +CONFS= dot.profile profile +CONFSDIR_dot.profile= /root +CONFSNAME_dot.profile= .profile PACKAGE=runtime PROG= sh INSTALLFLAGS= -S @@ -61,4 +63,10 @@ token.h: mktokens HAS_TESTS= SUBDIR.${MK_TESTS}+= tests +beforeinstallconfig: + rm -f ${DESTDIR}/.profile + +afterinstallconfig: + ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.profile ${DESTDIR}/.profile + .include diff --git a/etc/root/dot.profile b/bin/sh/dot.profile similarity index 100% rename from etc/root/dot.profile rename to bin/sh/dot.profile diff --git a/etc/Makefile b/etc/Makefile index cf08a4e5155b..5b32e3a5664b 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -155,18 +155,6 @@ distribution: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.k5login ${DESTDIR}/root/.k5login; .endif - cd ${.CURDIR}/root; \ - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ - dot.profile ${DESTDIR}/root/.profile; \ - rm -f ${DESTDIR}/.profile; \ - ${INSTALL_LINK} ${DESTDIR}/root/.profile ${DESTDIR}/.profile -.if ${MK_TCSH} != "no" - cd ${.CURDIR}/root; \ - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ - dot.cshrc ${DESTDIR}/root/.cshrc; \ - rm -f ${DESTDIR}/.cshrc; \ - ${INSTALL_LINK} ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc -.endif .if ${MK_MAIL} != "no" cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \