SUMMARY: tcsh and $REMOTEHOST

From: Todd Boss (boss@netcom.com)
Date: Tue May 09 2000 - 09:31:00 CDT


Orig Question:

> I have /bin/tcsh set as my login shell. Recently, without having made
> any changes to my ~.login or .cshrc i've been getting this error message
> upon login:
>
> SunOS 5.6
>
> login: tboss
> Password:
> Last login: Tue May 2 11:09:25 from client-141-156-6
> REMOTEHOST: Undefined variable.
>

Thanks to :
Fabrice Guerini fabrice@isharp.com
Dan Brown: brown@obscure.org
Matthew Stier: Matthew.Stier@tddny.fujitsu.com
David Evans: daevans@us.oracle.com
Imre Kolos: Imre.Kolos@eth.ericsson.se
Scott Yelich: scott@scottyelich.com
Casper Dik: Casper.Dik@holland.sun.com

When i do a strings on wtmpx and grep for my hostname, i notice
that, unlike other hostnames in this file (since according to Casper
this is where REMOTEHOST gets set) mine reads:
"&client-141-156-65-67.bellatlantic.net"

Now, you can make a variable assignment with the (&) ampersand
character, but not unless you enclose the entire hostname in
quotes. As you may imagine, if you just try to
set REMOTEHOST = &client-141-156-65-67.bellatlantic.net (without quotes)
the command fails. (Note; when i log in from a different hostname,
everything works just fine).

i'm guessing that the existance of this "&" character is causing the
REMOTEHOST assignment to fail, which then causes /etc/.login to fail,
which then prevents any of my startup scripts to execute. I don't really
have a fix...i've just created a hand-run startup script to manually
set this variable and then run all the tcsh startup scripts in order.

boss



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:07 CDT