[nmglug] expect

Eric Krieger gcleric at linuxjunkie.net
Wed May 24 05:30:41 PDT 2006


I believe you could also use RANCID (http://www.shrubbery.net/rancid/)
to reboot the router by setting up a cron job daily reload the router.

/usr/lib/rancid/bin/clogin -c 'reload' IPADDESSOFDEVICE

Eric



On Tue, 2006-05-23 at 17:32 -0600, Aaron Birenboim NMOSUG wrote:
> I need a script to re-boot my router every day or so.
> Too many outages.  (Cisco 678)
> 
> Anybody have an expect script (or similar) to do this?
> 
> Session would look something like:
> 
> telnet 10.0.0.1 << EOF
> userPassword
> en
> SuperUserPassword
> reboot
> EOF
> 
> of course we may need some 'expects' in between
> so the above responses come only AFTER the appropriate prompts.
> 
>             aaron
> 
> 
> 
> _______________________________________________
> nmglug mailing list
> nmglug at nmglug.org
> http://www.nmglug.org/mailman/listinfo/nmglug





More information about the nmglug mailing list