From terry at tmk.com Fri Feb 1 21:40:46 2002 From: terry at tmk.com (Terry Kennedy) Date: Fri, 01 Feb 2002 16:40:46 -0500 (EST) Subject: Minor fix for C5RSM reporting in RANCID Message-ID: <01KDRM5R9KGK0001NB@tmk.com> There is a typo in IOS for the C5RSM (RSP2 for the Catalyst 5x00). If you do a "show diag", you'll see: switch1-rsm#sh diag Slot 0: Physical slot 0, ~physical slot 0xF, logical slot 0, CBus 1 [snip] EEPROM format version 1 C5IP controler, HW rev 7.05, board revision B0 Serial number: 13354953 Part number: 73-2119-08 [snip] Note that "controller" is mis-spelled "controler". This causes RANCID to not match on the slot, giving a report like this: [snip] ! !Slot 0/: part 73-2119-08, serial 13354953 ! [snip] Applying the following patch to bin/rancid (note: your line numbers will probably be different): *** rancid_orig Thu Jan 17 15:41:36 2002 --- rancid Fri Feb 1 16:33:07 2002 *************** *** 573,579 **** } elsif (/^\s*Slot (\d+) \(virtual\):/i) { $slot = $1; next; ! } elsif (/^\s*(.*Processor.*|.*controller|.*Chassis Interface), HW rev (\S+), board revision (\S+)/i) { $board = $1; $hwver = $2; $boardrev = $3; --- 573,579 ---- } elsif (/^\s*Slot (\d+) \(virtual\):/i) { $slot = $1; next; ! } elsif (/^\s*(.*Processor.*|.*contro*ler|.*Chassis Interface), HW rev (\S+), board revision (\S+)/i) { $board = $1; $hwver = $2; $boardrev = $3; *************** *** 592,598 **** } elsif ($board =~ /ATM/) { $board = "AIP"; } ! } elsif ($board =~ /(.*) controller/i) { $board = $1; } # hwucode{$slot} defined in ShowContCbus --- 592,598 ---- } elsif ($board =~ /ATM/) { $board = "AIP"; } ! } elsif ($board =~ /(.*) contro*ler/i) { $board = $1; } # hwucode{$slot} defined in ShowContCbus fixes the output, and the same C5IP now shows up as: [snip] ! !Slot 0/C5IP: hvers 7.05 rev B0 ucode 20.22 !Slot 0/C5IP: software loaded from system !Slot 0/C5IP: part 73-2119-08, serial 13354953 ! [snip] Terry Kennedy http://www.tmk.com terry at tmk.com New York, NY USA From asp at partan.com Fri Feb 1 23:41:47 2002 From: asp at partan.com (Andrew Partan) Date: Fri, 1 Feb 2002 18:41:47 -0500 Subject: Minor fix for C5RSM reporting in RANCID In-Reply-To: <01KDRM5R9KGK0001NB@tmk.com>; from terry@tmk.com on Fri, Feb 01, 2002 at 04:40:46PM -0500 References: <01KDRM5R9KGK0001NB@tmk.com> Message-ID: <20020201184147.B2167@partan.com> On Fri, Feb 01, 2002 at 04:40:46PM -0500, Terry Kennedy wrote: > There is a typo in IOS for the C5RSM (RSP2 for the Catalyst 5x00). If you > do a "show diag", you'll see: What is the cisco bugid? What version(s) of s/w does this exist in? I don't really want to much rancid over for every little bug typo in every vendor's code, esp if this is for a limited set of versions. If the bug is wide-spread, then I could see perhaps doing it. --asp From terry at tmk.com Fri Feb 1 23:47:27 2002 From: terry at tmk.com (Terry Kennedy) Date: Fri, 01 Feb 2002 18:47:27 -0500 (EST) Subject: Minor fix for C5RSM reporting in RANCID In-Reply-To: "Your message dated Fri, 01 Feb 2002 18:41:47 -0500" <20020201184147.B2167@partan.com> References: <01KDRM5R9KGK0001NB@tmk.com> <"from terry"@tmk.com> Message-ID: <01KDRQY0BTIE0001U4@tmk.com> > On Fri, Feb 01, 2002 at 04:40:46PM -0500, Terry Kennedy wrote: > > There is a typo in IOS for the C5RSM (RSP2 for the Catalyst 5x00). If you > > do a "show diag", you'll see: > > What is the cisco bugid? What version(s) of s/w does this exist in? No bug ID (that I know of). A search of the bug toolkit for "controler" only shows some of the same typo in bug notes for unrelated problems. But since this would be a P5 (or lower) bug, it may not show up there. Similar- ly, it would probably be pretty low on the list to get fixed, and many of the releases it is present in are EOL anyway. I have verified it is present in: 11.2(18)P * 11.3(11)T * 12.0(9)W5-17 * 12.1(9) 12.2(6a) The above noted with "*" were done by downloading the image, uncompressing it, and searching for "controler". The ones without "*" were actually observed on a running C5RSM. Further, I looked in rsp-jsv-mz.122-7.bin (which doesn't run on the C5RSM!) and it even shows up there. > I don't really want to much rancid over for every little bug typo > in every vendor's code, esp if this is for a limited set of versions. > If the bug is wide-spread, then I could see perhaps doing it. I'd say that based on the above, it is pretty widespread - it looks like it is in every IOS ever built that includes C5IP device support, including some that don't even run on that hardware. Terry Kennedy http://www.tmk.com terry at tmk.com New York, NY USA From heas at shrubbery.net Sat Feb 2 22:54:34 2002 From: heas at shrubbery.net (john heasley) Date: Sat, 2 Feb 2002 14:54:34 -0800 Subject: Minor fix for C5RSM reporting in RANCID In-Reply-To: <01KDRM5R9KGK0001NB@tmk.com>; from terry@tmk.com on Fri, Feb 01, 2002 at 04:40:46PM -0500 References: <01KDRM5R9KGK0001NB@tmk.com> Message-ID: <20020202145434.I26871@shrubbery.net> i think you meant 'l?' in place of these 'o*'s Fri, Feb 01, 2002 at 04:40:46PM -0500, Terry Kennedy: > There is a typo in IOS for the C5RSM (RSP2 for the Catalyst 5x00). If you > do a "show diag", you'll see: > > switch1-rsm#sh diag > Slot 0: > Physical slot 0, ~physical slot 0xF, logical slot 0, CBus 1 > [snip] > EEPROM format version 1 > C5IP controler, HW rev 7.05, board revision B0 > Serial number: 13354953 Part number: 73-2119-08 > [snip] > > Note that "controller" is mis-spelled "controler". This causes RANCID to > not match on the slot, giving a report like this: > > [snip] > ! > !Slot 0/: part 73-2119-08, serial 13354953 > ! > [snip] > > Applying the following patch to bin/rancid (note: your line numbers > will probably be different): > > *** rancid_orig Thu Jan 17 15:41:36 2002 > --- rancid Fri Feb 1 16:33:07 2002 > *************** > *** 573,579 **** > } elsif (/^\s*Slot (\d+) \(virtual\):/i) { > $slot = $1; > next; > ! } elsif (/^\s*(.*Processor.*|.*controller|.*Chassis Interface), HW rev (\S+), board revision (\S+)/i) { > $board = $1; > $hwver = $2; > $boardrev = $3; > --- 573,579 ---- > } elsif (/^\s*Slot (\d+) \(virtual\):/i) { > $slot = $1; > next; > ! } elsif (/^\s*(.*Processor.*|.*contro*ler|.*Chassis Interface), HW rev (\S+), board revision (\S+)/i) { > $board = $1; > $hwver = $2; > $boardrev = $3; > *************** > *** 592,598 **** > } elsif ($board =~ /ATM/) { > $board = "AIP"; > } > ! } elsif ($board =~ /(.*) controller/i) { > $board = $1; > } > # hwucode{$slot} defined in ShowContCbus > --- 592,598 ---- > } elsif ($board =~ /ATM/) { > $board = "AIP"; > } > ! } elsif ($board =~ /(.*) contro*ler/i) { > $board = $1; > } > # hwucode{$slot} defined in ShowContCbus > > fixes the output, and the same C5IP now shows up as: > > [snip] > ! > !Slot 0/C5IP: hvers 7.05 rev B0 ucode 20.22 > !Slot 0/C5IP: software loaded from system > !Slot 0/C5IP: part 73-2119-08, serial 13354953 > ! > [snip] > > Terry Kennedy http://www.tmk.com > terry at tmk.com New York, NY USA From heas at shrubbery.net Mon Feb 4 22:33:40 2002 From: heas at shrubbery.net (john heasley) Date: Mon, 4 Feb 2002 14:33:40 -0800 Subject: Minor fix for C5RSM reporting in RANCID In-Reply-To: <20020202145434.I26871@shrubbery.net>; from heas@shrubbery.net on Sat, Feb 02, 2002 at 02:54:34PM -0800 References: <01KDRM5R9KGK0001NB@tmk.com> <20020202145434.I26871@shrubbery.net> Message-ID: <20020204143340.A12563@shrubbery.net> i do not have a ddts, but cisco will be generating one fore this bug. > Fri, Feb 01, 2002 at 04:40:46PM -0500, Terry Kennedy: > > There is a typo in IOS for the C5RSM (RSP2 for the Catalyst 5x00). If you > > do a "show diag", you'll see: > > > > switch1-rsm#sh diag > > Slot 0: > > Physical slot 0, ~physical slot 0xF, logical slot 0, CBus 1 > > [snip] > > EEPROM format version 1 > > C5IP controler, HW rev 7.05, board revision B0 > > Serial number: 13354953 Part number: 73-2119-08 > > [snip] > > > > Note that "controller" is mis-spelled "controler". This causes RANCID to > > not match on the slot, giving a report like this: > > > > [snip] > > ! > > !Slot 0/: part 73-2119-08, serial 13354953 > > ! > > [snip] > > From davidw at certaintysolutions.com Wed Feb 13 23:16:31 2002 From: davidw at certaintysolutions.com (David Williamson) Date: Wed, 13 Feb 2002 15:16:31 -0800 Subject: Trouble with alogin Message-ID: <20020213151631.E16177@tweety.main.gnac.com> Hey! I'm finally trying to get our Alteon's incorporated into rancid. When I run alogin against one of them, I get this output: ------------------------------------------------------------ [Main Menu] info - Information Menu stats - Statistics Menu cfg - Configuration Menu oper - Operations Command Menu boot - Boot Options Menu maint - Maintenance Menu diff - Show pending config changes [global command] apply - Apply pending config changes [global command] save - Save updated config to FLASH [global command] revert - Revert pending or applied changes [global command] exit - Exit [global command, always available] >> Main# expected boolean value but got "" while executing "if {[login $router $ruser $userpswd $passwd $prompt $cmethod $cyphertype]} { continue }" ("foreach" body line 59) invoked from within "foreach router [lrange $argv $i end] { set router [string tolower $router] send_user "$router\n" # Figure out prompt. set prompt ">> ..." (file "/home/rancid/bin/alogin" line 421) It successfully logs in, but then it seems to croak. Any ideas? I don't speak expect, so use small words. :) Thanks! -David -- David Williamson | "Wine is light, held Certainty Solutions, Inc. | together by water." davidw at certaintysolutions.com | -Galileo From heas at shrubbery.net Wed Feb 13 23:38:49 2002 From: heas at shrubbery.net (john heasley) Date: Wed, 13 Feb 2002 15:38:49 -0800 Subject: Trouble with alogin In-Reply-To: <20020213151631.E16177@tweety.main.gnac.com>; from davidw@certaintysolutions.com on Wed, Feb 13, 2002 at 03:16:31PM -0800 References: <20020213151631.E16177@tweety.main.gnac.com> Message-ID: <20020213153849.K1176@shrubbery.net> Wed, Feb 13, 2002 at 03:16:31PM -0800, David Williamson: > Hey! > > I'm finally trying to get our Alteon's incorporated into rancid. > When I run alogin against one of them, I get this output: > > ------------------------------------------------------------ > [Main Menu] > info - Information Menu > stats - Statistics Menu > cfg - Configuration Menu > oper - Operations Command Menu > boot - Boot Options Menu > maint - Maintenance Menu > diff - Show pending config changes [global command] > apply - Apply pending config changes [global command] > save - Save updated config to FLASH [global command] > revert - Revert pending or applied changes [global command] > exit - Exit [global command, always available] > > >> Main# expected boolean value but got "" > while executing > "if {[login $router $ruser $userpswd $passwd $prompt $cmethod $cyphertype]} { > continue > }" > ("foreach" body line 59) > invoked from within > "foreach router [lrange $argv $i end] { > set router [string tolower $router] > send_user "$router\n" > > # Figure out prompt. > set prompt ">> ..." > (file "/home/rancid/bin/alogin" line 421) > > It successfully logs in, but then it seems to croak. Any ideas? I don't i suspect that there is a return statement in the login procedure that doesnt return a number value or it's an implicit return perhaps due to an empty $cmethod variable. what version of rancid? > speak expect, so use small words. :) do more crack. that'l help you understand expect. From davidw at certaintysolutions.com Thu Feb 14 00:51:24 2002 From: davidw at certaintysolutions.com (David Williamson) Date: Wed, 13 Feb 2002 16:51:24 -0800 Subject: Trouble with alogin In-Reply-To: <20020213153849.K1176@shrubbery.net>; from heas@shrubbery.net on Wed, Feb 13, 2002 at 03:38:49PM -0800 References: <20020213151631.E16177@tweety.main.gnac.com> <20020213153849.K1176@shrubbery.net> Message-ID: <20020213165123.G16177@tweety.main.gnac.com> On Wed, Feb 13, 2002 at 03:38:49PM -0800, john heasley wrote: > i suspect that there is a return statement in the login procedure that > doesnt return a number value or it's an implicit return perhaps due to > an empty $cmethod variable. > > what version of rancid? 2.2. Downloaded it today. Hmm... -David -- David Williamson | "Wine is light, held Certainty Solutions, Inc. | together by water." davidw at certaintysolutions.com | -Galileo From heas at shrubbery.net Thu Feb 14 01:05:15 2002 From: heas at shrubbery.net (john heasley) Date: Wed, 13 Feb 2002 17:05:15 -0800 Subject: Trouble with alogin In-Reply-To: <20020213165123.G16177@tweety.main.gnac.com>; from davidw@certaintysolutions.com on Wed, Feb 13, 2002 at 04:51:24PM -0800 References: <20020213151631.E16177@tweety.main.gnac.com> <20020213153849.K1176@shrubbery.net> <20020213165123.G16177@tweety.main.gnac.com> Message-ID: <20020213170515.P1176@shrubbery.net> Wed, Feb 13, 2002 at 04:51:24PM -0800, David Williamson: > On Wed, Feb 13, 2002 at 03:38:49PM -0800, john heasley wrote: > > i suspect that there is a return statement in the login procedure that > > doesnt return a number value or it's an implicit return perhaps due to > > an empty $cmethod variable. > > > > what version of rancid? > > 2.2. Downloaded it today. Hmm... > > -David try the attached patch cd rancid-2.2/bin patch < file if it fixes the problem expect bomb-out, then i;m slightly confused as to how it manages to login but ends up here. -------------- next part -------------- *** alogin.in.FCS Sat Dec 8 01:04:37 2001 --- alogin.in Thu Feb 14 00:59:29 2002 *************** *** 365,371 **** } set in_proc 0 return 0 ! } } # Run commands given on the command line. --- 365,372 ---- } set in_proc 0 return 0 ! } ! return 1 } # Run commands given on the command line. From davidw at certaintysolutions.com Thu Feb 14 01:18:36 2002 From: davidw at certaintysolutions.com (David Williamson) Date: Wed, 13 Feb 2002 17:18:36 -0800 Subject: Trouble with alogin In-Reply-To: <20020213170515.P1176@shrubbery.net>; from heas@shrubbery.net on Wed, Feb 13, 2002 at 05:05:15PM -0800 References: <20020213151631.E16177@tweety.main.gnac.com> <20020213153849.K1176@shrubbery.net> <20020213165123.G16177@tweety.main.gnac.com> <20020213170515.P1176@shrubbery.net> Message-ID: <20020213171836.H16177@tweety.main.gnac.com> On Wed, Feb 13, 2002 at 05:05:15PM -0800, john heasley wrote: > try the attached patch > > cd rancid-2.2/bin > patch < file > > if it fixes the problem expect bomb-out, then i;m slightly confused as to > how it manages to login but ends up here. It no longer gives the error, but it doesn't stay logged in: revert - Revert pending or applied changes [global command] exit - Exit [global command, always available] >> Main# bash-2.02$ bash-2.02$ That doesn't seem good, since you can't go on to execute commands. By the way, the switch is running WebOS 9.0.38-SSH. Don't know if that will matter. Oh, and I'm not using ssh to get to it...just telnet. My .cloginrc is pretty simple...it just has 'add password '. Nothing exciting there. -David From heas at shrubbery.net Thu Feb 14 16:41:31 2002 From: heas at shrubbery.net (john heasley) Date: Thu, 14 Feb 2002 08:41:31 -0800 Subject: Trouble with alogin In-Reply-To: <20020213214407.L16177@tweety.main.gnac.com>; from davidw@certaintysolutions.com on Wed, Feb 13, 2002 at 09:44:07PM -0800 References: <20020213151631.E16177@tweety.main.gnac.com> <20020213153849.K1176@shrubbery.net> <20020213165123.G16177@tweety.main.gnac.com> <20020213170515.P1176@shrubbery.net> <20020213171836.H16177@tweety.main.gnac.com> <20020213173005.Q1176@shrubbery.net> <20020213214407.L16177@tweety.main.gnac.com> Message-ID: <20020214084131.G7276@shrubbery.net> Wed, Feb 13, 2002 at 09:44:07PM -0800, David Williamson: > On Wed, Feb 13, 2002 at 05:30:05PM -0800, john heasley wrote: > > i think i see...that patch i sent should have been 'return 0' for > > line 369. we see the prompt, break out of the loop. so, if you > > mv alogin.in.FCS to alogin.in (ie: start over) and apply the > > attached patch, i think that'l do it. > > That does the trick. When I run alogin by hand, I get onto the box, and > then I sit there, waiting for the next input. That sounds about right. > > Oh, and do-diffs now works correctly. Whee! > > Thanks very much! > > -David thanks. patch is appended for the edification of other lurkers. -------------- next part -------------- *** alogin.in.FCS Sat Dec 8 01:04:37 2001 --- alogin.in Thu Feb 14 01:28:44 2002 *************** *** 363,371 **** } "\r\n" { exp_continue; } } set in_proc 0 return 0 - } } # Run commands given on the command line. --- 363,371 ---- } "\r\n" { exp_continue; } } + } set in_proc 0 return 0 } # Run commands given on the command line. From pbelang1 at oss.cantel.rogers.com Thu Feb 14 18:10:40 2002 From: pbelang1 at oss.cantel.rogers.com (Pierre Belanger) Date: Thu, 14 Feb 2002 13:10:40 -0500 Subject: Extreme empty files, Bug Found??? Message-ID: <3C6BFDA0.F4354C41@oss.cantel.rogers.com> Hi all, I posted a message a few weeks ago about Extreme configuration "empty" file submitted once and a while in the CVS. Check my telnet session on an Extreme switch. $ telnet ny50ext003 {snip} * NY50EXT003:1 # exit Do you wish to save your configuration changes? (y/n) nConnection closed According to clogin line 545 (latest version) : expect { "Do you wish to save your configuration changes" { send "n\r" exp_continue } "\n" { exp_continue } timeout { return 0 } eof { return 0 } } If the above code works great, what about the following code from xrancid: if (/$prompt\s?(quit|exit|Connection closed)/ && $found_end) { $clean_run=1; last; } Correct me if I am wrong, I am ok in Expect but I am not a Perl guru. The above will be true if the script finds the prompt with a space and quit or exit or Connection closed ... on the same line, right? If this is true, my previous telnet session is showing : Do you wish to save your configuration changes? (y/n) nConnection closed There's no match with the previous if condition, right? Thank you for your support and help! Pierre B. From heas at shrubbery.net Thu Feb 14 18:37:39 2002 From: heas at shrubbery.net (john heasley) Date: Thu, 14 Feb 2002 10:37:39 -0800 Subject: Extreme empty files, Bug Found??? In-Reply-To: <3C6BFDA0.F4354C41@oss.cantel.rogers.com>; from pbelang1@oss.cantel.rogers.com on Thu, Feb 14, 2002 at 01:10:40PM -0500 References: <3C6BFDA0.F4354C41@oss.cantel.rogers.com> Message-ID: <20020214103739.Q7276@shrubbery.net> Thu, Feb 14, 2002 at 01:10:40PM -0500, Pierre Belanger: > Hi all, > > I posted a message a few weeks ago about Extreme configuration "empty" > file submitted once and a while in the CVS. Check my telnet session on > an Extreme switch. > > $ telnet ny50ext003 > {snip} > * NY50EXT003:1 # exit > Do you wish to save your configuration changes? (y/n) nConnection > closed > > According to clogin line 545 (latest version) : > > expect { > "Do you wish to save your configuration changes" { > send "n\r" > exp_continue > } > "\n" { exp_continue } > timeout { return 0 } > eof { return 0 } > } > > > If the above code works great, what about the following code from > xrancid: > > if (/$prompt\s?(quit|exit|Connection closed)/ && $found_end) { > $clean_run=1; > last; > } > > Correct me if I am wrong, I am ok in Expect but I am not a Perl guru. > The above will be true if the script finds the prompt with a space > and quit or exit or Connection closed ... on the same line, right? > > If this is true, my previous telnet session is showing : > > Do you wish to save your configuration changes? (y/n) nConnection > closed > > There's no match with the previous if condition, right? my guess is that the connection is being broken occassionally not at the end. among the problems with the extreme UI, is that 1) it doesnt always echo the 'exit' or the following return, hence the match of 'connection closed' 2) sometimes exit is echo'd back as quit (or was it the other way around?). you could try changing that line in perl. that should fix the premature connection closed being interpretted as a successful collection: if (/$prompt\s?(quit|exit)/ && $found_end) { i havent tested this. a hack is probably needed. From ronald.seguin at bellnexxia.com Sat Feb 16 18:03:42 2002 From: ronald.seguin at bellnexxia.com (Seguin, Ron) Date: Sat, 16 Feb 2002 13:03:42 -0500 Subject: Mulitple .cloginrc entries Message-ID: <3C6E9EFE.3AF7B979@bellnexxia.com> Hi, I currently have a user/pass within .cloginrc in the Rancid home directory...works fine for Cisco devices, however I have a number of Redbacks that I want to introduce that does not have the same user/pass combo... Can we somehow have multiple .cloginrc's being accessed based upon Vendor type?? --thanks From heas at shrubbery.net Sat Feb 16 18:16:46 2002 From: heas at shrubbery.net (john heasley) Date: Sat, 16 Feb 2002 10:16:46 -0800 Subject: Mulitple .cloginrc entries In-Reply-To: <3C6E9EFE.3AF7B979@bellnexxia.com>; from ronald.seguin@bellnexxia.com on Sat, Feb 16, 2002 at 01:03:42PM -0500 References: <3C6E9EFE.3AF7B979@bellnexxia.com> Message-ID: <20020216101645.C20424@shrubbery.net> Sat, Feb 16, 2002 at 01:03:42PM -0500, Seguin, Ron: > Hi, > > I currently have a user/pass within .cloginrc in the Rancid home directory...works > fine for Cisco devices, however I have a number of Redbacks that I want to > introduce that does not have the same user/pass combo... > > Can we somehow have multiple .cloginrc's being accessed based upon Vendor type?? > > --thanks > echo "add password * {redbackpwd}" > ~/.cloginrc.rb clogin -f ~/.cloginrc.rb redbackhostname or alias the command. there are no knobs within clogin to do selection based on manufacturer or platform nor does it consider the router.db file which has that data. the most convenient way imo is via dns; redback -> nas0.city router -> r0.city switch -> s0.city echo "add password nas* {redbackpwd}" >> ~/.cloginrc From asp at partan.com Sat Feb 16 19:22:12 2002 From: asp at partan.com (Andrew Partan) Date: Sat, 16 Feb 2002 14:22:12 -0500 Subject: Mulitple .cloginrc entries In-Reply-To: <3C6E9EFE.3AF7B979@bellnexxia.com>; from ronald.seguin@bellnexxia.com on Sat, Feb 16, 2002 at 01:03:42PM -0500 References: <3C6E9EFE.3AF7B979@bellnexxia.com> Message-ID: <20020216142211.A2619@partan.com> On Sat, Feb 16, 2002 at 01:03:42PM -0500, Seguin, Ron wrote: > I currently have a user/pass within .cloginrc in the Rancid home > directory...works fine for Cisco devices, however I have a number > of Redbacks that I want to introduce that does not have the same > user/pass combo... Do it by name of device. e.g.: add password cisco* {x} {y} add password red* {z} {tt} or whatever names you are using. --asp From ronald.seguin at bellnexxia.com Sat Feb 16 23:26:42 2002 From: ronald.seguin at bellnexxia.com (Seguin, Ron) Date: Sat, 16 Feb 2002 18:26:42 -0500 Subject: RANCID on Redbacks Message-ID: <3C6EEAB2.C8F86B33@bellnexxia.com> Has anyone encountered 'hanging' when running Rancid on Redbacks?? I'm running.... Linux kramer 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown expect version 5.31.7 Rancid 2.1 From asr at latency.net Tue Feb 26 05:24:33 2002 From: asr at latency.net (Adam Rothschild) Date: Tue, 26 Feb 2002 00:24:33 -0500 Subject: Using clogin to push multi-line banner motd's? Message-ID: <20020226002433.A6414@og.latency.net> Hi, Forgive me for asking something whacky, bordering on outright stupid, but this seems like the appropriate forum. I've been using rancid's clogin as a mechanism for pushing out config policy changes to IOS-speaking devices automagically, and I have a feeling others are doing the same. One small stumbling block I've come across is, I'd like to be able to push out multi-line banner motd's, eg: crisco1.lab(config)#banner motd ^ Enter TEXT message. End with the character '^'. line 1 blah blah line 2 blah blah line 2 blah blah [...] ^ crisco1.lab(config)# So, I run 'clogin -x [command sequence] [device]'... spawn telnet crisco1.lab [...] User Access Verification Username: rancid Password: crisco1.lab>enable Password: crisco1.lab#term length crisco1.lab#conf t Enter configuration commands, one per line. End with CNTL/Z. crisco1.lab(config)#no banner motd crisco1.lab(config)#banner motd ^ Enter TEXT message. End with the character '^'. [hangs] Don't get me wrong, I realize this is the correct behavior, as clogin's not seeing the prompt it's expecting. Question is, what work-arounds for this particular issue are there, short of sticking with one-line banner motd's, or pushing out the config snippets by some other means? For bonus points, has anyone written a patch to get clogin to behave as I want it to, by any chance? :-) Thanks in advance, -adam From heas at shrubbery.net Tue Feb 26 22:32:26 2002 From: heas at shrubbery.net (john heasley) Date: Tue, 26 Feb 2002 14:32:26 -0800 Subject: Using clogin to push multi-line banner motd's? In-Reply-To: <20020226002433.A6414@og.latency.net>; from asr@latency.net on Tue, Feb 26, 2002 at 12:24:33AM -0500 References: <20020226002433.A6414@og.latency.net> Message-ID: <20020226143226.A14964@shrubbery.net> Tue, Feb 26, 2002 at 12:24:33AM -0500, Adam Rothschild: > Hi, > > Forgive me for asking something whacky, bordering on outright stupid, > but this seems like the appropriate forum. > > I've been using rancid's clogin as a mechanism for pushing out config > policy changes to IOS-speaking devices automagically, and I have a > feeling others are doing the same. > > One small stumbling block I've come across is, I'd like to be able to > push out multi-line banner motd's, eg: > > crisco1.lab(config)#banner motd ^ > Enter TEXT message. End with the character '^'. > line 1 blah blah > line 2 blah blah > line 2 blah blah > [...] > ^ > crisco1.lab(config)# > > So, I run 'clogin -x [command sequence] [device]'... > > spawn telnet crisco1.lab > [...] > > User Access Verification > > Username: rancid > Password: > > crisco1.lab>enable > Password: > crisco1.lab#term length > crisco1.lab#conf t > Enter configuration commands, one per line. End with CNTL/Z. > crisco1.lab(config)#no banner motd > crisco1.lab(config)#banner motd ^ > Enter TEXT message. End with the character '^'. > > [hangs] > > Don't get me wrong, I realize this is the correct behavior, as > clogin's not seeing the prompt it's expecting. Question is, what > work-arounds for this particular issue are there, short of sticking > with one-line banner motd's, or pushing out the config snippets by > some other means? you could use -s and rancid-*/util/*.exp as a template. you could also try embedding \n's in the input. i presume expect's send() will recursively evaluate it's argument and expand the \n, but do not know for sure. > For bonus points, has anyone written a patch to get clogin to behave > as I want it to, by any chance? :-) > > Thanks in advance, > -adam From asp at partan.com Tue Feb 26 22:58:45 2002 From: asp at partan.com (Andrew Partan) Date: Tue, 26 Feb 2002 17:58:45 -0500 Subject: Using clogin to push multi-line banner motd's? In-Reply-To: <20020226002433.A6414@og.latency.net>; from asr@latency.net on Tue, Feb 26, 2002 at 12:24:33AM -0500 References: <20020226002433.A6414@og.latency.net> Message-ID: <20020226175845.A26531@partan.com> On Tue, Feb 26, 2002 at 12:24:33AM -0500, Adam Rothschild wrote: > One small stumbling block I've come across is, I'd like to be able to > push out multi-line banner motd's, eg: I've done config changes by putting the new config bits into a file on my tftp/rcp/ftp// server and then telling the router: copy URL running Works quite well. --asp