[Csync2] Sequence of actions performed

Lars Ellenberg lars.ellenberg at linbit.com
Wed Jan 23 11:02:44 CET 2013


On Wed, Jan 23, 2013 at 07:10:58AM +0000, Michael Niestegge wrote:
> Michael Niestegge <nieschinhio at ...> writes:
> > 
> > Hi,
> > 
> > I'm wondering about the order the given actions are performed.
> > It seems like the last given action is 
> > performed first. My actions block looks like this:
> > 
> > action
> >         {
> >                 pattern /var/csync/shared_config/csync2*;
> >                 exec "echo";
> >                 exec "echo updated %%";
> >                 exec "cp -f /var/csync/shared_config/csync2* /etc/csync2/";
> >                 exec "date";
> >                 logfile "/var/log/csync2/csync2_action.log";
> >                 do-local;
> >         }
> > 
> > The produced log looks like:
> > Tue Jan 22 15:21:17 CET 2013
> > updated /var/cdn/shared_config/csync2_sharedconfig.cfg
> > 
> > Tue Jan 22 15:40:28 CET 2013
> > updated /var/cdn/shared_config/csync2_sharedconfig.cfg
> > 
> > So it starts with the "date" command, followed by the "cp" thing
> > and the two "echo" commands. Is it 
> > correct by csync2 starting with the last given command?
> > 
> > Thanks for your help in advance.
> > 
> > Greetings
> > 
> > Michael
> > 
> > 
> Another more clear example:
>  action
>          {
>                  exec "1";
>                  exec "2";
>                  exec "3";
>                  exec "4";
>                  logfile "/var/log/csync2/csync2_action.log";
>                  do-local;
>          }
> 
> This action blog would produce 
> 
> 4
> 3
> 2
> 1
> 
> in the log. Any suggestions?

Write a script?

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.


More information about the Csync2 mailing list