[rancid] hlogin irritated echo of window size on HP's " ESC[__; __R"
Per-Olof Olsson
peo at chalmers.se
Tue May 23 05:44:37 UTC 2017
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
-----------------------------------------------
If you not try to redefine prompt string in clogin, it will also work nicely for
interactive login to HP's!
/Peo
----------------------------------------------------------
Per-Olof Olsson Email: peo at chalmers.se
Chalmers tekniska högskola IT-avdelningen
Arvid Hedvalls backe 6 412 96 Göteborg
Tel: 031/772 6738 Mob: 0707 88 3708
----------------------------------------------------------
More information about the Rancid-discuss
mailing list