rsh/rcp errors

rsh/rcp errors

Post by Paul S » Sat, 27 Mar 1993 08:52:23



I'm running SunOS 4.1.2.  When I try to do an rcp, I get this error:

rcp: protocol screwup: mtime.sec not delimited

Also, when I do rsh some_host 'some_command' I often get:

TERM: Undefined variable

Can someone please explain what's going on?  Thanks.
---
================================================================================
Paul A. Sue                                         Voice: (604) 279-6377/7975
CANADIAN AIRLINES INTERNATIONAL                     Fax:   (604) 279-2905/6379
3600 Lysander Lane, M/S: YVRL480

================================================================================

 
 
 

rsh/rcp errors

Post by Paul E. Carro » Sun, 28 Mar 1993 00:12:54



>I'm running SunOS 4.1.2.  When I try to do an rcp, I get this error:
>rcp: protocol screwup: mtime.sec not delimited
>Also, when I do rsh some_host 'some_command' I often get:
>TERM: Undefined variable
>Can someone please explain what's going on?  Thanks.
>---

I CAN!  I got there error for a couple of days.  The problem stems from
csh being a piece of crap.  :)

Somewhere in your .cshrc you are doing somethign with the TERM variable.
I would guess this is somethign liek what I am doing so that when you rlogin
the DISPLAY variable piggy-backs on TERM.
Well, TERM isn't passed when you rsh or rcp so you have an undefined
variable error.
Just look through your .cshrc and you'll find it.
The way to fix it?  Embed the code in a if then loop like this:

if ( $?TERM ) then
        if ( `echo $TERM | tr -cd '&'` != '' ) then
         setenv DISPLAY `echo $TERM | awk "-F&" '{print $2;}' `
         setenv TERM `echo $TERM | awk "-F&" '{print $1;}' `
        endif
endif

The important lines are the outer if-then loop.  They tell csh NOT to do
anything inside the loop if TERM doesn't exist.
This fixed my problem.

Hope I helped.

--
-Paul Carroll


-NSF Engineering Research Center for Computational Field Simulation