Mailing List Archive

clogin and config mode
When using the -c or -x options of clogin to script config changes, I am
unable to enter config mode and enter commands. I have tried on a
variety of Cisco models and IOS versions with no luck.

Has anyone else seen this?

Thanks,
Joe

Example:
$clogin -c "conf t; exit" router
router
spawn telnet router
Connected to router.
Escape character is '^]'.


User Access Verification

Password:
router>enable
Password:
router#
router#term length 0
router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
*** Here is where it hangs ***
clogin and config mode [ In reply to ]
On Thu, Dec 05, 2002 at 03:19:18PM -0800, Rizzo, Joe wrote:
> When using the -c or -x options of clogin to script config changes, I am
> unable to enter config mode and enter commands. I have tried on a
> variety of Cisco models and IOS versions with no luck.

Prompt recognition. $prompt is probably set to 'router#' - which
does not match the prompt in config mode - router(config)#

You want to do something like:
clogin -c "conf t\rip name-server 198.6.255.248\rend;write" router

- basically glom all of the config commands together with \r between
them until you get all the way out of config mode.

Or set up a per router tftp/rcp// file on your server and use
something like util/cisco-load.exp to load it.
--asp