[rancid] Dell Switches with "K" in the host name fail
Fleming, Graham
gfleming at srk.com
Tue Apr 2 16:00:15 UTC 2013
Thanks Matej! I had seen this already but couldn't figure out why it was there.
For some reason when running drancid on certain Dell Powerconnect switches, "[K" gets prepended the prompt. This line seems to be trying to remove that "[K".
I got rid of the K but now certain switches have "K" prepended.
I'm not very good with Perl but this is my fix and I think it works:
$prompt =~ tr/\033\\\[//d;
$prompt =~ s/^K//d;
On 2013-04-02, at 5:02 AM, Matej Vadnjal <matej.vadnjal at arnes.si> wrote:
> On 27. 03. 2013 18:07, Fleming, Graham wrote:
>> Hello everyone,
>>
>> I'm using the drancid and dlogin scripts from here: http://web.rickyninja.net:81/rancid/
>>
>> Everything works OK except any Powerconnect switches that have the letter "K" in their hostname will fail.
>>
>> In debugging I notice the script deletes any instance of the K from the prompt so it never matches the prompt and never knows when commands are finished.
>>
>> Therefore, at the end of the script it errors out with:
>>
>> ": missed cmd(s): show version,show running-config,show vlan
>> found_end = 0, clean_run = 0
>> : End of run not found"
>>
>> Any ideas would be great thanks.
> Hi Graham
>
> In drancid you should have a line that reads:
>
> $prompt =~ tr/\033\\\[K//d;
>
> Remove the K from there and see if that works. I'm not sure why it is even in there, seems like a bug.
>
> Regards
> Matej Vadnjal
> Arnes
>
>
>
>
More information about the Rancid-discuss
mailing list