<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello <div><br></div><div>Are these patch are integrated into rancid github repository ?</div><div><br></div><div><br><div><div>Le 21 mars 2013 ā 13:03, Per-Olof Olsson <<a href="mailto:peo@chalmers.se">peo@chalmers.se</a>> a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><br>Not just a small fix make menu login to work.<br>Found some more that I think needs to be fixed.<br><br>Now tested on some HP's<br>HP2524, H41xx, HP2510, HP2610, HP2620, HP2824, HP2910 och HP2920.<br>Telnet and ssh login to operator and manager level.<br>Ssh key login to manager level.<br><br>Also tested just hlogin on some Cisco's.<br><br>Look like have this to work.<br><br>How will this new hlogin work for agmrancid and srancid that make<br>use of hlogin?<br><br>Files from rancid 2.8.3.<br><br>hrancid:<br>- Fix to prevent hrancid from find/parse "Logout"-text from menu.<br> Looks like code is move to WriteTerm and not used any more.<br><br>- Also include ShowReloadAt just to get a proper diff output.<br><br>===================================================================<br>diff -c hrancid.in_ORG hrancid.in_NEW<br>*** hrancid.in_ORG 2012-08-29 13:39:33.060145292 +0200<br>--- hrancid.in_NEW 2013-03-18 20:18:31.535617594 +0100<br>***************<br>*** 168,173 ****<br>--- 168,192 ----<br> &ipaddrval($a) <=> &ipaddrval($b);<br> }<br><br>+ # This routine parses "show reload at"<br>+ sub ShowReloadAt {<br>+ print STDERR " In ShowReloadAt: $_" if ($debug);<br>+<br>+ while (<INPUT>) {<br>+ tr/\015//d;<br>+ last if (/^$prompt/);<br>+ next if (/^(\s*|\s*$cmd\s*)$/);<br>+ return(-1) if (/command authorization failed/i);<br>+ return(1) if /^(Invalid|Ambiguous) input:/i;<br>+<br>+ next if (/ \(in /);<br>+ next if (/ reload is not scheduled/);<br>+<br>+ ProcessHistory("COMMENTS","keysort","I0",";$_");<br>+ }<br>+ return(0);<br>+ }<br>+<br> # This routine parses "show config files"<br> sub ShowConfigFiles {<br> print STDERR " In ShowConfigFiles: $_" if ($debug);<br>***************<br>*** 533,538 ****<br>--- 552,558 ----<br> {'show module' => 'ShowModule'},<br> {'show stack' => 'ShowStack'},<br> {'show tech transceivers' => 'ShowTechTransceivers'},<br>+ {'show reload at' => 'ShowReloadAt'},<br> {'show config files' => 'ShowConfigFiles'},<br> {'show config status' => 'ShowConfigStatus'},<br> {'write term' => 'WriteTerm'}<br>***************<br>*** 602,614 ****<br> ProcessHistory("COMMENTS","keysort","F0",";\n"); # showstack<br> ProcessHistory("COMMENTS","keysort","G0",";\n"); # showtechtransceivers<br> ProcessHistory("COMMENTS","keysort","H0",";\n"); # showconfigfiles<br>! ProcessHistory("COMMENTS","keysort","I0",";\n");<br> TOP: while(<INPUT>) {<br> tr/\015//d;<br>! if (/$prompt\s*(exit|logout)\s*$/i) {<br>! $clean_run=1;<br>! last;<br>! }<br> if (/^Error:/) {<br> print STDOUT ("$host clogin error: $_");<br> print STDERR ("$host clogin error: $_") if ($debug);<br>--- 622,641 ----<br> ProcessHistory("COMMENTS","keysort","F0",";\n"); # showstack<br> ProcessHistory("COMMENTS","keysort","G0",";\n"); # showtechtransceivers<br> ProcessHistory("COMMENTS","keysort","H0",";\n"); # showconfigfiles<br>! ProcessHistory("COMMENTS","keysort","I0",";\n"); # showreloadat<br>! ProcessHistory("COMMENTS","keysort","J0",";\n");<br>!<br> TOP: while(<INPUT>) {<br> tr/\015//d;<br>!<br>! # Moved to WriteTerm and not removed from here!!!<br>! ## "Logout" text in menu! Don't look for exit or logout before prompt is defined<br>! ## if (/$prompt\s*(exit|logout)\s*$/i) {<br>! # if (defined($prompt) && /$prompt\s*(exit|logout)\s*$/i) {<br>! # print STDERR ("EXIT:$_") if ($debug);<br>! # $clean_run=1;<br>! # last;<br>! # }<br> if (/^Error:/) {<br> print STDOUT ("$host clogin error: $_");<br> print STDERR ("$host clogin error: $_") if ($debug);<br><br>=============================================<br><br><br><br>hlogin:<br><br>- Select "Exit to cli" if menu is default for login.<br> Include answer to "save config" prompter before menu is started.<br><br>- Handle some more error text to speed up exit on error.<br><br>- Remove/replace code for two inner expect loops to<br> just have a single expect loop for login.<br> Don't like to duplicate expect code into inner loops.<br><br>- Include fix for "prompt" characters in banner text.<br> Will handle banner text except if it the match "/#\s*($cmds_regexp)\s*$/" in hrancid<br><br>- Speed up logout. Don't need to use human wait/type speed.<br><br>=============================================<br>diff -c hlogin.in_20130318 hlogin.in_NEW<br>*** hlogin.in_20130318 2013-02-27 07:56:51.332898135 +0100<br>--- hlogin.in_NEW 2013-03-18 20:16:02.286363285 +0100<br>***************<br>*** 412,417 ****<br>--- 412,427 ----<br> send "\r"<br> exp_continue<br> }<br>+ "Do you want to save current configuration" {<br>+ send "n"<br>+ exp_continue<br>+ }<br>+ # Menu output "<Enter>" grab all in menu to not match prompter!<br>+ -re "(\[0-9])\\. Command Line \\(CLI\\).*" {<br>+ set menu_exit "$expect_out(1,string)"<br>+ send "$menu_exit"<br>+ exp_continue<br>+ }<br> -re "(Connection refused|Secure connection \[^\n\r]+ refused|Connection closed by)" {<br> catch {close}; catch {wait};<br> if !$progs {<br>***************<br>*** 444,450 ****<br> send_user "\nError: host key mismatch for $router. Update the SSH known_hosts<br>file accordingly.\n"<br> return 1<br> }<br>! eof { send_user "\nError: Couldn't login\n"; wait; return 1 }<br> -nocase "unknown host\r" {<br> catch {close}; catch {wait};<br> send_user "\nError: Unknown host\n"; wait; return 1<br>--- 454,483 ----<br> send_user "\nError: host key mismatch for $router. Update the SSH known_hosts<br>file accordingly.\n"<br> return 1<br> }<br>! "Could not resolve hostname" {<br>! send_user "\nError: Could not resolve hostname $router\n";<br>! catch {close}; catch {wait};<br>! return 1<br>! }<br>! eof {<br>! send_user "\nError: Couldn't login\n";<br>! wait; return 1<br>! }<br>! "Permission denied" {<br>! send_user "\nError: Permission denied. Check your access to $router\n";<br>! catch {close}; catch {wait};<br>! return 1<br>! }<br>! "Invalid password" {<br>! send_user "\nError: Invalid password. Check your passwd for $router\n";<br>! catch {close}; catch {wait};<br>! return 1<br>! }<br>! "Login invalid" {<br>! send_user "\nError: Invalid login\n";<br>! catch {close}; catch {wait};<br>! return 1<br>! }<br> -nocase "unknown host\r" {<br> catch {close}; catch {wait};<br> send_user "\nError: Unknown host\n"; wait; return 1<br>***************<br>*** 455,473 ****<br> send -- "$passphrase\r"<br> exp_continue<br> }<br>! -re "$u_prompt" { send -- "$user\r"<br>! expect {<br>! eof { send_user "\nError: Couldn't login\n"; wait;<br>return 1 }<br>! "Login invalid" { send_user "\nError: Invalid login\n";<br>! catch {close}; catch {wait};<br>! return 1 }<br>! -re "$p_prompt" { send -- "$userpswd\r" }<br>! "$prompt" { set in_proc 0; return 0 }<br>! "Press any key to continue" {<br>! send " "<br>! exp_continue<br>! }<br>! }<br> exp_continue<br> }<br> -re "$p_prompt" {<br>--- 488,498 ----<br> send -- "$passphrase\r"<br> exp_continue<br> }<br>! -re "\[#>]+.*\[\n\r]+" {<br>! exp_continue<br>! }<br>! -re "$u_prompt" {<br>! send -- "$user\r"<br> exp_continue<br> }<br> -re "$p_prompt" {<br>***************<br>*** 476,502 ****<br> } else {<br> send -- "$passwd\r"<br> }<br>- expect {<br>- eof { send_user "\nError: Couldn't login\n";<br>- wait;<br>- return 1<br>- }<br>- "Press any key to continue" {<br>- send " ";<br>- exp_continue<br>- }<br>- -re "$e_prompt" { send -- "$enapasswd\r" }<br>- "$prompt" { set in_proc 0;<br>- return 0<br>- }<br>- }<br> exp_continue<br> }<br>! "$prompt" { break; }<br>! denied { send_user "\nError: Check your passwd for $router\n"<br>! catch {close}; catch {wait}; return 1<br>! }<br>! "% Bad passwords" {send_user "\nError: Check your passwd for $router\n"; return 1 }<br> }<br> }<br><br>--- 501,519 ----<br> } else {<br> send -- "$passwd\r"<br> }<br> exp_continue<br> }<br>! "$prompt" {<br>! break<br>! }<br>! denied {<br>! send_user "\nError: Check your passwd for $router\n"<br>! catch {close}; catch {wait}; return 1<br>! }<br>! "% Bad passwords" {<br>! send_user "\nError: Check your passwd for $router\n"<br>! return 1<br>! }<br> }<br> }<br><br>***************<br>*** 583,589 ****<br> }<br> }<br> log_user 1<br>! send -h "logout\r"<br> expect {<br> "Do you want to save current configuration" {<br> if {$do_saveconfig} {<br>--- 600,606 ----<br> }<br> }<br> log_user 1<br>! send "logout\r"<br> expect {<br> "Do you want to save current configuration" {<br> if {$do_saveconfig} {<br><br>=============================================<br><br><br><br><br>On 03/04/2013 05:00 PM, Per-Olof Olsson wrote:<br><blockquote type="cite">On 03/02/2013 12:19 AM, heasley wrote:<br><blockquote type="cite">Thu, Feb 21, 2013 at 08:40:23AM +0100, Per-Olof Olsson:<br><blockquote type="cite">Alex DEKKER skrev 02/20/2013 10:19 PM:<br><blockquote type="cite">On 20/02/13 17:43, heasley wrote:<br><blockquote type="cite">btw, is this menu a standard thing with procurves? I've never seen it,<br>but the one that i have is a lower-end model.<br></blockquote>It's not the default on current Procurves, you can access it with 'menu'. From what Marc<br>is saying, it sounds like there is a way to make it go straight into the menu on login for<br>a given username.<br><br>alexd<br>_______________________________________________<br>Rancid-discuss mailing list<br><a href="mailto:Rancid-discuss@shrubbery.net">Rancid-discuss@shrubbery.net</a><br>http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss<br></blockquote><br>Only setting I found for this is in "8. Run Setup" menu<br>where you select "Logon Default" to "CLI" or "Menu"<br></blockquote><br>Would you propose a patch for this, since you can test it?<br></blockquote><br>Yes but it will take some time to have it to work and is fully tested.<br><br>telnet/ssh login to manager and/or operator level<br>ssh key-login<br>and some switch types.<br><br>"5" only works if you do direct login to manager level.<br>Login to operator level needs "3" for "CLI exit".<br><br>And one more thing.<br>When you start menu mode and not saved config<br> "Do you want to save current configuration"-prompt<br>shows up before menu is started, even at login.<br><br>...<br><br>Have part of it working but not all.<br><br><blockquote type="cite"><br><blockquote type="cite">/Peo<br>----------------------------------------------------------<br>Per-Olof Olsson Email: <a href="mailto:peo@chalmers.se">peo@chalmers.se</a><br>Chalmers tekniska högskola IT-service<br>Hörsalsvägen 5 412 96 Göteborg<br>Tel: 031/772 6738 Fax: 031/772 8660<br>----------------------------------------------------------<br>_______________________________________________<br>Rancid-discuss mailing list<br><a href="mailto:Rancid-discuss@shrubbery.net">Rancid-discuss@shrubbery.net</a><br>http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss<br></blockquote></blockquote><br><br>/Peo<br><br><br><br><br>_______________________________________________<br>Rancid-discuss mailing list<br><a href="mailto:Rancid-discuss@shrubbery.net">Rancid-discuss@shrubbery.net</a><br>http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss<br><br></blockquote><br><br>_______________________________________________<br>Rancid-discuss mailing list<br><a href="mailto:Rancid-discuss@shrubbery.net">Rancid-discuss@shrubbery.net</a><br>http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss<br></blockquote></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div id="sig" style="line-height: 13px; margin-top: 6px; margin-right: 0px; margin-bottom: 6px; margin-left: 0px; padding-top: 8px; padding-right: 8px; padding-bottom: 8px; padding-left: 8px; border-top-width: 1px; border-top-color: rgb(153, 153, 153); border-top-style: dotted; border-bottom-width: 1px; border-bottom-color: rgb(153, 153, 153); border-bottom-style: dotted; font-family: 'Lucida Grande', Verdana, Arial, sans-serif; font-size: 11px; color: rgb(51, 51, 51); "><img src="data:image/gif;base64,R0lGODlhMAAwAOYAAAAAAAAAQAAAaAAAdAAAegAVfgAigwAthgAudgA1iQA8jAA+fgBAfwBBjgBE%20kABGggBMlABRlgFTmQNJhAVYnwcHDQkGC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XiFEEG2+QQAEMruX24BdVCMADGnQQ0IAde6gg%20hhJhlBEDAWKk+IUcVVxRBZkXWsiRRnIwNkhCQmpBiMYAZcjRRgExsPFFimJ8UUYVNZwRxRdiPPkF%20F2Jw0UYTEXwQJQehIeQIBDy8GcQaUBxgghQ8NOHEGzwgEccSSQyxhA9sSFHEEU3oUEYZEZQQZWh9%202MlIcAk4oEB/GUjAnQIKHECqqfY18KkCqTbQXwStaYCpppsictwhuwG326686pqrrsC1RksfgQAA%20Ow==" width="48" height="48" style="float: left; margin-top: 4px; margin-right: 4px; margin-bottom: 4px; margin-left: 4px; "><strong style="color: rgb(51, 51, 51); ">Marc Boisis-Delavaud</strong><br>Direction du Systčme d'Information<br>Université de La Rochelle<br><a href="mailto:marc.boisis@univ-lr.fr" style="color: rgb(153, 153, 153); text-decoration: none; border-bottom-width: 1px; border-bottom-color: rgb(153, 153, 153); border-bottom-style: dotted; ">marc.boisis@univ-lr.fr</a><span class="Apple-converted-space"> </span>| 05 46 45 82 14</div></span>
</div>
<br></div></body></html>