On Thu, 2019-01-24 at 15:55 -0800, Rodney W. Grimes wrote:
> > Author: trasz
> > Date: Thu Jan 24 23:34:51 2019
> > New Revision: 343416
> > URL: https://svnweb.freebsd.org/changeset/base/343416
> > 
> > Log:
> >   Install .shrc for root, and set PS1 for the toor account.
> 
> And a dozen other aliases :-(
> Please do not contaiminate the prestine environment with
> personal preferences.  In the start of the project we
> did a great deal of work to remove and eliminate these
> types of things, only the few csh aliases where retained.
> 
> This is really the domain of a systems administrator to
> decide and making work for them to clean this out is
> not going to make them happy.
> 
> The commands in an ENV file well be executed by
> every single shell that is started, not just an
> interactive shell, unless I am mis reading the
> man page:
> If the environment variable ENV is set on
> entry to a shell, or is set in the .profile of a login shell, the
> shell
> then subjects its value to parameter expansion and arithmetic
> expansion
> and reads commands from the named file.
>    

I agree with all of tat. If the local sysadmin wants to make /bin/sh
friendly as an interactive shell, maybe we could provide some .sample
files to make that easy, but we SHOULD NOT put all this junk in by
default.

-- Ian

> >   Reviewed by:      jilles
> >   MFC after:        2 weeks
> >   Sponsored by:     DARPA, AFRL
> >   Differential Revision:    https://reviews.freebsd.org/D18872
> > 
> > Added:
> >   head/bin/sh/dot.shrc
> >      - copied unchanged from r343399, head/share/skel/dot.shrc
> > Modified:
> >   head/bin/sh/Makefile
> >   head/bin/sh/dot.profile
> > 
> > Modified: head/bin/sh/Makefile
> > ===================================================================
> > ===========
> > --- head/bin/sh/Makefile    Thu Jan 24 22:34:30 2019        (r343415)
> > +++ head/bin/sh/Makefile    Thu Jan 24 23:34:51 2019        (r343416)
> > @@ -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
> > 
> > Modified: head/bin/sh/dot.profile
> > ===================================================================
> > ===========
> > --- head/bin/sh/dot.profile Thu Jan 24 22:34:30 2019        (r343415)
> > +++ head/bin/sh/dot.profile Thu Jan 24 23:34:51 2019        (r343416)
> > @@ -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
> >  
> > 
> > Copied: head/bin/sh/dot.shrc (from r343399,
> > head/share/skel/dot.shrc)
> > ===================================================================
> > ===========
> > --- /dev/null       00:00:00 1970   (empty, because file is
> > newly added)
> > +++ head/bin/sh/dot.shrc    Thu Jan 24 23:34:51 2019        (r343416,
> > copy of r343399, head/share/skel/dot.shrc)
> > @@ -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
> > 
> > 
> 
> 

_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to