[rancid] Fixed Ciena-ws Rancid 3.6.2

Chris Wopat me at falz.net
Tue Aug 1 20:21:32 UTC 2017


On 07/31/2017 04:24 PM, heasley wrote:
> Fri, Jul 28, 2017 at 12:50:51PM -0500, Chris Wopat:
>> 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
>> what we already know about > vs #:
>>
>>      "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.



More information about the Rancid-discuss mailing list