Add support for optional ":PORT" in rsync URL.
authorDavid Dykstra <dwd@samba.org>
Tue, 3 Nov 1998 21:17:40 +0000 (21:17 +0000)
committerDavid Dykstra <dwd@samba.org>
Tue, 3 Nov 1998 21:17:40 +0000 (21:17 +0000)
main.c
options.c
rsync.yo

diff --git a/main.c b/main.c
index bc587cc..9b37738 100644 (file)
--- a/main.c
+++ b/main.c
@@ -464,6 +464,7 @@ static int start_client(int argc, char *argv[])
        extern int local_server;
        extern int am_sender;
        extern char *shell_cmd;
        extern int local_server;
        extern int am_sender;
        extern char *shell_cmd;
+       extern int rsync_port;
 
        if (strncasecmp(URL_PREFIX, argv[0], strlen(URL_PREFIX)) == 0) {
                char *host, *path;
 
        if (strncasecmp(URL_PREFIX, argv[0], strlen(URL_PREFIX)) == 0) {
                char *host, *path;
@@ -476,6 +477,11 @@ static int start_client(int argc, char *argv[])
                } else {
                        path="";
                }
                } else {
                        path="";
                }
+               p = strchr(host,':');
+               if (p) {
+                       rsync_port = atoi(p+1);
+                       *p = 0;
+               }
                return start_socket_client(host, path, argc-1, argv+1);
        }
 
                return start_socket_client(host, path, argc-1, argv+1);
        }
 
index 9d7ad92..2a46a5b 100644 (file)
--- a/options.c
+++ b/options.c
@@ -88,6 +88,7 @@ void usage(int F)
   rprintf(F,"  or   rsync [OPTION]... SRC DEST\n");
   rprintf(F,"  or   rsync [OPTION]... [USER@]HOST::SRC DEST\n");
   rprintf(F,"  or   rsync [OPTION]... SRC [USER@]HOST::DEST\n");
   rprintf(F,"  or   rsync [OPTION]... SRC DEST\n");
   rprintf(F,"  or   rsync [OPTION]... [USER@]HOST::SRC DEST\n");
   rprintf(F,"  or   rsync [OPTION]... SRC [USER@]HOST::DEST\n");
+  rprintf(F,"  or   rsync [OPTION]... rsync://HOST[:PORT]/SRC DEST\n");
   rprintf(F,"\nOptions\n");
   rprintf(F," -v, --verbose               increase verbosity\n");
   rprintf(F," -c, --checksum              always checksum\n");
   rprintf(F,"\nOptions\n");
   rprintf(F," -v, --verbose               increase verbosity\n");
   rprintf(F," -c, --checksum              always checksum\n");
@@ -122,9 +123,9 @@ void usage(int F)
   rprintf(F," -T  --temp-dir=DIR          create temporary files in directory DIR\n");
   rprintf(F,"     --compare-dest=DIR      also compare destination files relative to DIR\n");
   rprintf(F," -z, --compress              compress file data\n");
   rprintf(F," -T  --temp-dir=DIR          create temporary files in directory DIR\n");
   rprintf(F,"     --compare-dest=DIR      also compare destination files relative to DIR\n");
   rprintf(F," -z, --compress              compress file data\n");
-  rprintf(F,"     --exclude=PATTERN       exclude file FILE\n");
+  rprintf(F,"     --exclude=PATTERN       exclude files matching PATTERN\n");
   rprintf(F,"     --exclude-from=FILE     exclude patterns listed in FILE\n");
   rprintf(F,"     --exclude-from=FILE     exclude patterns listed in FILE\n");
-  rprintf(F,"     --include=PATTERN       don't exclude file FILE\n");
+  rprintf(F,"     --include=PATTERN       don't exclude files matching PATTERN\n");
   rprintf(F,"     --include-from=FILE     don't exclude patterns listed in FILE\n");
   rprintf(F,"     --suffix=SUFFIX         override backup suffix\n");  
   rprintf(F,"     --version               print version number\n");  
   rprintf(F,"     --include-from=FILE     don't exclude patterns listed in FILE\n");
   rprintf(F,"     --suffix=SUFFIX         override backup suffix\n");  
   rprintf(F,"     --version               print version number\n");  
index 15f6285..7e2e473 100644 (file)
--- a/rsync.yo
+++ b/rsync.yo
@@ -13,7 +13,7 @@ rsync [options] [user@]host::module[/path] path
 
 rsync [options] path [user@]host::module[/path]
 
 
 rsync [options] path [user@]host::module[/path]
 
-rsync [options] rsync://host/module/path path
+rsync [options] rsync://host[:port]/module/path path
 
 manpagedescription()
 
 
 manpagedescription()
 
@@ -208,6 +208,7 @@ Usage: rsync [OPTION]... SRC [USER@]HOST:DEST
   or   rsync [OPTION]... SRC DEST
   or   rsync [OPTION]... [USER@]HOST::SRC DEST
   or   rsync [OPTION]... SRC [USER@]HOST::DEST
   or   rsync [OPTION]... SRC DEST
   or   rsync [OPTION]... [USER@]HOST::SRC DEST
   or   rsync [OPTION]... SRC [USER@]HOST::DEST
+  or   rsync [OPTION]... rsync://HOST[:PORT]/SRC DEST
 
 Options
  -v, --verbose               increase verbosity
 
 Options
  -v, --verbose               increase verbosity
@@ -243,10 +244,10 @@ Options
  -T  --temp-dir=DIR          create temporary files in directory DIR
      --compare-dest=DIR      also compare destination files relative to DIR
  -z, --compress              compress file data
  -T  --temp-dir=DIR          create temporary files in directory DIR
      --compare-dest=DIR      also compare destination files relative to DIR
  -z, --compress              compress file data
-     --exclude=PATTERN       exclude file FILE
-     --exclude-from=PATTERN  exclude files listed in FILE
-     --include=PATTERN       don't exclude file FILE
-     --include-from=PATTERN  don't exclude files listed in FILE
+     --exclude=PATTERN       exclude files matching PATTERN
+     --exclude-from=FILE     exclude files listed in FILE
+     --include=PATTERN       don't exclude files matching PATTERN
+     --include-from=FILE     don't exclude files listed in FILE
      --suffix=SUFFIX         override backup suffix
      --version               print version number
      --daemon                run as a rsync daemon
      --suffix=SUFFIX         override backup suffix
      --version               print version number
      --daemon                run as a rsync daemon