[rancid] clogin can't login to more then one router.

Per-Olof Olsson peo at chalmers.se
Mon May 5 05:40:06 UTC 2014


clogin only work if one router is listed at command line.
(rancid 2.3.8 and 3.0 tested)

clogin -c "show term" router1 router2

output for second router:
--------------------------
can't read "autoenable": no such variable
    while executing
"if { $enable && $do_enapasswd && $autoenable == 0 && [llength $pswd] < 2 } {
        send_user -- "\nError: no enable password for $router in $password_file...."
    ("foreach" body line 28)
    invoked from within
"foreach router [lrange $argv $i end] {
    set router [string tolower $router]
    # attempt at platform switching.
    set platform ""
    send_user ..."
    (file "/usr/local/rancid/bin/clogin" line 759)
----------------------------

Possible more settings need to be reset before login to each router.
Got it to work for my settings, by moving "set enable 0" inside foreach loop.

3.0 clogin diff.
*** 752,757 ****
--- 752,758 ----
  set prompt_match ""
  set enable 0
  foreach router [lrange $argv $i end] {
+   set enable 0
      set router [string tolower $router]
      # attempt at platform switching.
      set platform ""




/Peo
----------------------------------------------------------
Per-Olof Olsson               Email: peo at chalmers.se
Chalmers tekniska högskola    IT-service
Arvid Hedvalls backe 6        412 96 Göteborg
Tel: 031/772 6738  Fax: 031/772 8660
Mob: 0707 88 3708
----------------------------------------------------------


More information about the Rancid-discuss mailing list