
ABochannek at yipes
Sep 25, 2001, 2:47 PM
Post #1 of 6
(560 views)
Permalink
|
|
Proposed Extreme changes.
|
|
I am finally getting around working on Rancid for Extreme and had some problems getting it to work. Here are my proposed changes: bash-2.03$ diff -c /opt/rancid-2.2b7/bin/clogin bin/clogin *** /opt/rancid-2.2b7/bin/clogin Thu Sep 13 17:37:40 2001 --- bin/clogin Tue Sep 25 15:40:22 2001 *************** *** 432,438 **** # If the prompt is (enable), then we are on a switch and the # command is "set length 0"; otherwise its "term length 0". # skip if its and extreme. ! if { [ string compare "extreme" "$prompt" ] } { if [ regexp -- ".*> .*enable" "$prompt" ] { send "set length 0\r" } else { --- 432,438 ---- # If the prompt is (enable), then we are on a switch and the # command is "set length 0"; otherwise its "term length 0". # skip if its and extreme. ! if { [ string compare "extreme" "$platform" ] } { if [ regexp -- ".*> .*enable" "$prompt" ] { send "set length 0\r" } else { *************** *** 501,507 **** } } log_user 1 ! send "exit\r" expect { "Do you wish to save your configuration changes" { send "n\r" --- 501,507 ---- } } log_user 1 ! send "quit\r" expect { "Do you wish to save your configuration changes" { send "n\r" bash-2.03$ diff -c /opt/rancid-2.2b7/bin/xrancid bin/xrancid *** /opt/rancid-2.2b7/bin/xrancid Thu Sep 13 17:38:01 2001 --- bin/xrancid Tue Sep 25 15:42:19 2001 *************** *** 330,342 **** print STDOUT "opening file $host\n" if ($log); open(INPUT,"<$host") || die "open failed for $host: $!\n"; } else { ! print STDERR "executing clogin -t $timeo -c\"$cisco_cmds\" $host\n" if ($debug); ! print STDOUT "executing clogin -t $timeo -c\"$cisco_cmds\" $host\n" if ($log); if (defined($ENV{NOPIPE})) { ! system "clogin -t $timeo -c \"$cisco_cmds\" $host </dev/null > $host.raw 2>&1" || die "clogin failed for $host: $!\n"; open(INPUT, "< $host.raw") || die "clogin failed for $host: $!\n"; } else { ! open(INPUT,"clogin -t $timeo -c \"$cisco_cmds\" $host </dev/null |") || die "clogin failed for $host: $!\n"; } } --- 330,342 ---- print STDOUT "opening file $host\n" if ($log); open(INPUT,"<$host") || die "open failed for $host: $!\n"; } else { ! print STDERR "executing clogin -t $timeo -autoenable -c\"$cisco_cmds\" $host\n" if ($debug); ! print STDOUT "executing clogin -t $timeo -autoenable -c\"$cisco_cmds\" $host\n" if ($log); if (defined($ENV{NOPIPE})) { ! system "clogin -t $timeo -autoenable -c \"$cisco_cmds\" $host </dev/null > $host.raw 2>&1" || die "clogin failed for $host: $!\n"; open(INPUT, "< $host.raw") || die "clogin failed for $host: $!\n"; } else { ! open(INPUT,"clogin -t $timeo -autoenable -c \"$cisco_cmds\" $host </dev/null |") || die "clogin failed for $host: $!\n"; } } Alex Bochannek Senior Unix/Network Engineer Yipes ... that's fast! (415) 901-2000 (415) 901-2090 (direct) www.yipes.com <http://www.yipes.com/>
|