From babydr at baby-dragons.com Wed Apr 2 15:29:49 2003 From: babydr at baby-dragons.com (Mr. James W. Laferriere) Date: Wed, 2 Apr 2003 10:29:49 -0500 (EST) Subject: When using jlogin with the '-s' option , No further output ?-{ Message-ID: Hello All , Every time I use the '-s' option to jlogin the output is lost . Or at least I am unable to find to which fiel descriptor it is (re-)directed . All help appreciated . JimL -- +------------------------------------------------------------------+ | James W. Laferriere | System Techniques | Give me VMS | | Network Engineer | P.O. Box 854 | Give me Linux | | babydr at baby-dragons.com | Coudersport PA 16915 | only on AXP | +------------------------------------------------------------------+ From heas at shrubbery.net Wed Apr 2 16:43:45 2003 From: heas at shrubbery.net (john heasley) Date: Wed, 2 Apr 2003 08:43:45 -0800 Subject: When using jlogin with the '-s' option , No further output ?-{ In-Reply-To: References: Message-ID: <20030402164344.GC5912@shrubbery.net> Wed, Apr 02, 2003 at 10:29:49AM -0500, Mr. James W. Laferriere: > Hello All , Every time I use the '-s' option to jlogin the output > is lost . Or at least I am unable to find to which fiel > descriptor it is (re-)directed . All help appreciated . JimL there is no redirection, unless you do so explicitly. output will appear on stdout (1) and stderr (2), if you tell expect to do so: log_user 1 From babydr at baby-dragons.com Wed Apr 2 17:01:34 2003 From: babydr at baby-dragons.com (Mr. James W. Laferriere) Date: Wed, 2 Apr 2003 12:01:34 -0500 (EST) Subject: When using jlogin with the '-s' option , No further output ?-{ In-Reply-To: <20030402164344.GC5912@shrubbery.net> References: <20030402164344.GC5912@shrubbery.net> Message-ID: Hello John , The '-s' option in jlogin sets log_user to 1 by default . And I have in my -s scripts set it to 1 as well . Still no output from the router . I have tried 'log_file -a -noappend junk.txt' & it is empty as well . I do not even get the 'send_user' output I have setup to give me (sort of) debug output . I just tried send_error & is swallows that output too !-{ Where else can I look ? Tia , JimL On Wed, 2 Apr 2003, john heasley wrote: > Wed, Apr 02, 2003 at 10:29:49AM -0500, Mr. James W. Laferriere: > > Hello All , Every time I use the '-s' option to jlogin the output > > is lost . Or at least I am unable to find to which fiel > > descriptor it is (re-)directed . All help appreciated . JimL > there is no redirection, unless you do so explicitly. output will > appear on stdout (1) and stderr (2), if you tell expect to do so: > log_user 1 -- +------------------------------------------------------------------+ | James W. Laferriere | System Techniques | Give me VMS | | Network Engineer | P.O. Box 854 | Give me Linux | | babydr at baby-dragons.com | Coudersport PA 16915 | only on AXP | +------------------------------------------------------------------+ From heas at shrubbery.net Wed Apr 2 17:19:20 2003 From: heas at shrubbery.net (john heasley) Date: Wed, 2 Apr 2003 09:19:20 -0800 Subject: When using jlogin with the '-s' option , No further output ?-{ In-Reply-To: References: <20030402164344.GC5912@shrubbery.net> Message-ID: <20030402171920.GD5912@shrubbery.net> Wed, Apr 02, 2003 at 12:01:34PM -0500, Mr. James W. Laferriere: > Hello John , The '-s' option in jlogin sets log_user to 1 by no, it sets it to 0 when a script is specified. 174 if { $do_script } { 175 log_user 0 176 } else { 177 log_user 1 178 } > default . And I have in my -s scripts set it to 1 as well . > Still no output from the router . > > I have tried 'log_file -a -noappend junk.txt' & it is empty as > well . I do not even get the 'send_user' output I have setup to > give me (sort of) debug output . I just tried send_error & is > swallows that output too !-{ > > Where else can I look ? Tia , JimL then i suspect either an error in how you are running jlogin from your shell, a typo in the script, or your expect binary is buggered. really can not say without seeing the code. also, see the examples in util/*.exp. > On Wed, 2 Apr 2003, john heasley wrote: > > Wed, Apr 02, 2003 at 10:29:49AM -0500, Mr. James W. Laferriere: > > > Hello All , Every time I use the '-s' option to jlogin the output > > > is lost . Or at least I am unable to find to which fiel > > > descriptor it is (re-)directed . All help appreciated . JimL > > there is no redirection, unless you do so explicitly. output will > > appear on stdout (1) and stderr (2), if you tell expect to do so: > > log_user 1 > -- > +------------------------------------------------------------------+ > | James W. Laferriere | System Techniques | Give me VMS | > | Network Engineer | P.O. Box 854 | Give me Linux | > | babydr at baby-dragons.com | Coudersport PA 16915 | only on AXP | > +------------------------------------------------------------------+ From KevinC at Kgex.com.tw Thu Apr 3 03:58:32 2003 From: KevinC at Kgex.com.tw (=?big5?B?UERTLUtldmluIENoYW4tuOKvcbDq?=) Date: Thu, 3 Apr 2003 11:58:32 +0800 Subject: Riverstone Router Message-ID: dear all : have any one have experience on Riverstone Router ? right now I already can succeed use riverstone network modify login script http://www.nmops.org/download/scripts/rslogin to login my router like : rancid at kevin-debian:~$ ./rslogin 10.8.20.254 10.8.20.254 spawn telnet 10.8.20.254 Trying 10.8.20.254... Connected to 10.8.20.254. Escape character is '^]'. ---------------------------------------------------------------------- 5SSRM/5C105 System Software, Version E9.0.3.0 Copyright (c) 2002 Enterasys Networks System started on 2003-03-07 00:30:47 ---------------------------------------------------------------------- Press RETURN to activate console . . . Password: KGEX-HQ-E5> enable Password: KGEX-HQ-E5# KGEX-HQ-E5# I need help on how to setup unsupport router no router.db ? thank you ! From heas at shrubbery.net Thu Apr 3 04:21:16 2003 From: heas at shrubbery.net (john heasley) Date: Wed, 2 Apr 2003 20:21:16 -0800 Subject: Riverstone Router In-Reply-To: References: Message-ID: <20030403042116.GI13426@shrubbery.net> riverstone is (will be) in 2.3 (which my slow butt is holding up). you can try this eft image. ftp://ftp.shrubbery.net/outgoing/rancid-2.3.eft.tar.gz Thu, Apr 03, 2003 at 11:58:32AM +0800, PDS-Kevin Chan-???q??: > > dear all : > > have any one have experience on Riverstone Router ? > > right now I already can succeed use riverstone network > modify login script > http://www.nmops.org/download/scripts/rslogin to login my > router like : > > rancid at kevin-debian:~$ ./rslogin 10.8.20.254 > 10.8.20.254 > spawn telnet 10.8.20.254 > Trying 10.8.20.254... > Connected to 10.8.20.254. > Escape character is '^]'. > ---------------------------------------------------------------------- > 5SSRM/5C105 System Software, Version E9.0.3.0 > Copyright (c) 2002 Enterasys Networks > System started on 2003-03-07 00:30:47 > ---------------------------------------------------------------------- > > Press RETURN to activate console . . . > > > > Password: > KGEX-HQ-E5> enable > Password: > KGEX-HQ-E5# > KGEX-HQ-E5# > > > I need help on how to setup unsupport router no router.db ? > > > thank you ! > > > > From babydr at baby-dragons.com Thu Apr 3 20:06:54 2003 From: babydr at baby-dragons.com (Mr. James W. Laferriere) Date: Thu, 3 Apr 2003 15:06:54 -0500 (EST) Subject: When using jlogin with the '-s' option , No further output ?-{ In-Reply-To: <20030402171920.GD5912@shrubbery.net> References: <20030402164344.GC5912@shrubbery.net> <20030402171920.GD5912@shrubbery.net> Message-ID: Hello John , Hmm, This looks like a one person show , at least on this maillist . Inline . On Wed, 2 Apr 2003, john heasley wrote: > Wed, Apr 02, 2003 at 12:01:34PM -0500, Mr. James W. Laferriere: > > Hello John , The '-s' option in jlogin sets log_user to 1 by > no, it sets it to 0 when a script is specified. > 174 if { $do_script } { > 175 log_user 0 > 176 } else { > 177 log_user 1 > 178 } Here's a good one on me . If I use the -s option & do_script is set to 0 the script specified in the -s option is not processed . If set to 1 it does get processed . And the using the log_file (ie: log_file -a -noappend junk.txt) I am able to get the output from my sub script . But otherwise nothing gets sent to stdout . The note above the do_script seems to say that the underlying script is responsible for sending output , But instead of having anything to do with output it is input that gets shanghi'd . Now that I can at last can get output ot appear someplace do you have any thoughts on getting output to stdout ? > > default . And I have in my -s scripts set it to 1 as well . > > Still no output from the router . > > > > I have tried 'log_file -a -noappend junk.txt' & it is empty as > > well . I do not even get the 'send_user' output I have setup to > > give me (sort of) debug output . I just tried send_error & is > > swallows that output too !-{ > > > > Where else can I look ? Tia , JimL > then i suspect either an error in how you are running jlogin from your > shell, a typo in the script, or your expect binary is buggered. really > can not say without seeing the code. > also, see the examples in util/*.exp. That is where I stole the basis for the script . > > On Wed, 2 Apr 2003, john heasley wrote: > > > Wed, Apr 02, 2003 at 10:29:49AM -0500, Mr. James W. Laferriere: > > > > Hello All , Every time I use the '-s' option to jlogin the output > > > > is lost . Or at least I am unable to find to which fiel > > > > descriptor it is (re-)directed . All help appreciated . JimL > > > there is no redirection, unless you do so explicitly. output will > > > appear on stdout (1) and stderr (2), if you tell expect to do so: > > > log_user 1 -- +------------------------------------------------------------------+ | James W. Laferriere | System Techniques | Give me VMS | | Network Engineer | P.O. Box 854 | Give me Linux | | babydr at baby-dragons.com | Coudersport PA 16915 | only on AXP | +------------------------------------------------------------------+ From asp at partan.com Thu Apr 3 20:41:19 2003 From: asp at partan.com (Andrew Partan) Date: Thu, 3 Apr 2003 15:41:19 -0500 Subject: When using jlogin with the '-s' option , No further output ?-{ In-Reply-To: References: <20030402164344.GC5912@shrubbery.net> <20030402171920.GD5912@shrubbery.net> Message-ID: <20030403204119.GB77267@partan.com> On Thu, Apr 03, 2003 at 03:06:54PM -0500, Mr. James W. Laferriere wrote: > Now that I can at last can get output ot appear someplace do > you have any thoughts on getting output to stdout ? Can you send the script? I can give it a shot on one of my junipers & see if I spot anything. --asp From heas at shrubbery.net Fri Apr 4 05:51:36 2003 From: heas at shrubbery.net (john heasley) Date: Thu, 3 Apr 2003 21:51:36 -0800 Subject: When using jlogin with the '-s' option , No further output ?-{ In-Reply-To: References: <20030402164344.GC5912@shrubbery.net> <20030402171920.GD5912@shrubbery.net> Message-ID: <20030404055136.GE23538@shrubbery.net> Thu, Apr 03, 2003 at 03:06:54PM -0500, Mr. James W. Laferriere: > Hello John , Hmm, This looks like a one person show , at least > on this maillist . Inline . there are four folks. > On Wed, 2 Apr 2003, john heasley wrote: > > > Wed, Apr 02, 2003 at 12:01:34PM -0500, Mr. James W. Laferriere: > > > Hello John , The '-s' option in jlogin sets log_user to 1 by > > no, it sets it to 0 when a script is specified. > > 174 if { $do_script } { > > 175 log_user 0 > > 176 } else { > > 177 log_user 1 > > 178 } > Here's a good one on me . If I use the -s option & do_script is > set to 0 the script specified in the -s option is not processed . > If set to 1 it does get processed . And the using the log_file > (ie: log_file -a -noappend junk.txt) I am able to get the output > from my sub script . But otherwise nothing gets sent to stdout . > The note above the do_script seems to say that the underlying > script is responsible for sending output , But instead of having > anything to do with output it is input that gets shanghi'd . > Now that I can at last can get output ot appear someplace do > you have any thoughts on getting output to stdout ? > > > > default . And I have in my -s scripts set it to 1 as well . > > > Still no output from the router . > > > > > > I have tried 'log_file -a -noappend junk.txt' & it is empty as > > > well . I do not even get the 'send_user' output I have setup to > > > give me (sort of) debug output . I just tried send_error & is > > > swallows that output too !-{ > > > > > > Where else can I look ? Tia , JimL > > then i suspect either an error in how you are running jlogin from your > > shell, a typo in the script, or your expect binary is buggered. really > > can not say without seeing the code. > > also, see the examples in util/*.exp. > That is where I stole the basis for the script . The example scripts work for me. all i can suggest is what andrew already has, send the code. you can send it to rancid at shrubbery.net if you do not wish it to appear on the list. > > > > On Wed, 2 Apr 2003, john heasley wrote: > > > > Wed, Apr 02, 2003 at 10:29:49AM -0500, Mr. James W. Laferriere: > > > > > Hello All , Every time I use the '-s' option to jlogin the output > > > > > is lost . Or at least I am unable to find to which fiel > > > > > descriptor it is (re-)directed . All help appreciated . JimL > > > > there is no redirection, unless you do so explicitly. output will > > > > appear on stdout (1) and stderr (2), if you tell expect to do so: > > > > log_user 1 > -- > +------------------------------------------------------------------+ > | James W. Laferriere | System Techniques | Give me VMS | > | Network Engineer | P.O. Box 854 | Give me Linux | > | babydr at baby-dragons.com | Coudersport PA 16915 | only on AXP | > +------------------------------------------------------------------+ From nicolas.strina at smart-telecom.ch Fri Apr 4 14:26:59 2003 From: nicolas.strina at smart-telecom.ch (Strina Nicolas) Date: Fri, 4 Apr 2003 16:26:59 +0200 Subject: Cat5 ? Message-ID: Hello, I am now trying to setup rancid for Cat5. Anything work when i use clogin. When i launch rancid/cat5rancid i have this : [vtx at noc bin]$ cat5rancid sw1.wtc.lsn.ch.vtxnet.net -d sw1.wtc.lsn.ch.vtxnet.net clogin error: Error: TIMEOUT reached sw1.wtc.lsn.ch.vtxnet.net: missed cmd(s): show boot,dir slot0:,dir bootflash:,dir slot1:,dir sup-bootflash:,show module,write term,show version,show flash,show port ifindex,dir sup-microcode: sw1.wtc.lsn.ch.vtxnet.net: End of run not found [vtx at noc bin]$ rancid sw1.wtc.lsn.ch.vtxnet.net -d sw1.wtc.lsn.ch.vtxnet.net clogin error: Error: TIMEOUT reached sw1.wtc.lsn.ch.vtxnet.net: missed cmd(s): write term sw1.wtc.lsn.ch.vtxnet.net: End of run not found Someone have an idea ? Regards, Nicolas ---------------------------------------- STRINA Nicolas IP Network Engineer VTX Services - Internet Service Provider Av. de Lavaux, 101 CH-1009 Pully nicolas.strina at smart-telecom.ch http://www.vtx.ch ---------------------------------------- From JRizzo at ea.com Fri Apr 4 14:39:40 2003 From: JRizzo at ea.com (Rizzo, Joe) Date: Fri, 4 Apr 2003 06:39:40 -0800 Subject: Cat5 ? Message-ID: <194487E5B6AC1E4E82FCBD56E579979102282480@eahq-mb3.rws.ad.ea.com> Try: NOPIPE=true; export NOPIPE cat5rancid -d sw1.wtc.lsn.ch.vtxnet.net Then review the sw1.wtc.lsn.ch.vtxnet.net.raw and sw1.wtc.lsn.ch.vtxnet.new files. From nicolas.strina at smart-telecom.ch Fri Apr 4 14:42:31 2003 From: nicolas.strina at smart-telecom.ch (Strina Nicolas) Date: Fri, 4 Apr 2003 16:42:31 +0200 Subject: Cat5 ? In-Reply-To: <194487E5B6AC1E4E82FCBD56E579979102282480@eahq-mb3.rws.ad.ea.com> Message-ID: It's login on the Cat and after that no command .... WTC-SW-1(Cat4006) Error: TIMEOUT reached Doh ---------------------------------------- STRINA Nicolas IP Network Engineer VTX Services - Internet Service Provider Av. de Lavaux, 101 CH-1009 Pully nicolas.strina at smart-telecom.ch http://www.vtx.ch ---------------------------------------- From JRizzo at ea.com Fri Apr 4 14:52:55 2003 From: JRizzo at ea.com (Rizzo, Joe) Date: Fri, 4 Apr 2003 06:52:55 -0800 Subject: Cat5 ? Message-ID: <194487E5B6AC1E4E82FCBD56E5799791BC66B3@eahq-mb3.rws.ad.ea.com> Try setting your prompt to something like: set prompt WTC-SW-1(Cat4006)> or set prompt WTC-SW-1-Cat4006> From babydr at baby-dragons.com Fri Apr 4 16:31:41 2003 From: babydr at baby-dragons.com (Mr. James W. Laferriere) Date: Fri, 4 Apr 2003 11:31:41 -0500 (EST) Subject: When using jlogin with the '-s' option , No further output ?-{ In-Reply-To: <20030403204119.GB77267@partan.com> References: <20030402164344.GC5912@shrubbery.net> <20030402171920.GD5912@shrubbery.net> <20030403204119.GB77267@partan.com> Message-ID: Hello Andrew & John , Attached is a gzipd tarball of the script that at least gets output to a file . Thank you . JimL ps: When I get it debugge & claned up I'll ask that the team look at placing it into the utils/ area . On Thu, 3 Apr 2003, Andrew Partan wrote: > On Thu, Apr 03, 2003 at 03:06:54PM -0500, Mr. James W. Laferriere wrote: > > Now that I can at last can get output ot appear someplace do > > you have any thoughts on getting output to stdout ? > Can you send the script? I can give it a shot on one of my junipers > & see if I spot anything. > --asp -- +------------------------------------------------------------------+ | James W. Laferriere | System Techniques | Give me VMS | | Network Engineer | P.O. Box 854 | Give me Linux | | babydr at baby-dragons.com | Coudersport PA 16915 | only on AXP | +------------------------------------------------------------------+ From asp at partan.com Fri Apr 4 16:49:37 2003 From: asp at partan.com (Andrew Partan) Date: Fri, 4 Apr 2003 11:49:37 -0500 Subject: When using jlogin with the '-s' option , No further output ?-{ In-Reply-To: References: <20030402164344.GC5912@shrubbery.net> <20030402171920.GD5912@shrubbery.net> <20030403204119.GB77267@partan.com> Message-ID: <20030404164937.GA60514@partan.com> On Fri, Apr 04, 2003 at 11:31:41AM -0500, Mr. James W. Laferriere wrote: > Hello Andrew & John , Attached is a gzipd tarball of the script > that at least gets output to a file . Thank you . JimL No attachment. --asp From babydr at baby-dragons.com Fri Apr 4 17:11:02 2003 From: babydr at baby-dragons.com (Mr. James W. Laferriere) Date: Fri, 4 Apr 2003 12:11:02 -0500 (EST) Subject: When using jlogin with the '-s' option , No further output ?-{ In-Reply-To: References: <20030402164344.GC5912@shrubbery.net> <20030402171920.GD5912@shrubbery.net> <20030403204119.GB77267@partan.com> Message-ID: Oops ... , JimL On Fri, 4 Apr 2003, Mr. James W. Laferriere wrote: > Hello Andrew & John , Attached is a gzipd tarball of the script > that at least gets output to a file . Thank you . JimL > ps: When I get it debugge & claned up I'll ask that the team look at > placing it into the utils/ area . > On Thu, 3 Apr 2003, Andrew Partan wrote: > > On Thu, Apr 03, 2003 at 03:06:54PM -0500, Mr. James W. Laferriere wrote: > > > Now that I can at last can get output ot appear someplace do > > > you have any thoughts on getting output to stdout ? > > Can you send the script? I can give it a shot on one of my junipers > > & see if I spot anything. > > --asp -- +------------------------------------------------------------------+ | James W. Laferriere | System Techniques | Give me VMS | | Network Engineer | P.O. Box 854 | Give me Linux | | babydr at baby-dragons.com | Coudersport PA 16915 | only on AXP | +------------------------------------------------------------------+ -------------- next part -------------- A non-text attachment was scrubbed... Name: jlogin-s-interact.tgz Type: application/octet-stream Size: 2677 bytes Desc: Url : http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20030404/e3a671fc/attachment.obj From heas at shrubbery.net Sat Apr 5 06:04:18 2003 From: heas at shrubbery.net (john heasley) Date: Fri, 4 Apr 2003 22:04:18 -0800 Subject: When using jlogin with the '-s' option , No further output ?-{ In-Reply-To: References: <20030402164344.GC5912@shrubbery.net> <20030402171920.GD5912@shrubbery.net> <20030403204119.GB77267@partan.com> Message-ID: <20030405060418.GT23538@shrubbery.net> Fri, Apr 04, 2003 at 12:11:02PM -0500, Mr. James W. Laferriere: > Oops ... , JimL > > On Fri, 4 Apr 2003, Mr. James W. Laferriere wrote: > > Hello Andrew & John , Attached is a gzipd tarball of the script > > that at least gets output to a file . Thank you . JimL > > ps: When I get it debugge & claned up I'll ask that the team look at > > placing it into the utils/ area . > > > On Thu, 3 Apr 2003, Andrew Partan wrote: > > > On Thu, Apr 03, 2003 at 03:06:54PM -0500, Mr. James W. Laferriere wrote: > > > > Now that I can at last can get output ot appear someplace do > > > > you have any thoughts on getting output to stdout ? > > > Can you send the script? I can give it a shot on one of my junipers > > > & see if I spot anything. > > > --asp --- jlogin-s-interact-with-sub-sessions.exp.old Sat Apr 5 05:14:26 2003 +++ jlogin-s-interact-with-sub-sessions.exp Sat Apr 5 06:01:08 2003 @@ -98,7 +98,7 @@ } # try sending all output to a file -log_file -a -noappend $Elog_file +log_file -a $Elog_file # set exp_internal 0 # set log_user 0 @@ -135,7 +135,7 @@ set rTcmd_file [open $Tcmd_file r] # get the line_count in file $Tcmd_file - catch {exec count_lines.sh $Tcmd_file} line_count + catch {exec wc -l $Tcmd_file | sed -e "s/^ *//" | cut -f1 "-d "} line_count # To jump thru hoops for first line in $rTcmd_file set cmd_num 1 @@ -146,20 +146,19 @@ # Debugging #send_error "cmd_num=\"$cmd_num\" , line_count=\"$line_count\"\n" - if { $cmd_num > 1 && $cmd_num <= $line_count } { + send "$line\r" + sleep 0.07 + + if { $cmd_num > 0 && $cmd_num < $line_count } { # Debugging #send_error "Here Tprmpt , cmd_num=$cmd_num sending: $line\n\n" expect -re $Tprmpt { - sleep 0.07 - send "$line\r" } } else { # Debugging #send_error "Here prompt , cmd_num=$cmd_num sending: $line\n\n" # This will only happen once . (I hope) expect -re $prompt { - sleep 0.07 - send "$line\r" } } incr cmd_num 1 @@ -181,7 +180,6 @@ # Check that we either timeout or have gotten the prompt thru jlogin send "show system users\r" -send "\r" expect { timeout { @@ -190,8 +188,9 @@ #send_error "$prompt, timeout\n" send_error "Error: did not receive prompt\n" - exit + return 1 } + -re "\[\r\n\]+" { exp_continue; } -re "^.*$prompt" { # Debugging @@ -206,15 +205,15 @@ #send_error "Here #4\n" # send 'quit' to the router -send "quit\r" -expect { - timeout { - send_error "Error: timeout waiting for EOF after quit\n" ; - } - eof { - exit 0 ; - } -} +#send "quit\r" +#expect { +# timeout { +# send_error "Error: timeout waiting for EOF after quit\n" ; +# } +# eof { +# exit 0 ; +# } +#} # Debugging #send_error "Here #EOF\n" ; From heas at shrubbery.net Sun Apr 6 01:19:24 2003 From: heas at shrubbery.net (john heasley) Date: Sun, 6 Apr 2003 01:19:24 +0000 Subject: matching Cisco config prompt In-Reply-To: <20030217203338.GF17776@shrubbery.net> References: <194487E5B6AC1E4E82FCBD56E5799791012D4329@eahq-mb3.rws.ad.ea.com> <20030217203338.GF17776@shrubbery.net> Message-ID: <20030406011924.GE8187@shrubbery.net> Mon, Feb 17, 2003 at 12:33:38PM -0800, john heasley: > Mon, Feb 17, 2003 at 10:09:28AM -0800, Rizzo, Joe: > > I am slowly understanding what is going on... This is a little cleaner: > > hairy isnt it. > > > diff -u clogin.orig clogin > > --- clogin.orig Wed Feb 12 15:33:02 2003 > > +++ clogin Mon Feb 17 10:02:03 2003 > > @@ -456,9 +456,9 @@ > > } else { > > send "term length 0\r" > > } > > - regsub -all "\[)(]" $prompt {\\&} reprompt > > + regsub -all {[)(]} $prompt {\\&} reprompt > > # match cisco config mode prompts too, but not for catalyst ie: > > (enable) > > - regsub -all "\[#>]$" $reprompt {(\\([^\\r\\n]+\\))?&} reprompt > > + regsub -- {^(.{1,14}).*([#>])$} $reprompt > > {\1.*(\(config.*\))?\2} reprompt > ^^ such matches are problematic because there's no tell what > might appear in the config or command output. things like [^(#>] > work more reliably. i _finally_ had some time to look at this. i altered your diff just a bit. thanks, man. anyone care to try it? it works for the cases i tried. more exposure appreciated.... ftp://ftp.shrubbery.net/outgoing/clogin.in > > expect { > > -re $reprompt {} > > -re "\[\n\r]+" { exp_continue } > > > > From listuser at numbnuts.net Sun Apr 6 18:06:07 2003 From: listuser at numbnuts.net (listuser at numbnuts.net) Date: Sun, 6 Apr 2003 13:06:07 -0500 (CDT) Subject: Riverstone Router In-Reply-To: Message-ID: I've been planning on writing a module for Enterasys hardware for a while now. I started to a while back but got side tracked. I have a plethora of goods to try it on. I'm fairly new to rancid though. Justin On Thu, 3 Apr 2003, [big5] PDS-Kevin Chan-???q?? wrote: > > dear all : > > have any one have experience on Riverstone Router ? > > right now I already can succeed use riverstone network > modify login script > http://www.nmops.org/download/scripts/rslogin to login my > router like : > > rancid at kevin-debian:~$ ./rslogin 10.8.20.254 > 10.8.20.254 > spawn telnet 10.8.20.254 > Trying 10.8.20.254... > Connected to 10.8.20.254. > Escape character is '^]'. > ---------------------------------------------------------------------- > 5SSRM/5C105 System Software, Version E9.0.3.0 > Copyright (c) 2002 Enterasys Networks > System started on 2003-03-07 00:30:47 > ---------------------------------------------------------------------- > > Press RETURN to activate console . . . > > > > Password: > KGEX-HQ-E5> enable > Password: > KGEX-HQ-E5# > KGEX-HQ-E5# > > > I need help on how to setup unsupport router no router.db ? > > > thank you ! > > > > > From heas at shrubbery.net Sun Apr 6 20:20:19 2003 From: heas at shrubbery.net (john heasley) Date: Sun, 6 Apr 2003 20:20:19 +0000 Subject: Riverstone Router In-Reply-To: References: Message-ID: <20030406202019.GI8187@shrubbery.net> if they provide a resonably consistent CLI, then it is possible. Sun, Apr 06, 2003 at 01:06:07PM -0500, listuser at numbnuts.net: > I've been planning on writing a module for Enterasys hardware for a while > now. I started to a while back but got side tracked. I have a plethora > of goods to try it on. I'm fairly new to rancid though. > > Justin From heas at shrubbery.net Sun Apr 6 20:29:53 2003 From: heas at shrubbery.net (john heasley) Date: Sun, 6 Apr 2003 20:29:53 +0000 Subject: catOS with aaa authorization Message-ID: <20030406202953.GK8187@shrubbery.net> my cat5k has a sup1, which can not be upgraded. well, it could be upgraded if i had a 16meg 72-pin simm for it...but i'm reluctant to go buy one. anyway, it's catOS version does not support AAA authorization, ie: "auto-enable" or the "priv-lvl" AV pair. if anyone has such a CatOS box to test the patch below, it would be helpful. the person who reported the problem has not replied. thanks Index: clogin.in =================================================================== RCS file: /home/rancid/.CVS/rancid/bin/clogin.in,v retrieving revision 1.52 diff -d -u -r1.52 clogin.in --- clogin.in 30 Jul 2002 06:14:10 -0000 1.52 +++ clogin.in 23 Mar 2003 07:35:44 -0000 @@ -565,7 +565,7 @@ # was done on the command line. If it is not specifically set on the # command line, check the password file. if $autoenable { - set prompt "#" + set prompt "(#| \(enable\))" } else { set ae [find autoenable $router] if { "$ae" == "1" } { From heas at shrubbery.net Sun Apr 6 20:46:55 2003 From: heas at shrubbery.net (john heasley) Date: Sun, 6 Apr 2003 20:46:55 +0000 Subject: CatOS "write term all" Message-ID: <20030406204655.GM8187@shrubbery.net> another CatOS request (). apparently newer CatOS version support an "all" argument to "write term". would be great if someone could test the following patch. it works for those which do not support it. for those that do, it should collect both versions of the command, but only display the "all" version. thanks Index: cat5rancid.in =================================================================== RCS file: /home/rancid/.CVS/rancid/bin/cat5rancid.in,v retrieving revision 1.27 diff -r1.27 cat5rancid.in 793a794,795 > last if (/^Unknown host /); # error when write term all > # is not supported 794a797 > return(0) if ($found_end); 997a1001 > 'write term all' => "WriteTerm", 1012a1017 > "write term all", 1065c1070,1074 < if (!defined($prompt)) {$prompt = ($_ =~ /^([^>]+>)/)[0]; } --- > if (!defined($prompt)) { > $prompt = ($_ =~ /^([^>]+>)/)[0]; > $prompt =~ s/([][}{)(\\])/\\$1/g; > print STDERR ("PROMPT MATCH: $prompt\n") if ($debug); > } From terry at tmk.com Sun Apr 6 23:11:45 2003 From: terry at tmk.com (Terry Kennedy) Date: Sun, 06 Apr 2003 19:11:45 -0400 (EDT) Subject: CatOS "write term all" In-Reply-To: "Your message dated Sun, 06 Apr 2003 20:46:55 +0000" <20030406204655.GM8187@shrubbery.net> Message-ID: <01KUF29B2QNM000PPS@tmk.com> > another CatOS request ( this>). > > apparently newer CatOS version support an "all" argument to "write > term". would be great if someone could test the following patch. > it works for those which do not support it. for those that do, it > should collect both versions of the command, but only display the > "all" version. The patch works fine and fetches the "all" version - Supervisor III w/ CatOS 6.4(2) crypto image - cat5000-sup3k9.6-4-2.bin. Terry Kennedy http://www.tmk.com terry at tmk.com New York, NY USA From listuser at numbnuts.net Mon Apr 7 17:34:20 2003 From: listuser at numbnuts.net (listuser at numbnuts.net) Date: Mon, 7 Apr 2003 12:34:20 -0500 (CDT) Subject: Riverstone Router In-Reply-To: <20030406202019.GI8187@shrubbery.net> Message-ID: Their router OS's CLI would be quite familar to anyone familar with Cisco's IOS. The verb and noun have been switched to stave off Cisco lawsuit threats for using something similar to their CLI. Other than that it's quite close to the feel of IOS. You won't get anything out of their swtiches though. They are all menu driven. I never have been able to work out and expect script to manipulate it. Their different switch families have different interfaces as well. The ELS/VH line is a far cry different from their 2/5/6/9000 line. The new E1 series is supposed to be different yet. IIRC it has a CLI though. I have numerous firmware releases I can load onto a router for testing too if needed. On Sun, 6 Apr 2003, john heasley wrote: > if they provide a resonably consistent CLI, then it is possible. > > Sun, Apr 06, 2003 at 01:06:07PM -0500, listuser at numbnuts.net: > > I've been planning on writing a module for Enterasys hardware for a while > > now. I started to a while back but got side tracked. I have a plethora > > of goods to try it on. I'm fairly new to rancid though. > > > > Justin > From babydr at baby-dragons.com Tue Apr 8 00:41:41 2003 From: babydr at baby-dragons.com (Mr. James W. Laferriere) Date: Mon, 7 Apr 2003 20:41:41 -0400 (EDT) Subject: When using jlogin with the '-s' option , No further output ?-{ In-Reply-To: <20030405060418.GT23538@shrubbery.net> References: <20030402164344.GC5912@shrubbery.net> <20030402171920.GD5912@shrubbery.net> <20030403204119.GB77267@partan.com> <20030405060418.GT23538@shrubbery.net> Message-ID: Hello John , Thank you for the patch . Now here is the second part of the problem . See after my .sig . On Fri, 4 Apr 2003, john heasley wrote: > Fri, Apr 04, 2003 at 12:11:02PM -0500, Mr. James W. Laferriere: > > Oops ... , JimL > > > > On Fri, 4 Apr 2003, Mr. James W. Laferriere wrote: > > > Hello Andrew & John , Attached is a gzipd tarball of the script > > > that at least gets output to a file . Thank you . JimL > > > ps: When I get it debugge & claned up I'll ask that the team look at > > > placing it into the utils/ area . > > > > > On Thu, 3 Apr 2003, Andrew Partan wrote: > > > > On Thu, Apr 03, 2003 at 03:06:54PM -0500, Mr. James W. Laferriere wrote: > > > > > Now that I can at last can get output ot appear someplace do > > > > > you have any thoughts on getting output to stdout ? > > > > Can you send the script? I can give it a shot on one of my junipers > > > > & see if I spot anything. > > > > --asp -- +------------------------------------------------------------------+ | James W. Laferriere | System Techniques | Give me VMS | | Network Engineer | P.O. Box 854 | Give me Linux | | babydr at baby-dragons.com | Coudersport PA 16915 | only on AXP | +------------------------------------------------------------------+ # make the first snapshot of the memory status outside of # the loop , allows us to do a diff on the output ;-) hostname spawn ssh -c 3des -x -l user hostname ***Private Property of Adelphia Business Solutions*** * * * UNAUTHORIZED ACCESS IS PROHIBITED * * violators will be prosecuted * * to the fullest extent of the law * * * ***************************************************** user at hostname's password: --- JUNOS 5.4R3.2 built 2002-11-07 00:57:02 UTC user at hostname> user at hostname> set cli complete-on-space off Disabling complete-on-space user at hostname> set cli screen-length 0 Screen length set to 0 hostname Error: TIMEOUT reached can't read "in_proc": no such variable while executing "if { $in_proc} { return 1 } else { continue }" invoked from within "expect -re $Tprmpt { }" (procedure "cycleTcmd_file" line 24) invoked from within "cycleTcmd_file $Tcmd_file $prompt $Tprmpt" invoked from within "expect -nobrace timeout { # Debugging #send_error "$prompt, timeout\n" send_error "Error: did not receive prompt\n" return 1 } -re {[ ..." invoked from within "expect { timeout { # Debugging #send_error "$prompt, timeout\n" send_error "Error: did not receive prompt\n" return 1 } -re "\[\r\n..." (file "jlogin-s-interact-with-sub-sessions-v1.exp" line 170) invoked from within "source $sfile" ("foreach" body line 64) invoked from within "foreach router [lrange $argv $i end] { set router [string tolower $router] send_user "$router\n" set prompt ">" # Figure out usernam..." (file "/usr/local/rancid/bin/jlogin" line 430) show system users 3:28PM up 2 mins, 1 user, load averages: 0.61, 0.30, 0.12 USER TTY FROM LOGIN@ IDLE WHAT user p0 test-net.122 3:28PM - -cli (cl user at hostname> start shell % Error: TIMEOUT reached can't read "in_proc": no such variable while executing "if { $in_proc} { return 1 } else { continue }" invoked from within "expect -re $Tprmpt { }" (procedure "cycleTcmd_file" line 24) invoked from within "cycleTcmd_file $Tcmd_file $prompt $Tprmpt" invoked from within "expect -nobrace timeout { # Debugging #send_error "$prompt, timeout\n" send_error "Error: did not receive prompt\n" return 1 } -re {[ ..." invoked from within "expect { timeout { # Debugging #send_error "$prompt, timeout\n" send_error "Error: did not receive prompt\n" return 1 } -re "\[\r\n..." (file "jlogin-s-interact-with-sub-sessions-v1.exp" line 170) invoked from within "source $sfile" ("foreach" body line 64) invoked from within "foreach router [lrange $argv $i end] { set router [string tolower $router] send_user "$router\n" set prompt ">" # Figure out usernam..." (file "/usr/local/rancid/bin/jlogin" line 430) From heas at shrubbery.net Tue Apr 8 10:18:11 2003 From: heas at shrubbery.net (john heasley) Date: Tue, 8 Apr 2003 03:18:11 -0700 Subject: When using jlogin with the '-s' option , No further output ?-{ In-Reply-To: References: <20030402164344.GC5912@shrubbery.net> <20030402171920.GD5912@shrubbery.net> <20030403204119.GB77267@partan.com> <20030405060418.GT23538@shrubbery.net> Message-ID: <20030408101811.GF28367@shrubbery.net> Mon, Apr 07, 2003 at 08:41:41PM -0400, Mr. James W. Laferriere: > Hello John , Thank you for the patch . Now here is the second > part of the problem . See after my .sig . > > # make the first snapshot of the memory status outside of > # the loop , allows us to do a diff on the output ;-) > > hostname > spawn ssh -c 3des -x -l user hostname > > ***Private Property of Adelphia Business Solutions*** > * * > * UNAUTHORIZED ACCESS IS PROHIBITED * > * violators will be prosecuted * > * to the fullest extent of the law * > * * > ***************************************************** > user at hostname's password: > --- JUNOS 5.4R3.2 built 2002-11-07 00:57:02 UTC > > user at hostname> > > user at hostname> set cli complete-on-space off > Disabling complete-on-space > > user at hostname> set cli screen-length 0 > Screen length set to 0 > > hostname > > Error: TIMEOUT reached > can't read "in_proc": no such variable > while executing > "if { $in_proc} { see expect_after() (expect(1)). you're inheriting the one from proc login(). From babydr at baby-dragons.com Wed Apr 9 16:03:41 2003 From: babydr at baby-dragons.com (Mr. James W. Laferriere) Date: Wed, 9 Apr 2003 12:03:41 -0400 (EDT) Subject: When using jlogin with the '-s' option , No further output ?-{ In-Reply-To: <20030408101811.GF28367@shrubbery.net> References: <20030402164344.GC5912@shrubbery.net> <20030402171920.GD5912@shrubbery.net> <20030403204119.GB77267@partan.com> <20030405060418.GT23538@shrubbery.net> <20030408101811.GF28367@shrubbery.net> Message-ID: Hello John , On Tue, 8 Apr 2003, john heasley wrote: > Mon, Apr 07, 2003 at 08:41:41PM -0400, Mr. James W. Laferriere: > > Hello John , Thank you for the patch . Now here is the second > > part of the problem . See after my .sig . > > ... snip > see expect_after() (expect(1)). you're inheriting the one from > proc login(). From the output I have the jlogin script itself is not completing thru to login when I issue the -s option from inside a sh script . But , from the cmd line it will complete . Do you have a URL that describes expect_after's use ? I have found the instance in the 'jlogin' But , We should at least be getting logged into the router -before- I run into the expect_after being inherited into my script . Right ? Tia , JimL -- +------------------------------------------------------------------+ | James W. Laferriere | System Techniques | Give me VMS | | Network Engineer | P.O. Box 854 | Give me Linux | | babydr at baby-dragons.com | Coudersport PA 16915 | only on AXP | +------------------------------------------------------------------+ From babydr at baby-dragons.com Wed Apr 9 19:12:13 2003 From: babydr at baby-dragons.com (Mr. James W. Laferriere) Date: Wed, 9 Apr 2003 15:12:13 -0400 (EDT) Subject: When using jlogin with the '-s' option , No further output ?-{ In-Reply-To: References: <20030402164344.GC5912@shrubbery.net> <20030402171920.GD5912@shrubbery.net> <20030403204119.GB77267@partan.com> <20030405060418.GT23538@shrubbery.net> <20030408101811.GF28367@shrubbery.net> Message-ID: Hello John , All , Never mind . Being blind(figuratively) has its draw backs . The script I had created was using the incorrect secondary prompt string . Tnx all for the help . JimL On Wed, 9 Apr 2003, Mr. James W. Laferriere wrote: > Hello John , > On Tue, 8 Apr 2003, john heasley wrote: > > Mon, Apr 07, 2003 at 08:41:41PM -0400, Mr. James W. Laferriere: > > > Hello John , Thank you for the patch . Now here is the second > > > part of the problem . See after my .sig . > > > ... snip > > see expect_after() (expect(1)). you're inheriting the one from > > proc login(). > From the output I have the jlogin script itself is not completing > thru to login when I issue the -s option from inside a sh script . > But , from the cmd line it will complete . > > Do you have a URL that describes expect_after's use ? > I have found the instance in the 'jlogin' But , We should at > least be getting logged into the router -before- I run into the > expect_after being inherited into my script . Right ? > Tia , JimL > -- +------------------------------------------------------------------+ | James W. Laferriere | System Techniques | Give me VMS | | Network Engineer | P.O. Box 854 | Give me Linux | | babydr at baby-dragons.com | Coudersport PA 16915 | only on AXP | +------------------------------------------------------------------+ From ronald.seguin at bell.ca Wed Apr 16 20:10:28 2003 From: ronald.seguin at bell.ca (SEGUIN, RONALD) Date: Wed, 16 Apr 2003 16:10:28 -0400 Subject: a couple RANCID processes hanging..... Message-ID: <3E9DB8B4.3661E287@bell.ca> Just recently I'm having the following processes hang....I then have to kill them manually.... 32187 ? S 0:00 /bin/sh /apps/rancid/bin/do-diffs 32191 ? S 0:00 /bin/sh /apps/rancid/bin/control_rancid distribution Has anyone else encountered this, if so what was done to rectify...... --thanks -- ____________________________________ Ron Seguin Bell Canada Tel: 613.781.2555 From heas at shrubbery.net Wed Apr 16 22:21:37 2003 From: heas at shrubbery.net (john heasley) Date: Wed, 16 Apr 2003 15:21:37 -0700 Subject: a couple RANCID processes hanging..... In-Reply-To: <3E9DB8B4.3661E287@bell.ca> References: <3E9DB8B4.3661E287@bell.ca> Message-ID: <20030416222137.GQ11070@shrubbery.net> Wed, Apr 16, 2003 at 04:10:28PM -0400, SEGUIN, RONALD: > Just recently I'm having the following processes hang....I then have to kill them manually.... > > 32187 ? S 0:00 /bin/sh /apps/rancid/bin/do-diffs > 32191 ? S 0:00 /bin/sh /apps/rancid/bin/control_rancid distribution > > Has anyone else encountered this, if so what was done to rectify...... > > --thanks > -- > ____________________________________ > Ron Seguin Bell Canada > Tel: 613.781.2555 most likely you have expect processes lingering that are connected with this control_rancid. the actual problem could be a number of things. if using linux, see the expect patch on www.shrubbery.net/rancid. else, try following trail of child processes from the control_rancid. its probably expect. From ronald.seguin at bell.ca Wed Apr 16 22:18:10 2003 From: ronald.seguin at bell.ca (SEGUIN, RONALD) Date: Wed, 16 Apr 2003 18:18:10 -0400 Subject: a couple RANCID processes hanging..... References: <194487E5B6AC1E4E82FCBD56E57997910228251B@eahq-mb3.rws.ad.ea.com> Message-ID: <3E9DD6A2.35C98300@bell.ca> No telnet processes....but I also noticed I have the following RANCID process running as well.... 28739 ? S 0:00 cvs commit -m updates "Rizzo, Joe" wrote: > Are there also telnet processes hanging? > > -----Original Message----- > From: SEGUIN, RONALD [mailto:ronald.seguin at bell.ca] > Sent: Wednesday, April 16, 2003 3:10 PM > To: rancid-discuss at shrubbery.net > Subject: a couple RANCID processes hanging..... > > Just recently I'm having the following processes hang....I then have to kill them manually.... > > 32187 ? S 0:00 /bin/sh /apps/rancid/bin/do-diffs > 32191 ? S 0:00 /bin/sh /apps/rancid/bin/control_rancid distribution > > Has anyone else encountered this, if so what was done to rectify...... > > --thanks > -- > ____________________________________ > Ron Seguin Bell Canada > Tel: 613.781.2555 > -- ____________________________________ Ron Seguin Bell Canada Tel: 613.781.2555 From heas at shrubbery.net Wed Apr 16 22:37:06 2003 From: heas at shrubbery.net (john heasley) Date: Wed, 16 Apr 2003 15:37:06 -0700 Subject: a couple RANCID processes hanging..... In-Reply-To: <3E9DD6A2.35C98300@bell.ca> References: <194487E5B6AC1E4E82FCBD56E57997910228251B@eahq-mb3.rws.ad.ea.com> <3E9DD6A2.35C98300@bell.ca> Message-ID: <20030416223706.GV11070@shrubbery.net> Wed, Apr 16, 2003 at 06:18:10PM -0400, SEGUIN, RONALD: > No telnet processes....but I also noticed I have the following RANCID process > running as well.... > > 28739 ? S 0:00 cvs commit -m updates that's one i've never seen before! my guess would be that you ended up with a stale lock in the cvs repository and it's waiting for the lock to be freed. see the cvs manpage for info on it's lock files. the other possibility is that it's waiting for input of some kind (which i doubt), but you should be able to kill that process and it's output should appear in that rancid group's log file. From ronald.seguin at bell.ca Tue Apr 22 18:04:51 2003 From: ronald.seguin at bell.ca (SEGUIN, RONALD) Date: Tue, 22 Apr 2003 14:04:51 -0400 Subject: a couple RANCID processes hanging..... References: <194487E5B6AC1E4E82FCBD56E57997910228251B@eahq-mb3.rws.ad.ea.com> <3E9DD6A2.35C98300@bell.ca> <20030416223706.GV11070@shrubbery.net> Message-ID: <3EA58443.5A7F0BC@bell.ca> I've deleted the following file dated Apr 6 within one of my CVS directories...will find out during tomorrow's run if it fixed my problem... -rw-r----- 1 rancid root 0 Apr 6 22:30 #cvs.rfl.kramer.28342 john heasley wrote: > Wed, Apr 16, 2003 at 06:18:10PM -0400, SEGUIN, RONALD: > > No telnet processes....but I also noticed I have the following RANCID process > > running as well.... > > > > 28739 ? S 0:00 cvs commit -m updates > > that's one i've never seen before! my guess would be that you ended up > with a stale lock in the cvs repository and it's waiting for the lock > to be freed. see the cvs manpage for info on it's lock files. > > the other possibility is that it's waiting for input of some kind (which > i doubt), but you should be able to kill that process and it's output > should appear in that rancid group's log file. From rancid at apley.net Wed Apr 30 17:32:42 2003 From: rancid at apley.net (Brian Apley) Date: Wed, 30 Apr 2003 13:32:42 -0400 Subject: Ignoring IP-Host DIFF in Cisco configs Message-ID: <029b01c30f3e$81148320$0a00a8c0@brianhome> Hello all- new to the group and rancid, like what I see so far. It seems like a new "feature" (or maybe it's been there forever and I haven't noticed it) of IOS is that it puts the most-recently used IP host entry at the top of the host list. This of course causes the DIFF to be triggered, and with rancid, for the version number to increment. Is there anyway to filter this out of rancid's diff? (understanding that it can be filtered from the mail update, but I'd like to not see the version number increment every time someone uses a host name). Is there a way to turn this off in IOS? I searched the mail archive for an answer, to no avail. Any insight is greatly appreciated. Brian Apley CCIE #7599 From asp at partan.com Wed Apr 30 17:36:23 2003 From: asp at partan.com (Andrew Partan) Date: Wed, 30 Apr 2003 13:36:23 -0400 Subject: Ignoring IP-Host DIFF in Cisco configs In-Reply-To: <029b01c30f3e$81148320$0a00a8c0@brianhome> References: <029b01c30f3e$81148320$0a00a8c0@brianhome> Message-ID: <20030430173623.GA3582@partan.com> On Wed, Apr 30, 2003 at 01:32:42PM -0400, Brian Apley wrote: > It seems like a new "feature" (or maybe it's been there forever and I > haven't noticed it) of IOS is that it puts the most-recently used IP host > entry at the top of the host list. This of course causes the DIFF to be > triggered, and with rancid, for the version number to increment. Example of what you are talking about? Its easy to sort stuff but you kinda have to know the sytax of the statement first. --asp From rancid at apley.net Wed Apr 30 17:46:54 2003 From: rancid at apley.net (Brian Apley) Date: Wed, 30 Apr 2003 13:46:54 -0400 Subject: Ignoring IP-Host DIFF in Cisco configs References: <029b01c30f3e$81148320$0a00a8c0@brianhome> <20030430173623.GA3582@partan.com> Message-ID: <02a901c30f40$7d244b40$0a00a8c0@brianhome> Sure- example- within the cisco config, we have a series of ip host commands, i.e.- ip host a2e 10.5.1.17 ip host a1e 10.5.1.18 ip host nsp 10.6.1.15 Believe it or not (and I wasn't aware IOS did this), but the order that these commands appear in the config changes based on what host was used last. So, if I used the nsp hostname from the CLI (by typing "nsp" or "telnet nsp"), the config would then look like- ip host nsp 10.6.1.15 ip host a2e 10.5.1.17 ip host a1e 10.5.1.18 This of course represents a DIFF. What I'm looking for is a way to ignore these types of DIFFs- not only for the mailer broadcast, but ignore them completely, so that the version number doesn't get incremented. Thanks again. From asp at partan.com Wed Apr 30 17:55:40 2003 From: asp at partan.com (Andrew Partan) Date: Wed, 30 Apr 2003 13:55:40 -0400 Subject: Ignoring IP-Host DIFF in Cisco configs In-Reply-To: <02a901c30f40$7d244b40$0a00a8c0@brianhome> References: <029b01c30f3e$81148320$0a00a8c0@brianhome> <20030430173623.GA3582@partan.com> <02a901c30f40$7d244b40$0a00a8c0@brianhome> Message-ID: <20030430175540.GA6701@partan.com> On Wed, Apr 30, 2003 at 01:46:54PM -0400, Brian Apley wrote: > ip host a2e 10.5.1.17 > ip host a1e 10.5.1.18 > ip host nsp 10.6.1.15 There is some stuff in rancid to order "ip host line\d+" commands, but it looks like this ip host stuff is more than just the line\d+ stuff, so try this patch & let me know if it works. --asp Index: rancid.in =================================================================== RCS file: /home/rancid/.CVS/rancid/bin/rancid.in,v retrieving revision 1.136 diff -u -r1.136 rancid.in --- rancid.in 28 Apr 2003 06:09:12 -0000 1.136 +++ rancid.in 30 Apr 2003 17:53:19 -0000 @@ -1239,9 +1239,9 @@ ProcessHistory("NTP","keysort",$sortkey,"$_"); next; } - # order ip host line statements - /^ip host line(\d+)/ && - ProcessHistory("IPHOST","numsort","$1","$_") && next; + # order ip host statements + /^ip host (\S+) / && + ProcessHistory("IPHOST","keysort","$1","$_") && next; # order ip nat source static statements /^ip nat (\S+) source static (\S+)/ && ProcessHistory("IP NAT $1","ipsort","$2","$_") && next; From rancid at apley.net Wed Apr 30 18:33:48 2003 From: rancid at apley.net (Brian Apley) Date: Wed, 30 Apr 2003 14:33:48 -0400 Subject: Ignoring IP-Host DIFF in Cisco configs References: <029b01c30f3e$81148320$0a00a8c0@brianhome> <20030430173623.GA3582@partan.com> <02a901c30f40$7d244b40$0a00a8c0@brianhome> <20030430175540.GA6701@partan.com> Message-ID: <02c801c30f47$0a562be0$0a00a8c0@brianhome> That did the trick- thanks much, appreciate the quick response!