Discussion:
[rancid] assistance with removing pager from Dell script
Deny IP Any Any
2009-10-05 15:23:02 UTC
Permalink
I'm running rancid 2.3.2a7 on a Ubuntu intrepid virtual. I've been
successfully gathering configs from 3 Dell 6248s via an add-on
dlogin/drancid script.

It has worked fine for months; after making a minor change to one of
the Dell switch's configs, now I'm occasionally seeing parts of the
pager in my diffs:

--- ciscodevices/configs/192.168.220.10 2009/10/05 10:03:01 1.108
+++ ciscodevices/configs/192.168.220.10 2009/10/05 14:03:11 1.109
@@ -673,7 +673,6 @@ exit
interface ethernet 3/g15
spanning-tree portfast
switchport access vlan 11
-q)uit
exit
!
interface ethernet 3/g16


I've tried editing the dlogin script to axe this line out, but instead
I get a nasty Expect error (couldn't compile regular expression
pattern: quantifier operand invalid)



-re "^*q\)uit\[^\n\r]*" {
send " "
exp_continue }



Is there a special way I need to escape the close paren in Expect?
--
deny ip any any (4393649193 matches)
john heasley
2009-10-05 15:52:00 UTC
Permalink
Post by Deny IP Any Any
I'm running rancid 2.3.2a7 on a Ubuntu intrepid virtual. I've been
successfully gathering configs from 3 Dell 6248s via an add-on
dlogin/drancid script.
It has worked fine for months; after making a minor change to one of
the Dell switch's configs, now I'm occasionally seeing parts of the
--- ciscodevices/configs/192.168.220.10 2009/10/05 10:03:01 1.108
+++ ciscodevices/configs/192.168.220.10 2009/10/05 14:03:11 1.109
@@ -673,7 +673,6 @@ exit
interface ethernet 3/g15
spanning-tree portfast
switchport access vlan 11
-q)uit
exit
!
interface ethernet 3/g16
I've tried editing the dlogin script to axe this line out, but instead
I get a nasty Expect error (couldn't compile regular expression
pattern: quantifier operand invalid)
-re "^*q\)uit\[^\n\r]*" {
send " "
exp_continue }
Is there a special way I need to escape the close paren in Expect?
the best way that i found was to disable log_user and send stuff that
I wanted to the terminal. the match you have sort of implies thats
is what the rest of your script does.
Jeremy Singletary
2009-10-06 05:40:09 UTC
Permalink
Post by Deny IP Any Any
It has worked fine for months; after making a minor change to one of
the Dell switch's configs, now I'm occasionally seeing parts of the
If your dell has the 'terminal datadump' command it would be easier to
edit the code to send that command than trying to match the pager prompts.
john heasley
2009-10-06 07:49:59 UTC
Permalink
Post by Jeremy Singletary
Post by Deny IP Any Any
It has worked fine for months; after making a minor change to one of
the Dell switch's configs, now I'm occasionally seeing parts of the
If your dell has the 'terminal datadump' command it would be easier to
edit the code to send that command than trying to match the pager prompts.
that leaves the login script less usable for other automation.
Jeremy Singletary
2009-10-07 02:08:49 UTC
Permalink
Post by john heasley
Post by Jeremy Singletary
Post by Deny IP Any Any
It has worked fine for months; after making a minor change to one of
the Dell switch's configs, now I'm occasionally seeing parts of the
If your dell has the 'terminal datadump' command it would be easier to
edit the code to send that command than trying to match the pager prompts.
that leaves the login script less usable for other automation.
How does it make it less usable for other automation? clogin uses the 'term
length 0' or 'set length 0' commands to disable the pager.
john heasley
2009-10-07 02:33:38 UTC
Permalink
Post by Jeremy Singletary
Post by john heasley
Post by Jeremy Singletary
Post by Deny IP Any Any
It has worked fine for months; after making a minor change to one of
the Dell switch's configs, now I'm occasionally seeing parts of the
If your dell has the 'terminal datadump' command it would be easier to
edit the code to send that command than trying to match the pager prompts.
that leaves the login script less usable for other automation.
How does it make it less usable for other automation? clogin uses the 'term
length 0' or 'set length 0' commands to disable the pager.
But you can't disable the pager here, right? which means that if someone
tries to use it for automation and pager comes into play, they have the
same issue. the login script should deal with the pager if possible.
Jeremy Singletary
2009-10-07 03:11:09 UTC
Permalink
Post by john heasley
Post by Jeremy Singletary
Post by john heasley
Post by Jeremy Singletary
Post by Deny IP Any Any
It has worked fine for months; after making a minor change to one of
the Dell switch's configs, now I'm occasionally seeing parts of the
If your dell has the 'terminal datadump' command it would be easier to
edit the code to send that command than trying to match the pager prompts.
that leaves the login script less usable for other automation.
How does it make it less usable for other automation? clogin uses the 'term
length 0' or 'set length 0' commands to disable the pager.
But you can't disable the pager here, right? which means that if someone
tries to use it for automation and pager comes into play, they have the
same issue. the login script should deal with the pager if possible.
Some dells will allow you to disable the pager. I don't know if this
one will or not. Until the pager recognition expect code can be updated
appropriately, disabling the pager will work for some devices and leave
you no worse off than the present paging failure.

I agree that the login script should be able to handle the pager, and I would
update the code on rickyninja to handle more dell pagers if I had access to
more than one type of dell to test against.

Loading...