Discussion:
[rancid] Fixed Ciena-ws Rancid 3.6.2
heasley
2017-07-31 21:24:49 UTC
Permalink
I'm not sure what it is. Confirm that it is indeed in the .raw files I
sent you a while back.
The configuration guide doesn't mention it at all, it does specify
"When a user with super access privileges is logged in,
the CLI prompt for that session contains a # (hash
or pound) character (for example, Waveserver #)."
hrm, well, its clearly there. would you try the patch below (or the
current alpha)? based on the examples that i have, it ought to work.
great; thanks for testing that. Just addressing that one point, the patch
I tested this patch against the stock wavesvros.pm, did not work, it
goes back to 'end of run not found' as it was always doing.
Keeping that patch in place, I stepped through the changes from Tanner's
patch and find that it works with only one change, the addition of this
line where it is originally stated in context (in sub WriteTerm)
return (0) if ($found_end == 1)
I did a test run on several Waveservers it seems to work consistently. I
did not test with a superuser account that would use the # prompt, just
my limited user with > prompt.
somehostname-11^>logout
can you tell me what the ^ is in that prompt? in 3 of the 5 examples
folks have sent to me, the prompt has this ^ in it after the show
configuration command has run. This would cause a problem, which is
probably easy to fix if i understand the cause.
anyone?
Index: lib/wavesvros.pm.in
===================================================================
--- lib/wavesvros.pm.in (revision 3720)
+++ lib/wavesvros.pm.in (working copy)
@@ -65,10 +65,13 @@
while (/[>#]\s*($cmds_regexp)\s*$/) {
$cmd = $1;
if (!defined($prompt)) {
- $prompt = ($_ =~ /^([^>#]+[>#])/)[0];
+ $_ =~ /^([^>#*^]+)([*^])?([>#])/;
+ $prompt = $1;
+ my($tail) = $3;
$prompt =~ s/([][}{)(\\])/\\$1/g;
- # prompt changes when config is unsaved - "foo*> "
- $prompt =~ s/\*/\\\*/;
+ # prompt changes when config is unsaved - "foo*> " and may be
+ # "foo$> " for some unknown reason.
+ $prompt .= "[*^]?" . $tail . " ?";
print STDERR ("PROMPT MATCH: $prompt\n") if ($debug);
}
print STDERR ("HIT COMMAND:$_") if ($debug);
heasley
2017-08-01 22:25:35 UTC
Permalink
Post by heasley
I'm not sure what it is. Confirm that it is indeed in the .raw files I
sent you a while back.
The configuration guide doesn't mention it at all, it does specify
"When a user with super access privileges is logged in,
the CLI prompt for that session contains a # (hash
or pound) character (for example, Waveserver #)."
hrm, well, its clearly there. would you try the patch below (or the
current alpha)? based on the examples that i have, it ought to work.
Index: lib/wavesvros.pm.in
===================================================================
--- lib/wavesvros.pm.in (revision 3720)
+++ lib/wavesvros.pm.in (working copy)
@@ -65,10 +65,13 @@
while (/[>#]\s*($cmds_regexp)\s*$/) {
$cmd = $1;
if (!defined($prompt)) {
- $prompt = ($_ =~ /^([^>#]+[>#])/)[0];
+ $_ =~ /^([^>#*^]+)([*^])?([>#])/;
+ $prompt = $1;
+ my($tail) = $3;
$prompt =~ s/([][}{)(\\])/\\$1/g;
- # prompt changes when config is unsaved - "foo*> "
- $prompt =~ s/\*/\\\*/;
+ # prompt changes when config is unsaved - "foo*> " and may be
+ # "foo$> " for some unknown reason.
+ $prompt .= "[*^]?" . $tail . " ?";
print STDERR ("PROMPT MATCH: $prompt\n") if ($debug);
}
print STDERR ("HIT COMMAND:$_") if ($debug);
I applied this to the previously patched
(http://www.shrubbery.net/pipermail/rancid-discuss/2017-July/009768.html)
version and it does indeed seem to work.
I had this one line still in place as well
(http://www.shrubbery.net/pipermail/rancid-discuss/2017-July/009772.html).
It seems to work with or without it in place, so I opted to go without
it and it seems fine, tested on 4 waveservers.
Curious if the others have success as well? I'm on WaveserverOS 1.3, not
yet 1.4.
outstanding. on to the asa problem, then package 3.7.

Loading...