[rancid] 'add noenable' modifications

Jethro R Binks jethro.binks at strath.ac.uk
Fri Mar 7 11:41:57 UTC 2008


Currently in .clogin it says:

# add noenable <router name glob>

although the given example has:

# the route-server's do not provide enable access.  cmdline -noenable
# equivalent.
#add noenable route-server*     1

So you might expect that the comment should read:

# add noenable <router name glob> <1/0>

In the code, however, any value is acceptable, rather than 1 or 0:

    # look for noenable option in .cloginrc
    if { [find noenable $router] != "" } {
        set enable 0
    }

I would suggest making this consistent with autoenable, which is described 
as such in cloginrc:

# add autoenable <router name glob> <1/0>

with corresponding code:

        set ae [find autoenable $router]
        if { "$ae" == "1" } {
            set autoenable 1
            set enable 0
            set prompt "(#| \\(enable\\))"
        } else {
            set autoenable 0
            set enable $avenable
            set prompt ">"
        }


I suggest the following replacement code for the noenable code:

    if { [find noenable $router] == "1" } {
        set enable 0
    }

Jethro.


. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks
Computing Officer, IT Services
University Of Strathclyde, Glasgow, UK


More information about the Rancid-discuss mailing list