[rancid] Custom Device Login File (mrvlogin)

Keith Calligan Keith.Calligan at ptgcorp.com
Wed Jul 8 15:20:48 UTC 2009


Hi,

 

I'm trying to modify the existing mrvlogin script to work with MRV
terminal server devices.  It appears that this (original) script and
mrvrancid may have been written for another device by the same
manufacturer.  I've made some progress, but am having issues saving any
output and exiting completely.  

 

I'm issuing the following command

./mrvlogin -d -t 90 -c "show version" $devicename

 

Here is some debug information.  I'm showing the last line of the "show
version" and the parts that are failing.  The prompt for these devices
is set to "InReach:0 >".  The exit is getting sent, but I'm seeing lots
of empty lines trying to be matched ("").  Please note that I replaced
the real hostname with $device in this debug output.  

 

 

expect: set expect_out(buffer) " Software Version (Flash):
Software Version (Flash):
3.9.0

 Ppciboot Version:
3.9.0

InReach:0 >}

 

expect: does "" (spawn_id exp6) match regular expression "^[^\n\r
*]*InReach:0 ([^#>\r\n]+)?>(\([^)\r\n]+\))?"? no

"[\n\r]+"? no

exit

expect: does "exit" (spawn_id exp6) match regular expression "^[^\n\r
*]*InReach:0 ([^#>\r\n]+)?>(\([^)\r\n]+\))?"? no

"[\n\r]+"? no

 

Disconnected

 

expect: does "exit\u001b[H\u001b[2J\r\nDisconnected\r\n" (spawn_id exp6)
match regular expression "^[^\n\r *]*InReach:0
([^#>\r\n]+)?>(\([^)\r\n]+\))?"? no

"[\n\r]+"? yes

expect: set expect_out(0,string) "\r\n"

expect: set expect_out(spawn_id) "exp6"

expect: set expect_out(buffer) "exit\u001b[H\u001b[2J\r\n"

expect: continuing expect

 

expect: does "Disconnected\r\n" (spawn_id exp6) match regular expression
"^[^\n\r *]*InReach:0 ([^#>\r\n]+)?>(\([^)\r\n]+\))?"? no

"[\n\r]+"? yes

expect: set expect_out(0,string) "\r\n"

expect: set expect_out(spawn_id) "exp6"

expect: set expect_out(buffer) "Disconnected\r\n"

expect: continuing expect

 

expect: does "" (spawn_id exp6) match regular expression "^[^\n\r
*]*InReach:0 ([^#>\r\n]+)?>(\([^)\r\n]+\))?"? no

"[\n\r]+"? no

Connection to nmd-mgmt-jfk-tsrv1 closed.

 

expect: does "Connection to $device \r\r\n" (spawn_id exp6) match
regular expression "^[^\n\r *]*InReach:0
([^#>\r\n]+)?>(\([^)\r\n]+\))?"? no

"[\n\r]+"? yes

expect: set expect_out(0,string) "\r\r\n"

expect: set expect_out(spawn_id) "exp6"

expect: set expect_out(buffer) "Connection to nmd-mgmt-jfk-tsrv1
closed.\r\r\n"

expect: continuing expect

 

expect: does "" (spawn_id exp6) match regular expression "^[^\n\r
*]*InReach:0 ([^#>\r\n]+)?>(\([^)\r\n]+\))?"? no

"[\n\r]+"? no

expect: read eof

expect: set expect_out(spawn_id) "exp6"

expect: set expect_out(buffer) ""

write() failed to write anything - will sleep(1) and retry...

 

I'm still new to using Rancid so please bear with me.  If you need me to
send my mrvlogin script, I can do that as well.  I think I'm pretty
close to getting it working but not sure what I'm missing.  

 

 

Thanks,

 

Keith Calligan

keith.calligan at ptgcorp.com

 


---------------------------------------------
This e-mail, along with any documents, files or attachments, is confidential and may contain
legally privileged information, and is intended only for the use of the recipient(s) on 
the distribution.  If you are not the intended recipient(s), you are hereby notified that 
any dissemination, distribution or copying of any information contained in or attached 
to this communication is strictly prohibited; instructed to immediately notify the sender 
by return email or by a phone call to the sender; and required to delete this message from 
your computer and network.  
Note: e-mails are susceptible to corruption, interception and unauthorized amendment; 
we do not accept liability for any such changes, or for their consequences.  
We reserve the right to monitor all e-mails and their content.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20090708/0bfc381a/attachment.html 


More information about the Rancid-discuss mailing list