[rancid] Mismatched braces in tlogin
Brian Candler
b.candler at pobox.com
Mon Jul 3 06:00:57 UTC 2017
Just been trying to use tlogin from 3.3.0 with Netgear [^1]
There appears to be a spurious closing brace in the Tcl, giving an error
"extra switch pattern with no body". It looks like 3.3.2 has this
problem too.
This fixes it for me:
--- tlogin.in.orig 2017-01-10 20:59:52.000000000 +0000
+++ tlogin.in 2017-07-03 05:53:45.562490564 +0000
@@ -65,7 +65,7 @@
set arg [lindex $argv $i]
switch -glob -- $arg {
- } -d {
+ -d {
exp_internal 1
# Username
} -u* {
After that, the only problem I had was with the prompt, which is "User:"
for a Netgear with telnet. I probably should have set the userprompt
variable, but I made a local patch instead:
@@ -732,7 +732,7 @@
# Figure out prompts
set u_prompt [find userprompt $router]
if { "$u_prompt" == "" } {
- set u_prompt "(Username|Login|login|user name|name):"
+ set u_prompt "(Username|Login|login|user name|name|User):"
} else {
set u_prompt [join [lindex $u_prompt 0] ""]
}
Cheers,
Brian.
[^1] Using an old "grancid" which I dug up from here years ago:
http://www.shrubbery.net/pipermail/rancid-discuss/2008-June/003128.html
More information about the Rancid-discuss
mailing list