[rancid] rivlogin buffer problem

David Stempien dave_stempien at urmc.rochester.edu
Mon Jan 15 19:52:47 UTC 2007


I am trying to run the "arp show all" command on an Enterasys ER16 using
the rivlogin command as follows:

rivlogin -c "arp show all" <ROUTER ADDR>

Note that I had to fix the rivlogin script to send the $enapasswd in the
do_enable procedure -- looks like a bug in the script was trying to send
the $userpswd as the enable password, thus giving me an authentication
failure.  But I digress...

Anyhow, in running the above command, everything starts running normally
in retrieving the ARP table from the router.  However, at some seemingly
random point in the output, I get a "Connection closed by foreign host"
and the output ends -- that is, prior to completing the display of the
ARP table.  The script finishes with an exit value of 0, confirming a
successful run.

I am experiencing what is an obvious buffering problem.  I've tried
adding a sleep statement in various spots throughout the script to try
to pause expect long enough to finish dumping the output buffer before
exiting.  Needless to say, I've been unsuccessful.

Might anyone have any words of wisdom in this matter?

Regards,

-- 
Dave Stempien, Network Security Engineer
University of Rochester Medical Center
Information Systems Division




More information about the Rancid-discuss mailing list