[rancid] Re: HP Procurve (hlogin): interaction in configure mode: possible?
Emmanuel Halbwachs
Emmanuel.Halbwachs at obspm.fr
Fri Jan 18 07:27:39 UTC 2008
Hello,
john heasley a écrit (Fri, Jan 18, 2008 at 12:14:59AM +0000) :
> the attached patch should fix both issues; -c and -x.
>
> # Turn off the pager and escape regex meta characters in the $prompt
> send "no page\r"
> - regsub -all "\[)(]" $prompt {\\&} reprompt
> + regsub -all {[)(]} $prompt {\\&} reprompt
> + regsub -all {^(.{1,11}).*([#>])$} $reprompt {\1([^#>\r\n]+)?[#>](\\([^)\\r\\n]+\\))?} reprompt
> expect {
> -re $reprompt {}
> -re "\[\n\r]+" { exp_continue }
Works like a charm, tested with -c and -x
Thanks a lot!
--
Emmanuel Halbwachs
Resp. Réseau/Sécurité Observatoire de Paris-Meudon
tel : (+33)1 45 07 75 54 5 Place Jules Janssen
fax : (+33)1 45 07 76 13 F 92195 MEUDON CEDEX
More information about the Rancid-discuss
mailing list