[Csync2] Sequence of actions performed
Michael Niestegge
nieschinhio at gmail.com
Wed Jan 23 08:10:58 CET 2013
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?
More information about the Csync2
mailing list