aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorBrad Davis <brd@FreeBSD.org>2018-08-29 16:59:19 +0000
committerBrad Davis <brd@FreeBSD.org>2018-08-29 16:59:19 +0000
commit94ec7ec758aad2cdfd976ef5385ca2b345a6d64d (patch)
treea4a12c4c31c0716ea7097bf6ad67785fc5da43c6 /bin
parentbc0e855bd9c000b7c2ad7d1507ea8f76858e2f0f (diff)
Notes
Diffstat (limited to 'bin')
-rw-r--r--bin/csh/Makefile9
-rw-r--r--bin/csh/dot.cshrc43
-rw-r--r--bin/sh/Makefile10
-rw-r--r--bin/sh/dot.profile16
4 files changed, 76 insertions, 2 deletions
diff --git a/bin/csh/Makefile b/bin/csh/Makefile
index 78d6fba3791c9..b0d4435d970c9 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 <bsd.prog.mk>
diff --git a/bin/csh/dot.cshrc b/bin/csh/dot.cshrc
new file mode 100644
index 0000000000000..1fcc9917f0f9c
--- /dev/null
+++ b/bin/csh/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
diff --git a/bin/sh/Makefile b/bin/sh/Makefile
index 652e9ddc3dbf9..abd756bb8e6de 100644
--- a/bin/sh/Makefile
+++ b/bin/sh/Makefile
@@ -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
@@ -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 <bsd.prog.mk>
diff --git a/bin/sh/dot.profile b/bin/sh/dot.profile
new file mode 100644
index 0000000000000..76ebfd5e61682
--- /dev/null
+++ b/bin/sh/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