Install .shrc for root, and set PS1 for the toor account.

Reviewed by:	jilles
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D18872
This commit is contained in:
Edward Tomasz Napierala 2019-01-24 23:34:51 +00:00
parent aa4dd64dfe
commit 60315f8f9d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=343416
3 changed files with 48 additions and 3 deletions

View file

@ -3,9 +3,12 @@
.include <src.opts.mk>
CONFS= dot.profile profile
CONFSDIR_dot.profile= /root
CONFSNAME_dot.profile= .profile
CONFGROUPS= ETC ROOT
ETC= profile
ROOT= dot.shrc dot.profile
ROOTDIR= /root
ROOTNAME_dot.shrc= .shrc
ROOTNAME_dot.profile= .profile
PACKAGE=runtime
PROG= sh
INSTALLFLAGS= -S

View file

@ -9,6 +9,9 @@ export TERM
PAGER=less
export PAGER
# set ENV to a file invoked each time sh is started for interactive use.
ENV=$HOME/.shrc; export ENV
# Query terminal size; useful for serial lines.
if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi

39
bin/sh/dot.shrc Normal file
View file

@ -0,0 +1,39 @@
# $FreeBSD$
#
# .shrc - bourne shell startup file
#
# This file will be used if the shell is invoked for interactive use and
# the environment variable ENV is set to this file.
#
# see also sh(1), environ(7).
#
# file permissions: rwxr-xr-x
#
# umask 022
# Uncomment this to enable the builtin vi(1) command line editor in sh(1),
# e.g. ESC to go into visual mode.
# set -o vi
# some useful aliases
alias h='fc -l'
alias j=jobs
alias m="$PAGER"
alias ll='ls -laFo'
alias l='ls -l'
alias g='egrep -i'
# # be paranoid
# alias cp='cp -ip'
# alias mv='mv -i'
# alias rm='rm -i'
# set prompt: ``username@hostname:directory $ ''
PS1="\u@\h:\w \\$ "
# search path for cd(1)
# CDPATH=:$HOME