[comp.unix.questions] uucico chat script

rasmus@contact.uucp (Rasmus Lerdorf) (07/08/90)

Having recently upgraded from SunOS4.0.3 to 4.1 which included an upgrade
to HDB uucp, my uucico connection scripts no longer work.  Yes, I know
about the different format in the HDB version, and my script is correct
according to the manuals.  The problem is that a carriage return is not
sent at the end of text I send to the remote end.  

in:-BREAK-in: system word: password

Something as simple as the above does not do what I would expect.  No carriage
return is sent after I send the "system" string.  It does detect the Login:
prompt correctly and it sends "system" but then it just sits there and
eventually times out since no carriage return was sent.  

in:-BREAK-in: system\r word: password\r

Forcing a carriage return makes no difference.  It still isn't sent.  If I send
a newline charactr then it does go on to the password prompt, but I get an
invalid login.  The newline obviously adds some kind of garbage to the end
of the "system" string.  I have tried connecting with both Xenix and other
SunOS systems which all worked when I was running 4.0.3 so I am sure it
is a local problem.  I checked the parity, stop bit and word bit settings on
my serial port, and they were 8N1.  All these sites can log in fine on the 
modem in question so I don't think the serial port is configured incorrectly.
Where else do I look?
-- 
Rasmus Lerdorf | rasmus@contact.uucp (home) |  WC '94 Prediction:
  SD Eng '93   | rasmus@dmntor.uucp  (work) |  Denmark will take the Cup!

davidsen@antarctica.crd.GE.COM (william E Davidsen) (07/11/90)

In article <1990Jul7.173155.4583@contact.uucp>, rasmus@contact.uucp
(Rasmus Lerdorf) writes:

|> Forcing a carriage return makes no difference.  It still isn't sent. 
If I send
|> a newline charactr then it does go on to the password prompt, but I get an
|> invalid login.  The newline obviously adds some kind of garbage to the end
|> of the "system" string.  

  Let me take a guess at this. I suspect that the system you are calling
does not have CR to NL mapping set (stty icrnl) at login. HDB is sending
a CR at the end of the string. If you want to send a NL and no CR, you
use the form "string\n\c". You could also check with the sysadmin there.

  This is an educated guess from someone who has run uucp on a lot of
boxes. No promise that it's right. HDB works for me just fine on a
number of machines, and I've seen the behavior you mention with other
uucp flavors.