[rancid] hlogin irritated echo of window size on HP's " ESC[__; __R"

heasley heas at shrubbery.net
Wed May 24 21:38:49 UTC 2017


Tue, May 23, 2017 at 07:44:37AM +0200, Per-Olof Olsson:
> Hello
> 
> Think I solved the irritating echo of window size by not try to redefine to full prompt 
> sting in interactive mode for hlogin.
> 
> It's hard to find prompt sting on new HP's if not using hpuifilter. They almost don't use 
> any <CR> or <LF>, just cursor control via ESC/CSI codes.
> 
> Also prompt sting is not used after redefine it, so why try to redefine it in interactive 
> mode at all?!
> 
> Tested to not redefine prompt string in interactive mode on old 2.3.8, 3.6.2 and alpha 
> from 20170519. All work nice with no echo of window size.
> 
> !!!!This patch is from ALPHA version!!!!
> 
> *** hlogin.in_ORG-20170519      2017-05-19 17:38:22.359040817 +0200
> --- hlogin.in   2017-05-23 06:41:35.955883962 +0200
> ***************
> *** 515,528 ****
>              }
>          }
>        }
> -     # we are logged in, now figure out the full prompt
> -     send "\r"
> -     expect {
> -       -re "\[\r\n]+"          { exp_continue; }
> -       -re "^.+$prompt"        { set prompt $expect_out(0,string); }
> -     }
> 
>        if { $do_command || $do_script } {
>          # set a wide tty width.
>          set stty_init "cols 132"
>          # disable the pager
> --- 515,529 ----
>              }
>          }
>        }
> 
>        if { $do_command || $do_script } {
> +       # we are logged in, now figure out the full prompt
> +       send "\r"
> +       expect {
> +           -re "\[\r\n]+"              { exp_continue; }
> +           -re "^.+$prompt"    { set prompt $expect_out(0,string); }
> +       }
> +
>          # set a wide tty width.
>          set stty_init "cols 132"
>          # disable the pager
> -----------------------------------------------

that works.  thanks.



More information about the Rancid-discuss mailing list