From the rsync manual documentation I see that by using the option
rsync-path, it is possible to specify what program is to be run on the
remote machine to start up rsync. In particular, the program could be a
wrapper script which calls the actual rsync command in the middle, but
which does some actions before and/or after the rsync invocation. One
possible interesting use would be to acquire/release a lock (e.g., a
flock), so that the operations of rsync at the remote end could be
co-ordinated with another process which is contending for write access
to the same files.
My question is: can you also put a wrapper around rsync when using the
inetd (or xinetd) daemon approach to running rsync, by adding a line for
inetd something like the following to /etc/inetd.conf (as per the
rsyncd.conf man page):
rsync stream tcp nowait root /usr/bin/rsync rsyncd --daemon
but replacing /usr/bin/rsync with the path to your rsync-lookalike
wrapper, which in this case would be a C/C++ -code program which seizes
a lock, forks off rsync, waits for rsync to complete, then releases the
lock.
Thanks
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html