[indiana-discuss] Code review request

Roland Mainz roland.mainz at nrubsig.org
Thu Jan 31 21:30:08 PST 2008


Roland Mainz wrote:
> David.Comay at Sun.COM wrote:
[snip]
> > Understood about the separation but in this case, I want to limit the
> > changes to strictly the new user's bashrc file.  We'll later expand
> > this to include other shells via /etc/profile or ~/.profile if it's
> > deemed appropriate.
> 
> The problem is that that the *bashrc and *kshrc files are executed for
> each interactive shell. If anyone uses the ~/.bashrc in the patch you
> get some behaviour which user may not expect, e.g.
> -- snip --
> $ bash
> $ echo $PATH
> /usr/gnu/bin:/usr/bin:/usr/X11/bin:/usr/sbin:/sbin
> $ export PATH=/home/jack/mybins
> $ echo $PATH
> /home/jack/mybins
> $ bash
> $ echo $PATH
> /usr/gnu/bin:/usr/bin:/usr/X11/bin:/usr/sbin:/sbin
> $ exit
> $ echo $PATH
> /home/jack/mybins
> -- snip --
> ... e.g. each new bash instance will wallpaper over the PATH, MANPATH
> and PAGER environment variables, even if the user doesn't want that.

BTW: Another set of victims are things which set-up special paths for
their environment - a popular example is OS/Net's "bldenv" ...

IMO it may really be better to move { PATH, MANPATH, PAGER } to a
~/.profile file and the PS1 thing goes into ~/.bashrc

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)



More information about the indiana-discuss mailing list