[rancid] Extreme Networks - Disable CLI Paging

Paul Thornton paul at prtsystems.ltd.uk
Fri Sep 13 14:15:44 UTC 2013


Hi

I have had this exact same issue; and we fixed it with the attached 
patch to clogin (not xrancid - the problem is a mis-identification of 
the prompt).

However, there is a patch on the mailing list here:
http://www.shrubbery.net/pipermail/rancid-discuss/2009-February/003645.html

which should also achieve the same thing (although I have not tried this).

Paul.

On 11/09/2013 00:34, Fleming, Graham wrote:
> Hi there. I have very basic scripting knowledge so I’m not very good at figuring these things out and I’m finally resorting to asking some much smarter folk!
>
> I have a bunch of Extreme networks switches and Ive managed to tweak the ‘xrancid’ script to fix some issues that I had out of the box with RANCID and Extreme switches.
>
> The last issue that I cannot figure out is in my saved configs, it appears the word “quit” gets mangled up in the output seemingly from the pager prompts. Example at the end.
>
> I looked through the ‘clogin’ script to see about disabling the pager but there are some comments in that script about how Extreme switches can’t have the pager disabled. Assuming this is old stuff as now they can. Running XOS v15 on these X440’s. The command “disable cli paging” will disable the pager per-session.
>
> I’ve tried messing around with ‘clogin’ to try and get it to pass this command but it doesn’t work. Anyone know if this is easy to do? Please help.
>
> Here’s what my daily diffs look like (extract). Note the work quit appears spread out in random places:
>
> Index: configs/x440-0
> ===================================================================
>    #
> - u#
>    # Module devmgr configuration.
>    #
>    enable ip-option record-timestamp
> - disable ipforwarding broadcast vlan
> + disabule ipforwarding broadcast vlan
>    disable ipforwarding broadcast vlan
> - i
>    #
>    # Module dosprotect configuration.
> - t
>    #
>    configure mvrp stpd s0
> + i
>    #
>    disable ripng export isis-level-1
> + t
>    #
>
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>
-------------- next part --------------
--- clogin.prev	2013-08-12 15:14:13.000000000 +0000
+++ clogin	2013-08-12 15:19:06.000000000 +0000
@@ -567,8 +567,22 @@
 				  }
 				  exp_continue
 				}
-	-re "$prompt"		{
-				  set prompt_match $expect_out(0,string);
+	-indices -re "$prompt"	{
+ 				  set prompt_match $expect_out(0,string);
+				  if {"$prompt_match" == ">"} {
+					# Extreme XOS >= 12.5 by default sends a banner after login
+				        # including this line:
+				        # "Press the <tab> or '?' key at any time for completions."
+				        # Match and discard it, as it is not a prompt.
+				        if [string match "\r\nPress the <tab>" \
+						[string range $expect_out(buffer) \
+						     [expr $expect_out(0,start) - 16] \
+						     $expect_out(0,start) \
+						]
+					   ] {
+					    exp_continue
+					}
+				  }
 				  break;
 				}
 	"Login invalid"		{


More information about the Rancid-discuss mailing list