[rancid] reason for autoenable?

Lee ler762 at gmail.com
Thu Aug 19 19:04:25 UTC 2010


  ... more newbie questions

If the userid automatically gets priv level 15 at login and you forget
to set the autoenable flag the clogin script times out waiting for the
">" prompt.  Why was the autoenable flag added instead of changing the
expect script to look for # or >?  It seems nicer not to require a
flag...

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

and
clogin -c "sh int status err-dis" switchName
now works if I use a regular userid or one that has enable privs at login time.

Thanks,
Lee


More information about the Rancid-discuss mailing list