[26147] in Athena Bugs

home help back first fref pref prev next nref lref last post

Re: $initdir scripts

daemon@ATHENA.MIT.EDU (Greg Hudson)
Fri Oct 22 14:31:25 2004

From: Greg Hudson <ghudson@mit.edu>
To: Jacob Morzinski <jmorzins@mit.edu>
In-Reply-To: <Pine.LNX.4.58L.0410212153570.22618@milquetoast.mit.edu>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Message-Id: <1098469722.13060.174.camel@egyptian-gods.mit.edu>
Mime-Version: 1.0
Date: Fri, 22 Oct 2004 14:28:43 -0400
cc: bugs@mit.edu
Errors-To: bugs-bounces@mit.edu

On Thu, 2004-10-21 at 22:45, Jacob Morzinski wrote:
> The cshrc has a misleading comment at the point where it resets
> the HOME variable.  The comment suggests that HOME is being reset
> to a short, /mit/<user> path.  This hasn't been true for as long
> as I can remember.  Removed the misleading part of the comment.

You misunderstand this comment (which may mean that it's not worded
well).  The idea is that when the tcsh prompt or emacs is displaying a
path, it will know to reduce /afs/athena.mit.edu/user/x/y/xyz to ~.

> The cshrc's alias for "term" sets noglob but does not unset it.
> Fixed by appending an "unset noglob" to the alias.

tset takes care of this, although why we set noglob in the first place,
I'm not sure.

> The bash_login should only source ~/.bashrc if the file exists.
> This imitates csh more faithfully, and avoids needless error messages.
> Fixed by adding a "-r" test for the file.

I think using our bash_login without using our bashrc deserves an error
message, actually.  I imagine it doesn't work very well.

> The bash_login script sets the variables ATHENA_LOGIN_SESSION and
> initdir in a different order from how they are set in the login
> script.  The out-of-order commands makes file comparisons
> difficult.  To make file comparisons easier in the future,
> changed the order of the variables to match the login script.

I don't consider this a sufficiently compelling reason for a change.

> The bash_login comment that explains how to use skip_tty_startup
> gives csh-style instructions for the ~/.bash_environment, which
> will not work.  Fixed to give bash-style instructions.

Agreed.

> The bash_login script runs "get_message -login", but the
> login script runs "get_message -new -login".  Changed the
> bash_login to include "-new" in the get_message args.

Agreed.

> The bash_login comment that explains how to use skip_lert gives
> csh-style instructions for the ~/.bash_environment, which will
> not work.  Fixed to give bash-style instructions.

Agreed.

> Fixed by changing ${ENV_SET:+set} to just ${ENV_SET+set} .

Hm.  I hope the tcsh dotfiles set up all the environment stuff expected
by the bash ones, then.  But I can see the problems with the current
approach.

> The bashrc script sets the coredumpsize to unlimited, but the
> cshrc script set the coredumpsize to zero.  Changed the bashrc to
> set coredumpsize to zero.

Agreed.

> The bashrc script sets and exports a LD_LIBRARY_PATH variable,
> but the cshrc script does not.  Deleted the variable from the
> bashrc script.

Agreed.

> The bashrc script sets the bindir variable in just one place, but
> the cshrc script sets bindir in two places.  Fixed the bashrc to
> set bindir in two places, like the cshrc.

The string "bindir" does not appear in bashrc.  It's a deprecated
variable in cshrc, and we deliberately didn't propagate it.

> The bashrc script sets XFILESEARCHPATH, but the cshrc script does
> not set the variable.  Fixed by deleting the variable from the bashrc.

Agreed.

I will prune your patch and submit it for inclusion in the next patch
release, since the bashrc ENV_SET problem does seem like a moderately
big deal now that we're including bash dotfiles in new homedirs by
default.


home help back first fref pref prev next nref lref last post