[rancid] Re: clogin and CSS bug and fix?

Max Allan max_allan at hotmail.com
Thu Jul 23 15:19:52 UTC 2009


>
> Try "add autoenable * 1" to tell clogin that you're getting in already enabled.
>

All the CSSs already have autoenable set. Which is why they're bypassing do_enable in clogin.
do_enable seems to set the scope of do_saveconfig to be global through all procs, so if they didn't autoenable, it would all work fine.
 
I do get the relevant config back from them even though clogin is giving a return code of 1 and dumping error text.
 
e.g. 
max $ clogin -c "sh run" css1> css1.conf
can't read "do_saveconfig": no such variable
    while executing
"if {$do_saveconfig} {
                                                    catch {send "y\r"}
                                                  } else {
                                                    catch {send "n\r"}
                                                  }"
    invoked from within
"expect -nobrace -re {^[^
 *]*css1([^#>\r\n]+)?[#>](\([^)\r\n]+\))?} {
                                                  # the Cisco CE and Jnx ERX
                                                  # return to non-enabled mode
                        ..."
    invoked from within
"expect {
        -re "^\[^\n\r *]*$reprompt"             {
                                                  # the Cisco CE and Jnx ERX
                                                  # return to non-enabled mode
                                                  # on exit in enabled mode.
                ..."
    (procedure "run_commands" line 81)
    invoked from within
"run_commands $prompt $command"
    ("foreach" body line 149)
    invoked from within
"foreach router [lrange $argv $i end] {
    set router [string tolower $router]
    # attempt at platform switching.
    set platform ""
    send_user ..."
    (file "/export/home/max/rancid/bin/clogin" line 727)

max $ echo $?
1

Thanks,
Max
_________________________________________________________________
With Windows Live, you can organise, edit, and share your photos.
http://clk.atdmt.com/UKM/go/134665338/direct/01/


More information about the Rancid-discuss mailing list