clogin -x fails when cisco prompt gets too long

Andrew Partan asp at partan.com
Thu Feb 6 01:56:08 UTC 2003


On Mon, Feb 03, 2003 at 06:27:19PM -0600, Zhang, Anchi wrote:
> It seems that clogin -x file will fail if the commands in file
> result in a long prompt from the device.  In the following example,
> "REP2970_Server(config-router)#" would be expected after "router
> eigrp 216" was sent.  Shortening the hostname would make the script
> work.

$prompt is set to "REP2970_Server2B_L3#" & clogin is looking for
this.  Once you go into config mode, the prompt changes & $prompt
no longer matches.

Either write your own expect script & call it via 'clogin -s script',
or stick your config comands into a rcp file & use util/cisco-load.exp,
or do something like this:
  clogin -c "conf t\rrouter eigrp 216\reigrp log-neighbor-changes\rend;wr mem"

	--asp




More information about the Rancid-discuss mailing list