[rancid] Re: Script with cisco-reload.exp

john heasley heas at shrubbery.net
Fri Apr 20 16:31:45 UTC 2007


Fri, Apr 20, 2007 at 02:11:49PM +0200, Christophe Terpreau:
> hello,
> 
> i'm using a script found in this mailing list to execute some commands
> on devices listed in routers.db:
> 
> clogin -x yourscript ` find . -name router.db |   xargs awk -F: '$3 ==
> "up" && $2 == "cisco" && $1 !~ /^#/ {print $1}'`
> 
> I would like to schedule a reboot with "clogin  -Ereload_arg='at
> 07:15' -s cisco-reload.exp" on the same devices list in router.db but
> "xargs awk -F: '$3 == "up" && $2 == "cisco" && $1 !~ /^#/ {print $1}'`
> " seems not working.
> 
> Thx if you can help me on this.

I expect that to work, but you haven't described the failure.  try a loop;

for rtr in `find ...` do
  clogin -s ... $rtr
done



More information about the Rancid-discuss mailing list