Re: [rancid] Unable to Conduct Cisco Wireless Controller Backup
Fri, Oct 12, 2018 at 03:36:20PM +, Piegorsch, Weylin William: > ...with the exception of “if (!$clean_run || !$found_end)”. For some reason > I don’t understand, I keep getting “End of run not found”. I’ve attached .raw > and .new files following an execution of “NOPIPE=YES rancid -d -t cisco-wlc5 > ”. I’m guessing it’s somehow related to how the session closes, but > that’s a 100% guess. Any idea how I can resolve? the device isnt echoing the \r\n at the logout. i think this will fix it: Index: lib/ciscowlc.pm.in === --- lib/ciscowlc.pm.in (revision 3875) +++ lib/ciscowlc.pm.in (working copy) @@ -42,10 +42,6 @@ TOP: while(<$INPUT>) { tr/\015//d; - if (/^.*logout(\s*Connection.*closed.*)?$/) { - $clean_run = 1; - last; - } if (/^Error:/) { print STDOUT ("$host wlogin error: $_"); print STDERR ("$host wlogin error: $_") if ($debug); @@ -78,6 +74,10 @@ last TOP; } } + if (/^.*logout(\s*connection.*closed.*)?$/i) { + $clean_run = 1; + last; + } } } @@ -91,6 +91,7 @@ while (<$INPUT>) { tr/\015//d; tr/\020//d; + last if (/^$prompt/); next if (/^\s*rogue ap classify/); next if (/^\s*rogue (adhoc|client) (alert|unknown)/i); @@ -118,7 +119,6 @@ ProcessHistory("","","","!$1 \n"); next; } - last if (/^$prompt/); next if (/^(\s*|\s*$cmd\s*)$/); $linecnt++; ___ Rancid-discuss mailing list Rancid-discuss@shrubbery.net http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: [rancid] Unable to Conduct Cisco Wireless Controller Backup
Fri, Oct 12, 2018 at 03:36:20PM +, Piegorsch, Weylin William: > send -h "exit\r" > > I changed that line to ' send -h "logout\r" ', and now I'm getting a > clean logout. Wlogin from 3.8 seems to fix this from reading through > wlogin.in (I couldn't fudge things to get wlogin-3.8 to work and still use > the rest of the 3.4.1 files). that is right. if you installed 3.4.1 from source, you can probably just copy wlogin.in from 3.8 over that of 3.4.1, build and install. > In addition to catching these two -re match blocks in run_commands (I > actually need both, it wouldn't work at all when I tried to combine them), > that seems to have cleared up all the issues I have > >-re "^--More or .*" { send " " > exp_continue > } > -re "^--More-- .*" { send " " > exp_continue > } 3.8 has versions of these; it is not clear to me if you are saying that you added these to 3.8, or if you needed them in addition to what is in 3.8. > ...with the exception of “if (!$clean_run || !$found_end)”. For some reason > I don’t understand, I keep getting “End of run not found”. I’ve attached .raw > and .new files following an execution of “NOPIPE=YES rancid -d -t cisco-wlc5 > ”. I’m guessing it’s somehow related to how the session closes, but > that’s a 100% guess. Any idea how I can resolve? > i'll look. ___ Rancid-discuss mailing list Rancid-discuss@shrubbery.net http://www.shrubbery.net/mailman/listinfo/rancid-discuss