[Csync2] addition to contrib
Lars Ellenberg
lars.ellenberg at linbit.com
Sat Oct 25 23:39:21 CEST 2008
On Tue, Oct 21, 2008 at 06:58:00PM +0200, Art -kwaak- van Breemen wrote:
> As I said earlier, csync2 should be updated using inotify.
> There were no good solutions that are really trouble free.
> My current inotify implementation does the following things:
> On startup it recursively starts watching all directories that
> are configured.
> Once it's finished putting watches on all directories, it will
> kill the previous incarnation of itself. (In my case it takes
> about 2 minutes to startup).
> If it gets any inotify file events, it will queue these events.
> If it gets any inotify directory events it will add watches if
> it's a new directory, and then it will queue the event.
> If there is anything in the queue it will start csync2 -h for
> files (as much as possible) and csync -hr for directories (one at
> a time).
>
> Another process must check if something must be checked or not.
> (csync2 -c && csync2 -u )
> #!/usr/bin/perl -w
> # $Header: /var/lib/cvs/csyncstuff/csync2id.pl,v 1.5 2008/10/03 15:22:27 ard Exp $
> use strict;
...
yes, I'm obviously going to add the version of the script attached in
that other thread, not this one.
but, even though I hate to do so, I guess I have to ask you to please
add an explicit licence blurb. or tell me on list that you are ok with
me adding the "standard" GPL stuff at the top of that script.
I'd probably add a contrib/ directory, and put it there.
any recommendations where to put it in a package?
/usr/bin? /usr/share/doc/csync2/contrib?
also, there should probably be an example "csync2id.cfg",
with the warning that it is plain perl code that is going to be
"require"d by a process possibly running as root, so you'd better be
sure to not place dubios code like `rm -rf /` in there...
(I don't think I particularly like "config" files
that are not parsed, but actually are _interpreted_.
but never mind, I do that myself all the time anyways.
and the typical bash script gets "configured" by source-ing
its "config" file as well. which can come in handy,
for example when the original script ... ah, but I digress...)
--
: 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