Jan Dahl
2013-12-19 08:26:28 UTC
Maybe if we could somehow define an "ignored" string? I have a couple
of thousand switches with this in the login banner, which I won't be
allowed to change any time soon:
###### ###### # #
# # # # #
# # ###### # #
# # # # #
###### ###### #
Is it un-clever? Indeed! But it has been rolled out world wide before
I started here and now I can't use rancid.
The really weird thing for me is that somehow, terminal length and
width are set at the right time, but none of my commands are pushed
after that.
Kind regards,
Jan
One can always come up with a scheme that just happens to work for
oneself because local rules specify some exact format where you can get
a regex to work for you.
That's a lot of work though. I find it easier to just change the banner.
of thousand switches with this in the login banner, which I won't be
allowed to change any time soon:
###### ###### # #
# # # # #
# # ###### # #
# # # # #
###### ###### #
Is it un-clever? Indeed! But it has been rolled out world wide before
I started here and now I can't use rancid.
The really weird thing for me is that somehow, terminal length and
width are set at the right time, but none of my commands are pushed
after that.
Kind regards,
Jan
Hello
-re "\[#>]+.*\[\n\r]+" {
exp_continue
}
to just pass over none prompter # and >.
Banner "#" and ">" is followed by CR or NL!
Only if the banner has a surrounding box made of > or #I see no-one has responded with an answer to your question.
I think the reason is that code cannot deal with ">" and "#" characters
in a banner in any sane way that gives consistent results. For rancid to
function properly, it has to know what the shell prompt is exactly for a
given device, and to do that it has to parse the entire text output.
The only tool available to detect the prompt is pattern matching which
inevitably means a regex. As a perl regex this is
^[-a-zA-Z0-9]*[>#]
and that's assuming the prompt is the hostname.
In hlogin I addedI think the reason is that code cannot deal with ">" and "#" characters
in a banner in any sane way that gives consistent results. For rancid to
function properly, it has to know what the shell prompt is exactly for a
given device, and to do that it has to parse the entire text output.
The only tool available to detect the prompt is pattern matching which
inevitably means a regex. As a perl regex this is
^[-a-zA-Z0-9]*[>#]
and that's assuming the prompt is the hostname.
-re "\[#>]+.*\[\n\r]+" {
exp_continue
}
to just pass over none prompter # and >.
Banner "#" and ">" is followed by CR or NL!
One can always come up with a scheme that just happens to work for
oneself because local rules specify some exact format where you can get
a regex to work for you.
That's a lot of work though. I find it easier to just change the banner.
Works for HPs
/Peo
----------------------------------------------------------
Per-Olof Olsson Email: peo at chalmers.se
Chalmers tekniska högskola IT-service
Hörsalsvägen 5 412 96 Göteborg
Tel: 031/772 6738 Fax: 031/772 8660
----------------------------------------------------------
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss at shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
/Peo
----------------------------------------------------------
Per-Olof Olsson Email: peo at chalmers.se
Chalmers tekniska högskola IT-service
Hörsalsvägen 5 412 96 Göteborg
Tel: 031/772 6738 Fax: 031/772 8660
----------------------------------------------------------
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss at shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
--
Alan McKinnon
alan.mckinnon at gmail.com
Alan McKinnon
alan.mckinnon at gmail.com