bug in brancid handling of prompts

Mark Cooper mcooper at blueyonder.co.uk
Thu Nov 22 13:26:11 UTC 2001


I have just come across a bug in the handling of the prompt in brancid. It occurs
when handling prompts with 'special' characters in them such as [UK-ISP1]>

I found that rrancid already had code to handle it so the following diff against
brancid should fix the problem.

172a173
>           $prompt =~ s/([][])/\\$1/g;
235c236,239
<       if (!defined($prompt)) {$prompt = ($_ =~ /^([^>]+>)/)[0]; }
---
>       if (!defined($prompt)) {
>               $prompt = ($_ =~ /^([^>]+>)/)[0];
>               $prompt =~ s/([][])/\\$1/g;
>       }

HTH

Mark




More information about the Rancid-discuss mailing list