From owner-rancid-discuss@shrubbery.net Fri Feb 1 21:51:13 2002 Received: from guelah.shrubbery.net (guelah.shrubbery.net [198.58.5.1]) by ni.shrubbery.net (8.11.6/8.11.1) with ESMTP id g11LpDF26257 for ; Fri, 1 Feb 2002 21:51:13 GMT Received: by guelah.shrubbery.net (8.11.6/8.11.1) id g11Lm2Y22661 for rancid-discuss-outgoing; Fri, 1 Feb 2002 21:48:03 GMT Received: from server.tmk.com (SYSTEM@server.tmk.com [204.141.35.63]) by guelah.shrubbery.net (8.11.6/8.11.1) with ESMTP id g11Llwa22654; Fri, 1 Feb 2002 21:47:58 GMT Received: from tmk.com by tmk.com (PMDF V6.1 #37010) id <01KDRLV0JPTS0001NB@tmk.com>; Fri, 01 Feb 2002 16:47:50 -0500 (EST) Date: Fri, 01 Feb 2002 16:40:46 -0500 (EST) From: Terry Kennedy Subject: Minor fix for C5RSM reporting in RANCID To: heas@shrubbery.net Cc: rancid-discuss@shrubbery.net Message-id: <01KDRM5R9KGK0001NB@tmk.com> MIME-version: 1.0 Content-type: TEXT/PLAIN; CHARSET=us-ascii Sender: owner-rancid-discuss@shrubbery.net Precedence: bulk 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@tmk.com New York, NY USA From owner-rancid-discuss@shrubbery.net Fri Feb 1 23:42:23 2002 Received: from guelah.shrubbery.net (guelah.shrubbery.net [198.58.5.1]) by ni.shrubbery.net (8.11.6/8.11.1) with ESMTP id g11NgNF28059 for ; Fri, 1 Feb 2002 23:42:23 GMT Received: by guelah.shrubbery.net (8.11.6/8.11.1) id g11NfrN23085 for rancid-discuss-outgoing; Fri, 1 Feb 2002 23:41:53 GMT Received: from tower.partan.com (tower.partan.com [198.6.255.248]) by guelah.shrubbery.net (8.11.6/8.11.1) with ESMTP id g11Nfma23081 for ; Fri, 1 Feb 2002 23:41:48 GMT Received: (from asp@localhost) by tower.partan.com (8.9.3/8.9.3) id SAA02225; Fri, 1 Feb 2002 18:41:47 -0500 (EST) Date: Fri, 1 Feb 2002 18:41:47 -0500 From: Andrew Partan To: Terry Kennedy Cc: rancid-discuss@shrubbery.net Subject: Re: Minor fix for C5RSM reporting in RANCID Message-ID: <20020201184147.B2167@partan.com> References: <01KDRM5R9KGK0001NB@tmk.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <01KDRM5R9KGK0001NB@tmk.com>; from terry@tmk.com on Fri, Feb 01, 2002 at 04:40:46PM -0500 Sender: owner-rancid-discuss@shrubbery.net Precedence: bulk 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 owner-rancid-discuss@shrubbery.net Sat Feb 2 00:05:25 2002 Received: from guelah.shrubbery.net (guelah.shrubbery.net [198.58.5.1]) by ni.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1205PF28291 for ; Sat, 2 Feb 2002 00:05:25 GMT Received: by guelah.shrubbery.net (8.11.6/8.11.1) id g1205FN23169 for rancid-discuss-outgoing; Sat, 2 Feb 2002 00:05:15 GMT Received: from server.tmk.com (SYSTEM@server.tmk.com [204.141.35.63]) by guelah.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1205Ba23165 for ; Sat, 2 Feb 2002 00:05:11 GMT Received: from tmk.com by tmk.com (PMDF V6.1 #37010) id <01KDRNLYX0C00001U4@tmk.com> for rancid-discuss@shrubbery.net; Fri, 01 Feb 2002 19:05:09 -0500 (EST) Date: Fri, 01 Feb 2002 18:47:27 -0500 (EST) From: Terry Kennedy Subject: Re: 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> To: Andrew Partan Cc: rancid-discuss@shrubbery.net Message-id: <01KDRQY0BTIE0001U4@tmk.com> MIME-version: 1.0 Content-type: TEXT/PLAIN; CHARSET=us-ascii References: <01KDRM5R9KGK0001NB@tmk.com> <"from terry"@tmk.com> Sender: owner-rancid-discuss@shrubbery.net Precedence: bulk > 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@tmk.com New York, NY USA From owner-rancid-discuss@shrubbery.net Sat Feb 2 22:56:17 2002 Received: from guelah.shrubbery.net (guelah.shrubbery.net [198.58.5.1]) by ni.shrubbery.net (8.11.6/8.11.1) with ESMTP id g12MuHF20864 for ; Sat, 2 Feb 2002 22:56:17 GMT Received: by guelah.shrubbery.net (8.11.6/8.11.1) id g12Mse127731 for rancid-discuss-outgoing; Sat, 2 Feb 2002 22:54:40 GMT Received: (from heas@localhost) by guelah.shrubbery.net (8.11.6/8.11.1) id g12MsY827723; Sat, 2 Feb 2002 22:54:34 GMT Date: Sat, 2 Feb 2002 14:54:34 -0800 From: john heasley To: Terry Kennedy Cc: heas@shrubbery.net, rancid-discuss@shrubbery.net Subject: Re: Minor fix for C5RSM reporting in RANCID Message-ID: <20020202145434.I26871@shrubbery.net> References: <01KDRM5R9KGK0001NB@tmk.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <01KDRM5R9KGK0001NB@tmk.com>; from terry@tmk.com on Fri, Feb 01, 2002 at 04:40:46PM -0500 X-note: live free, or die! X-homer: mmmm, forbidden doughnut. Sender: owner-rancid-discuss@shrubbery.net Precedence: bulk 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@tmk.com New York, NY USA From owner-rancid-discuss@shrubbery.net Mon Feb 4 22:35:56 2002 Received: from guelah.shrubbery.net (guelah.shrubbery.net [198.58.5.1]) by ni.shrubbery.net (8.11.6/8.11.1) with ESMTP id g14MZu302310 for ; Mon, 4 Feb 2002 22:35:56 GMT Received: by guelah.shrubbery.net (8.11.6/8.11.1) id g14MXka17194 for rancid-discuss-outgoing; Mon, 4 Feb 2002 22:33:46 GMT Received: (from heas@localhost) by guelah.shrubbery.net (8.11.6/8.11.1) id g14MXfU17182; Mon, 4 Feb 2002 22:33:41 GMT Date: Mon, 4 Feb 2002 14:33:40 -0800 From: john heasley To: Terry Kennedy Cc: rancid-discuss@shrubbery.net Subject: Re: Minor fix for C5RSM reporting in RANCID Message-ID: <20020204143340.A12563@shrubbery.net> References: <01KDRM5R9KGK0001NB@tmk.com> <20020202145434.I26871@shrubbery.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020202145434.I26871@shrubbery.net>; from heas@shrubbery.net on Sat, Feb 02, 2002 at 02:54:34PM -0800 X-note: live free, or die! X-homer: mmmm, forbidden doughnut. Sender: owner-rancid-discuss@shrubbery.net Precedence: bulk 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 owner-rancid-discuss@shrubbery.net Wed Feb 13 23:19:35 2002 Received: from guelah.shrubbery.net (guelah.shrubbery.net [198.58.5.1]) by ni.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1DNJZ315082 for ; Wed, 13 Feb 2002 23:19:35 GMT Received: by guelah.shrubbery.net (8.11.6/8.11.1) id g1DNGlZ03545 for rancid-discuss-outgoing; Wed, 13 Feb 2002 23:16:47 GMT Received: from yosemite.rwc.gnac.net (yosemite.rwc.gnac.net [198.151.248.221]) by guelah.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1DNGia03541 for ; Wed, 13 Feb 2002 23:16:44 GMT Received: by yosemite.rwc.gnac.net; id PAA29857; Wed, 13 Feb 2002 15:16:43 -0800 (PST) Received: from unknown(192.168.1.21) by yosemite.rwc.gnac.net via smap (V5.0) id xma029063; Wed, 13 Feb 02 15:16:32 -0800 Received: from tweety.main.gnac.com (localhost.main.gnac.com [127.0.0.1]) by pepe.corp.gnac.com (8.11.0/8.8.7/GNAC-GW-2.1) with ESMTP id g1DNGKp18677 for ; Wed, 13 Feb 2002 15:16:20 -0800 (PST) Received: (from davidw@localhost) by tweety.main.gnac.com (8.9.3/8.7.3/GNAC-COM-1.1) id PAA17626 for rancid-discuss@shrubbery.net; Wed, 13 Feb 2002 15:16:31 -0800 (PST) Date: Wed, 13 Feb 2002 15:16:31 -0800 From: David Williamson To: rancid-discuss@shrubbery.net Subject: Trouble with alogin Message-ID: <20020213151631.E16177@tweety.main.gnac.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i Sender: owner-rancid-discuss@shrubbery.net Precedence: bulk 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@certaintysolutions.com | -Galileo From owner-rancid-discuss@shrubbery.net Wed Feb 13 23:38:56 2002 Received: from guelah.shrubbery.net (guelah.shrubbery.net [198.58.5.1]) by ni.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1DNcu315825 for ; Wed, 13 Feb 2002 23:38:56 GMT Received: by guelah.shrubbery.net (8.11.6/8.11.1) id g1DNcrN03741 for rancid-discuss-outgoing; Wed, 13 Feb 2002 23:38:53 GMT Received: (from heas@localhost) by guelah.shrubbery.net (8.11.6/8.11.1) id g1DNcoB03736; Wed, 13 Feb 2002 23:38:50 GMT Date: Wed, 13 Feb 2002 15:38:49 -0800 From: john heasley To: David Williamson Cc: rancid-discuss@shrubbery.net Subject: Re: Trouble with alogin Message-ID: <20020213153849.K1176@shrubbery.net> References: <20020213151631.E16177@tweety.main.gnac.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020213151631.E16177@tweety.main.gnac.com>; from davidw@certaintysolutions.com on Wed, Feb 13, 2002 at 03:16:31PM -0800 X-note: live free, or die! X-homer: mmmm, forbidden doughnut. Sender: owner-rancid-discuss@shrubbery.net Precedence: bulk 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 owner-rancid-discuss@shrubbery.net Thu Feb 14 00:52:10 2002 Received: from guelah.shrubbery.net (guelah.shrubbery.net [198.58.5.1]) by ni.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1E0qA316965 for ; Thu, 14 Feb 2002 00:52:10 GMT Received: by guelah.shrubbery.net (8.11.6/8.11.1) id g1E0q1204070 for rancid-discuss-outgoing; Thu, 14 Feb 2002 00:52:01 GMT Received: from yosemite.rwc.gnac.net (yosemite.rwc.gnac.net [198.151.248.221]) by guelah.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1E0pva04063; Thu, 14 Feb 2002 00:51:57 GMT Received: by yosemite.rwc.gnac.net; id QAA20346; Wed, 13 Feb 2002 16:51:56 -0800 (PST) Received: from unknown(192.168.1.21) by yosemite.rwc.gnac.net via smap (V5.0) id xma019122; Wed, 13 Feb 02 16:51:24 -0800 Received: from tweety.main.gnac.com (localhost.main.gnac.com [127.0.0.1]) by pepe.corp.gnac.com (8.11.0/8.8.7/GNAC-GW-2.1) with ESMTP id g1E0pCR19576; Wed, 13 Feb 2002 16:51:12 -0800 (PST) Received: (from davidw@localhost) by tweety.main.gnac.com (8.9.3/8.7.3/GNAC-COM-1.1) id QAA24131; Wed, 13 Feb 2002 16:51:24 -0800 (PST) Date: Wed, 13 Feb 2002 16:51:24 -0800 From: David Williamson To: john heasley Cc: rancid-discuss@shrubbery.net Subject: Re: Trouble with alogin Message-ID: <20020213165123.G16177@tweety.main.gnac.com> References: <20020213151631.E16177@tweety.main.gnac.com> <20020213153849.K1176@shrubbery.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <20020213153849.K1176@shrubbery.net>; from heas@shrubbery.net on Wed, Feb 13, 2002 at 03:38:49PM -0800 Sender: owner-rancid-discuss@shrubbery.net Precedence: bulk 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@certaintysolutions.com | -Galileo From owner-rancid-discuss@shrubbery.net Thu Feb 14 01:05:19 2002 Received: from guelah.shrubbery.net (guelah.shrubbery.net [198.58.5.1]) by ni.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1E15J317082 for ; Thu, 14 Feb 2002 01:05:19 GMT Received: by guelah.shrubbery.net (8.11.6/8.11.1) id g1E15JA04143 for rancid-discuss-outgoing; Thu, 14 Feb 2002 01:05:19 GMT Received: (from heas@localhost) by guelah.shrubbery.net (8.11.6/8.11.1) id g1E15FG04135; Thu, 14 Feb 2002 01:05:15 GMT Date: Wed, 13 Feb 2002 17:05:15 -0800 From: john heasley To: David Williamson Cc: john heasley , rancid-discuss@shrubbery.net Subject: Re: Trouble with alogin Message-ID: <20020213170515.P1176@shrubbery.net> References: <20020213151631.E16177@tweety.main.gnac.com> <20020213153849.K1176@shrubbery.net> <20020213165123.G16177@tweety.main.gnac.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="bg08WKrSYDhXBjb5" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020213165123.G16177@tweety.main.gnac.com>; from davidw@certaintysolutions.com on Wed, Feb 13, 2002 at 04:51:24PM -0800 X-note: live free, or die! X-homer: mmmm, forbidden doughnut. Sender: owner-rancid-discuss@shrubbery.net Precedence: bulk --bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=diff *** 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. --bg08WKrSYDhXBjb5-- From owner-rancid-discuss@shrubbery.net Thu Feb 14 01:19:06 2002 Received: from guelah.shrubbery.net (guelah.shrubbery.net [198.58.5.1]) by ni.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1E1J6317158 for ; Thu, 14 Feb 2002 01:19:06 GMT Received: by guelah.shrubbery.net (8.11.6/8.11.1) id g1E1J5W04214 for rancid-discuss-outgoing; Thu, 14 Feb 2002 01:19:05 GMT Received: from yosemite.rwc.gnac.net (yosemite.rwc.gnac.net [198.151.248.221]) by guelah.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1E1J2a04207; Thu, 14 Feb 2002 01:19:02 GMT Received: by yosemite.rwc.gnac.net; id RAA05389; Wed, 13 Feb 2002 17:19:01 -0800 (PST) Received: from unknown(192.168.1.21) by yosemite.rwc.gnac.net via smap (V5.0) id xma005383; Wed, 13 Feb 02 17:18:37 -0800 Received: from tweety.main.gnac.com (localhost.main.gnac.com [127.0.0.1]) by pepe.corp.gnac.com (8.11.0/8.8.7/GNAC-GW-2.1) with ESMTP id g1E1IOb19912; Wed, 13 Feb 2002 17:18:24 -0800 (PST) Received: (from davidw@localhost) by tweety.main.gnac.com (8.9.3/8.7.3/GNAC-COM-1.1) id RAA26826; Wed, 13 Feb 2002 17:18:36 -0800 (PST) Date: Wed, 13 Feb 2002 17:18:36 -0800 From: David Williamson To: john heasley Cc: rancid-discuss@shrubbery.net Subject: Re: Trouble with alogin Message-ID: <20020213171836.H16177@tweety.main.gnac.com> References: <20020213151631.E16177@tweety.main.gnac.com> <20020213153849.K1176@shrubbery.net> <20020213165123.G16177@tweety.main.gnac.com> <20020213170515.P1176@shrubbery.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <20020213170515.P1176@shrubbery.net>; from heas@shrubbery.net on Wed, Feb 13, 2002 at 05:05:15PM -0800 Sender: owner-rancid-discuss@shrubbery.net Precedence: bulk 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 owner-rancid-discuss@shrubbery.net Thu Feb 14 16:42:11 2002 Received: from guelah.shrubbery.net (guelah.shrubbery.net [198.58.5.1]) by ni.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1EGgB301183 for ; Thu, 14 Feb 2002 16:42:11 GMT Received: by guelah.shrubbery.net (8.11.6/8.11.1) id g1EGfZb07541 for rancid-discuss-outgoing; Thu, 14 Feb 2002 16:41:35 GMT Received: (from heas@localhost) by guelah.shrubbery.net (8.11.6/8.11.1) id g1EGfWG07536; Thu, 14 Feb 2002 16:41:32 GMT Date: Thu, 14 Feb 2002 08:41:31 -0800 From: john heasley To: David Williamson Cc: rancid-discuss@guelah.shrubbery.net Subject: Re: Trouble with alogin Message-ID: <20020214084131.G7276@shrubbery.net> 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> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="YiEDa0DAkWCtVeE4" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020213214407.L16177@tweety.main.gnac.com>; from davidw@certaintysolutions.com on Wed, Feb 13, 2002 at 09:44:07PM -0800 X-note: live free, or die! X-homer: mmmm, forbidden doughnut. Sender: owner-rancid-discuss@shrubbery.net Precedence: bulk --YiEDa0DAkWCtVeE4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --YiEDa0DAkWCtVeE4 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=diff *** 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. --YiEDa0DAkWCtVeE4-- From owner-rancid-discuss@shrubbery.net Thu Feb 14 18:11:00 2002 Received: from guelah.shrubbery.net (guelah.shrubbery.net [198.58.5.1]) by ni.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1EIB0302226 for ; Thu, 14 Feb 2002 18:11:00 GMT Received: by guelah.shrubbery.net (8.11.6/8.11.1) id g1EIApc07983 for rancid-discuss-outgoing; Thu, 14 Feb 2002 18:10:51 GMT Received: from mail1.rogers.com (mail1.rogers.com [142.146.31.21]) by guelah.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1EIAma07979 for ; Thu, 14 Feb 2002 18:10:48 GMT Received: from koenig.oss.cantel.rogers.com (rc36200.net.rss.rogers.com [209.112.36.200]) by mail1.rogers.com (8.10.2+Sun/8.10.2) with ESMTP id g1EIAZs23553 for ; Thu, 14 Feb 2002 13:10:35 -0500 (EST) Received: from gaea.oss.cantel.rogers.com ([10.64.31.51]) by koenig.oss.cantel.rogers.com (Netscape Messaging Server 3.6) with ESMTP id AAA5D72 for ; Thu, 14 Feb 2002 13:10:41 -0500 Received: from oss.cantel.rogers.com ([10.64.31.186]) by gaea.oss.cantel.rogers.com (Netscape Messaging Server 3.6) with ESMTP id AAAB5F for ; Thu, 14 Feb 2002 13:10:40 -0500 Message-ID: <3C6BFDA0.F4354C41@oss.cantel.rogers.com> Date: Thu, 14 Feb 2002 13:10:40 -0500 From: Pierre Belanger Organization: Rogers AT&T X-Mailer: Mozilla 4.79 [en] (X11; U; SunOS 5.8 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: rancid-discuss@shrubbery.net Subject: Extreme empty files, Bug Found??? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-rancid-discuss@shrubbery.net Precedence: bulk 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 owner-rancid-discuss@shrubbery.net Thu Feb 14 18:37:46 2002 Received: from guelah.shrubbery.net (guelah.shrubbery.net [198.58.5.1]) by ni.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1EIbk302803 for ; Thu, 14 Feb 2002 18:37:46 GMT Received: by guelah.shrubbery.net (8.11.6/8.11.1) id g1EIbhZ08175 for rancid-discuss-outgoing; Thu, 14 Feb 2002 18:37:43 GMT Received: (from heas@localhost) by guelah.shrubbery.net (8.11.6/8.11.1) id g1EIbdZ08170; Thu, 14 Feb 2002 18:37:39 GMT Date: Thu, 14 Feb 2002 10:37:39 -0800 From: john heasley To: Pierre Belanger Cc: rancid-discuss@shrubbery.net Subject: Re: Extreme empty files, Bug Found??? Message-ID: <20020214103739.Q7276@shrubbery.net> References: <3C6BFDA0.F4354C41@oss.cantel.rogers.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i 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 X-note: live free, or die! X-homer: mmmm, forbidden doughnut. Sender: owner-rancid-discuss@shrubbery.net Precedence: bulk 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 owner-rancid-discuss@shrubbery.net Sat Feb 16 18:10:45 2002 Received: from guelah.shrubbery.net (guelah.shrubbery.net [198.58.5.1]) by ni.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1GIAj329536 for ; Sat, 16 Feb 2002 18:10:45 GMT Received: by guelah.shrubbery.net (8.11.6/8.11.1) id g1GI5NA20529 for rancid-discuss-outgoing; Sat, 16 Feb 2002 18:05:23 GMT Received: from dm3cn8.bell.ca (dm3cn8.bell.ca [198.235.69.145]) by guelah.shrubbery.net (8.11.6/8.11.1) with SMTP id g1GI5Ja20525 for ; Sat, 16 Feb 2002 18:05:19 GMT Received: from 142.182.248.8 by dm3cn8.bell.ca with SMTP (Tumbleweed MMS SMTP Relay (MMS v4.7)); Sat, 16 Feb 2002 13:05:13 -0500 X-Server-Uuid: b85f21a3-cfd1-11d3-8401-00104bf46ab7 Received: from bc3cm4.on.bell.ca (bc3cm4.ON.bell.ca [192.219.253.101]) by Dmoc61.On.Bell.Ca with ESMTP id g1GI5Co29132 for ; Sat, 16 Feb 2002 13:05:12 -0500 (EST) Received: from bellnexxia.com ([142.182.232.159]) by bc3cm4.on.bell.ca ( 8.8.8+Sun/8.8.8) with ESMTP id NAA02225 for ; Sat, 16 Feb 2002 13:05:11 -0500 (EST) Message-ID: <3C6E9EFE.3AF7B979@bellnexxia.com> Date: Sat, 16 Feb 2002 13:03:42 -0500 From: "Seguin, Ron" Organization: Bell Canada - IP Engineering X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Rancid Subject: Mulitple .cloginrc entries X-WSS-ID: 107040D324059-01-01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-rancid-discuss@shrubbery.net Precedence: bulk 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 owner-rancid-discuss@shrubbery.net Sat Feb 16 18:19:28 2002 Received: from guelah.shrubbery.net (guelah.shrubbery.net [198.58.5.1]) by ni.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1GIJS329576 for ; Sat, 16 Feb 2002 18:19:28 GMT Received: by guelah.shrubbery.net (8.11.6/8.11.1) id g1GIGn920566 for rancid-discuss-outgoing; Sat, 16 Feb 2002 18:16:49 GMT Received: (from heas@localhost) by guelah.shrubbery.net (8.11.6/8.11.1) id g1GIGkl20561; Sat, 16 Feb 2002 18:16:46 GMT Date: Sat, 16 Feb 2002 10:16:46 -0800 From: john heasley To: "Seguin, Ron" Cc: Rancid Subject: Re: Mulitple .cloginrc entries Message-ID: <20020216101645.C20424@shrubbery.net> References: <3C6E9EFE.3AF7B979@bellnexxia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3C6E9EFE.3AF7B979@bellnexxia.com>; from ronald.seguin@bellnexxia.com on Sat, Feb 16, 2002 at 01:03:42PM -0500 X-note: live free, or die! X-homer: mmmm, forbidden doughnut. Sender: owner-rancid-discuss@shrubbery.net Precedence: bulk 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 owner-rancid-discuss@shrubbery.net Sat Feb 16 19:25:13 2002 Received: from guelah.shrubbery.net (guelah.shrubbery.net [198.58.5.1]) by ni.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1GJPD301239 for ; Sat, 16 Feb 2002 19:25:13 GMT Received: by guelah.shrubbery.net (8.11.6/8.11.1) id g1GJMGR20728 for rancid-discuss-outgoing; Sat, 16 Feb 2002 19:22:16 GMT Received: from tower.partan.com (tower.partan.com [198.6.255.248]) by guelah.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1GJMDa20724 for ; Sat, 16 Feb 2002 19:22:13 GMT Received: (from asp@localhost) by tower.partan.com (8.9.3/8.9.3) id OAA02678; Sat, 16 Feb 2002 14:22:12 -0500 (EST) Date: Sat, 16 Feb 2002 14:22:12 -0500 From: Andrew Partan To: "Seguin, Ron" Cc: Rancid Subject: Re: Mulitple .cloginrc entries Message-ID: <20020216142211.A2619@partan.com> References: <3C6E9EFE.3AF7B979@bellnexxia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <3C6E9EFE.3AF7B979@bellnexxia.com>; from ronald.seguin@bellnexxia.com on Sat, Feb 16, 2002 at 01:03:42PM -0500 Sender: owner-rancid-discuss@shrubbery.net Precedence: bulk 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 owner-rancid-discuss@shrubbery.net Sat Feb 16 23:29:22 2002 Received: from guelah.shrubbery.net (guelah.shrubbery.net [198.58.5.1]) by ni.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1GNTM306098 for ; Sat, 16 Feb 2002 23:29:22 GMT Received: by guelah.shrubbery.net (8.11.6/8.11.1) id g1GNTCS21613 for rancid-discuss-outgoing; Sat, 16 Feb 2002 23:29:12 GMT Received: from dm3cn8.bell.ca (dm3cn8.bell.ca [198.235.69.145]) by guelah.shrubbery.net (8.11.6/8.11.1) with SMTP id g1GNT8a21609 for ; Sat, 16 Feb 2002 23:29:08 GMT Received: from 142.182.248.8 by dm3cn8.bell.ca with SMTP (Tumbleweed MMS SMTP Relay (MMS v4.7)); Sat, 16 Feb 2002 18:29:02 -0500 X-Server-Uuid: b85f21a3-cfd1-11d3-8401-00104bf46ab7 Received: from bc3cm4.on.bell.ca (bc3cm4.ON.bell.ca [192.219.253.101]) by Dmoc61.On.Bell.Ca with ESMTP id g1GNT1o08565 for ; Sat, 16 Feb 2002 18:29:01 -0500 (EST) Received: from bellnexxia.com ([142.182.76.115]) by bc3cm4.on.bell.ca ( 8.8.8+Sun/8.8.8) with ESMTP id SAA06948 for ; Sat, 16 Feb 2002 18:28:59 -0500 (EST) Message-ID: <3C6EEAB2.C8F86B33@bellnexxia.com> Date: Sat, 16 Feb 2002 18:26:42 -0500 From: "Seguin, Ron" Organization: Bell Canada - IP Engineering X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Rancid Subject: RANCID on Redbacks X-WSS-ID: 107034B41133-01-01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-rancid-discuss@shrubbery.net Precedence: bulk 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 owner-rancid-discuss@shrubbery.net Tue Feb 26 05:29:50 2002 Received: from guelah.shrubbery.net (guelah.shrubbery.net [198.58.5.1]) by ni.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1Q5ToZ10218 for ; Tue, 26 Feb 2002 05:29:50 GMT Received: by guelah.shrubbery.net (8.11.6/8.11.1) id g1Q5OhY10467 for rancid-discuss-outgoing; Tue, 26 Feb 2002 05:24:43 GMT Received: from og.latency.net (postfix@og.latency.net [209.123.200.27]) by guelah.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1Q5Oda10463 for ; Tue, 26 Feb 2002 05:24:40 GMT Received: by og.latency.net (Postfix, from userid 1000) id 510F613FB1B; Tue, 26 Feb 2002 00:24:33 -0500 (EST) Date: Tue, 26 Feb 2002 00:24:33 -0500 From: Adam Rothschild To: rancid-discuss@shrubbery.net Cc: asr Subject: Using clogin to push multi-line banner motd's? Message-ID: <20020226002433.A6414@og.latency.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-rancid-discuss@shrubbery.net Precedence: bulk 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 owner-rancid-discuss@shrubbery.net Tue Feb 26 22:33:16 2002 Received: from guelah.shrubbery.net (guelah.shrubbery.net [198.58.5.1]) by ni.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1QMXGZ29796 for ; Tue, 26 Feb 2002 22:33:16 GMT Received: by guelah.shrubbery.net (8.11.6/8.11.1) id g1QMWVI14989 for rancid-discuss-outgoing; Tue, 26 Feb 2002 22:32:32 GMT Received: (from heas@localhost) by guelah.shrubbery.net (8.11.6/8.11.1) id g1QMWQc14977; Tue, 26 Feb 2002 22:32:26 GMT Date: Tue, 26 Feb 2002 14:32:26 -0800 From: john heasley To: Adam Rothschild Cc: rancid-discuss@shrubbery.net Subject: Re: Using clogin to push multi-line banner motd's? Message-ID: <20020226143226.A14964@shrubbery.net> References: <20020226002433.A6414@og.latency.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020226002433.A6414@og.latency.net>; from asr@latency.net on Tue, Feb 26, 2002 at 12:24:33AM -0500 X-note: live free, or die! X-homer: mmmm, forbidden doughnut. Sender: owner-rancid-discuss@shrubbery.net Precedence: bulk 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 owner-rancid-discuss@shrubbery.net Tue Feb 26 22:58:51 2002 Received: from guelah.shrubbery.net (guelah.shrubbery.net [198.58.5.1]) by ni.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1QMwpZ00500 for ; Tue, 26 Feb 2002 22:58:51 GMT Received: by guelah.shrubbery.net (8.11.6/8.11.1) id g1QMwoN15148 for rancid-discuss-outgoing; Tue, 26 Feb 2002 22:58:50 GMT Received: from tower.partan.com (tower.partan.com [198.6.255.248]) by guelah.shrubbery.net (8.11.6/8.11.1) with ESMTP id g1QMwka15144 for ; Tue, 26 Feb 2002 22:58:46 GMT Received: (from asp@localhost) by tower.partan.com (8.9.3/8.9.3) id RAA27670; Tue, 26 Feb 2002 17:58:45 -0500 (EST) Date: Tue, 26 Feb 2002 17:58:45 -0500 From: Andrew Partan To: Adam Rothschild Cc: rancid-discuss@shrubbery.net Subject: Re: Using clogin to push multi-line banner motd's? Message-ID: <20020226175845.A26531@partan.com> References: <20020226002433.A6414@og.latency.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20020226002433.A6414@og.latency.net>; from asr@latency.net on Tue, Feb 26, 2002 at 12:24:33AM -0500 Sender: owner-rancid-discuss@shrubbery.net Precedence: bulk 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