[5391] in testers
sun4 9.2.4: which
daemon@ATHENA.MIT.EDU (Arun A Tharuvai)
Fri May 16 16:00:11 2003
Message-Id: <200305162000.h4GK08Me020120@contents-vnder-pressvre.mit.edu>
To: testers@MIT.EDU
Cc: aatharuv@MIT.EDU
Date: Fri, 16 May 2003 16:00:08 -0400
From: Arun A Tharuvai <aatharuv@MIT.EDU>
System name: contents-vnder-pressvre.mit.edu
Type and version: Sun-Fire-280R 9.2.4 (with mkserv)
Display type: unknown
Shell: /bin/athena/bash
Window manager: unknown
Summary: $HOST isn't getting set in the global bashrc, causing which
(and possibly other programs) to fail for bash users.
What were you trying to do?
Run the which command, ie.
which from
What's wrong:
I got the error HOST undefined variable. Running it with the full path, i.e.
/usr/bin/which from
I got the same error.
Since which appears to be a csh script, I tried running it with
/bin/csh and /bin/athena/tcsh respectively. The latter worked.
aatharuv@contents-vnder-pressvre.mit.edu:/mit/aatharuv>/bin/csh -f /usr/bin/which from
HOST: Undefined variable
aatharuv@contents-vnder-pressvre.mit.edu:/mit/aatharuv>/bin/athena/tcsh -f /usr/bin/which from
/usr/athena/bin/from
What should have happened:
I should have gotten the result (as I did when testing using sipb0).
athena% which from
/usr/athena/bin/from
Looking at the global bashrc and cshrc, I noticed that $HOST isn't
getting set, so here's a quick, though untested, patch to the global
bashrc that should fix the problem
--- /usr/athena/lib/init/bashrc Tue May 6 21:55:26 2003
+++ bashrc Fri May 16 15:55:09 2003
@@ -19,6 +19,7 @@
export ENV_SET=t # Avoid unnecessary repeat
export HOSTTYPE="`/bin/athena/machtype`"
+ export HOST="`hostname`"
umask 077 # Strictly protect files
# (does not apply in AFS)