svn commit: r338374 - in head: bin/csh bin/sh etc etc/root

Brad Davis brd at FreeBSD.org
Wed Aug 29 16:59:21 UTC 2018


Author: brd
Date: Wed Aug 29 16:59:19 2018
New Revision: 338374
URL: https://svnweb.freebsd.org/changeset/base/338374

Log:
  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

Added:
  head/bin/csh/dot.cshrc
     - copied unchanged from r338373, head/etc/root/dot.cshrc
  head/bin/sh/dot.profile
     - copied unchanged from r338373, head/etc/root/dot.profile
Deleted:
  head/etc/root/dot.cshrc
  head/etc/root/dot.profile
Modified:
  head/bin/csh/Makefile
  head/bin/sh/Makefile
  head/etc/Makefile

Modified: head/bin/csh/Makefile
==============================================================================
--- head/bin/csh/Makefile	Wed Aug 29 16:21:34 2018	(r338373)
+++ head/bin/csh/Makefile	Wed Aug 29 16:59:19 2018	(r338374)
@@ -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
@@ -152,5 +153,11 @@ tc.const.h: tc.const.c sh.char.h config.h config_f.h s
 	    sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \
 	    sort >> ${.TARGET}
 	@echo '#endif /* _h_tc_const */' >> ${.TARGET}
+
+beforeinstallconfig:
+	rm -f ${DESTDIR}/.cshrc
+
+afterinstallconfig:
+	${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
 
 .include <bsd.prog.mk>

Copied: head/bin/csh/dot.cshrc (from r338373, head/etc/root/dot.cshrc)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/bin/csh/dot.cshrc	Wed Aug 29 16:59:19 2018	(r338374, copy of r338373, head/etc/root/dot.cshrc)
@@ -0,0 +1,43 @@
+# $FreeBSD$
+#
+# .cshrc - csh resource script, read at beginning of execution by each shell
+#
+# see also csh(1), environ(7).
+# more examples available at /usr/share/examples/csh/
+#
+
+alias h		history 25
+alias j		jobs -l
+alias la	ls -aF
+alias lf	ls -FA
+alias ll	ls -lAF
+
+# A righteous umask
+umask 22
+
+set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin $HOME/bin)
+
+setenv	EDITOR	vi
+setenv	PAGER	less
+setenv	BLOCKSIZE	K
+
+if ($?prompt) then
+	# An interactive shell -- set some stuff up
+	set prompt = "%N@%m:%~ %# "
+	set promptchars = "%#"
+
+	set filec
+	set history = 1000
+	set savehist = (1000 merge)
+	set autolist = ambiguous
+	# Use history to aid expansion
+	set autoexpand
+	set autorehash
+	set mail = (/var/mail/$USER)
+	if ( $?tcsh ) then
+		bindkey "^W" backward-delete-word
+		bindkey -k up history-search-backward
+		bindkey -k down history-search-forward
+	endif
+
+endif

Modified: head/bin/sh/Makefile
==============================================================================
--- head/bin/sh/Makefile	Wed Aug 29 16:21:34 2018	(r338373)
+++ head/bin/sh/Makefile	Wed Aug 29 16:59:19 2018	(r338374)
@@ -3,7 +3,9 @@
 
 .include <src.opts.mk>
 
-CONFS=	profile
+CONFS=	dot.profile profile
+CONFSDIR_dot.profile=	/root
+CONFSNAME_dot.profile=	.profile
 PACKAGE=runtime
 PROG=	sh
 INSTALLFLAGS= -S
@@ -60,5 +62,11 @@ 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 <bsd.prog.mk>

Copied: head/bin/sh/dot.profile (from r338373, head/etc/root/dot.profile)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/bin/sh/dot.profile	Wed Aug 29 16:59:19 2018	(r338374, copy of r338373, head/etc/root/dot.profile)
@@ -0,0 +1,16 @@
+# $FreeBSD$
+#
+PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bin
+export PATH
+HOME=/root
+export HOME
+TERM=${TERM:-xterm}
+export TERM
+PAGER=less
+export PAGER
+
+# Query terminal size; useful for serial lines.
+if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi
+
+# Uncomment to display a random cookie on each login.
+# if [ -x /usr/bin/fortune ] ; then /usr/bin/fortune -s ; fi

Modified: head/etc/Makefile
==============================================================================
--- head/etc/Makefile	Wed Aug 29 16:21:34 2018	(r338373)
+++ head/etc/Makefile	Wed Aug 29 16:59:19 2018	(r338374)
@@ -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 \


More information about the svn-src-all mailing list