Parsing output, separating motd and module-list

Dave Dykstra dwd at bell-labs.com
Mon May 13 09:14:01 EST 2002


On Fri, May 10, 2002 at 11:43:11PM +0200, Niels Andersen wrote:
> I'm working on a frontend to rsync, and I've got a problem.
> 
> It's easy to get a list of files and directories from a specific path on an 
> rsync server. But from the root, I've found it very difficult to get a list 
> of modules.
> 
> I cannot see when the modt stops, and when the list begins. Can anybody help?


The -q option was put in specifically to suppress the motd.  Unfortunately,
I see it also suppresses the module list!  It also suppresses the file list
you get when you list a specific module.  Looks like we need somebody to
write a patch.  -q works by suppressing FINFO messages at the client, but
unfortunately at that point in the protocol the i/o multiplexing hasn't
been turned on yet so the client just treats all lines other than those
matching specific keywords as FINFO messages.  Probably what we need to do
is have the server put in a new string that marks the beginning of a module
list or a file list and have the client turn off the "quiet" flag at that
point.  In order to make it compatible with old clients, the special string
should look OK when printed, maybe 60 dashes or something like that.

- Dave Dykstra




More information about the rsync mailing list