unknown
1970-01-01 00:00:00 UTC
The only place I can find where $clean_run would be set to 1 would be in
this chunk of below. You can see that tried different things for lines 3-5
to match the final string and set clean run to 1. I ran across a thread
where the xtremes have a problem doing this as well. But, I cant seem to
get it working. Also, Im not 100% sure that this is where it could be as
$clean_run could get set to 0 after that. Id appreciated any help anybody
could pass my way. So close.....
TOP: while(<INPUT>) {
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
I think Im getting close on this. I edited the rancid script and change the "write term" command to "show config". I putzed around with it and got it to where I can run "rancid.mod -d sw_enterasys" and itll create a .new file with an output of the config but I still get the "end of run not found".
this chunk of below. You can see that tried different things for lines 3-5
to match the final string and set clean run to 1. I ran across a thread
where the xtremes have a problem doing this as well. But, I cant seem to
get it working. Also, Im not 100% sure that this is where it could be as
$clean_run could get set to 0 after that. Id appreciated any help anybody
could pass my way. So close.....
TOP: while(<INPUT>) {
tr/\015//d;
#if (/[>#]\s?exit$/) {
#if (/(closed\.)/) {
if (/$prompt\s?(quit|exit|Connection( to \S+)? closed)/ && $found_end)
{
$clean_run = 1;
last;
}
if (/^Error:/) {
print STDOUT ("$host clogin error: $_");
print STDERR ("$host clogin error: $_") if ($debug);
$clean_run = 0;
last;
}
while (/[>#]\s*($cmds_regexp)\s*$/) {
$cmd = $1;
if (!defined($prompt)) {
$prompt = ($_ =~ /^([^#>]+[#>])/)[0];
$prompt =~ s/([][}{)(\\])/\\$1/g;
print STDERR ("PROMPT MATCH: $prompt\n") if ($debug);
}
print STDERR ("HIT COMMAND:$_") if ($debug);
if (! defined($commands{$cmd})) {
print STDERR "$host: found unexpected command - \"$cmd\"\n";
$clean_run = 0;
last TOP;
}
$rval = &{$commands{$cmd}};
delete($commands{$cmd});
if ($rval == -1) {
$clean_run = 0;
last TOP;
}
}
}
--0016e64c26f81343c4049cdfd5c6#if (/[>#]\s?exit$/) {
#if (/(closed\.)/) {
if (/$prompt\s?(quit|exit|Connection( to \S+)? closed)/ && $found_end)
{
$clean_run = 1;
last;
}
if (/^Error:/) {
print STDOUT ("$host clogin error: $_");
print STDERR ("$host clogin error: $_") if ($debug);
$clean_run = 0;
last;
}
while (/[>#]\s*($cmds_regexp)\s*$/) {
$cmd = $1;
if (!defined($prompt)) {
$prompt = ($_ =~ /^([^#>]+[#>])/)[0];
$prompt =~ s/([][}{)(\\])/\\$1/g;
print STDERR ("PROMPT MATCH: $prompt\n") if ($debug);
}
print STDERR ("HIT COMMAND:$_") if ($debug);
if (! defined($commands{$cmd})) {
print STDERR "$host: found unexpected command - \"$cmd\"\n";
$clean_run = 0;
last TOP;
}
$rval = &{$commands{$cmd}};
delete($commands{$cmd});
if ($rval == -1) {
$clean_run = 0;
last TOP;
}
}
}
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
I think Im getting close on this. I edited the rancid script and change the "write term" command to "show config". I putzed around with it and got it to where I can run "rancid.mod -d sw_enterasys" and itll create a .new file with an output of the config but I still get the "end of run not found".