From: Wayne Davison Date: Mon, 28 Jul 2008 14:23:29 +0000 (-0700) Subject: Added the dparam.diff patch. X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/commitdiff_plain/3215b7e17bc725ab1f9d9f53bfbecb80d0642c90 Added the dparam.diff patch. --- diff --git a/dparam.diff b/dparam.diff new file mode 100644 index 0000000..c944c57 --- /dev/null +++ b/dparam.diff @@ -0,0 +1,214 @@ +This patch adds a daemon option, --dparam (-M), that lets you override +global/default items in the config file when starting the daemon up. + +To use this patch, run these commands for a successful build: + + patch -p1 = MAXPATHLEN - 10) { + snprintf(err_buf, sizeof err_buf, + "the --temp-dir path is WAY too long.\n"); +diff --git a/rsync.yo b/rsync.yo +--- a/rsync.yo ++++ b/rsync.yo +@@ -435,6 +435,7 @@ accepted: verb( + --address=ADDRESS bind to the specified address + --bwlimit=KBPS limit I/O bandwidth; KBytes per second + --config=FILE specify alternate rsyncd.conf file ++ -M, --dparam=OVERRIDE override global daemon config parameter + --no-detach do not detach from the parent + --port=PORT listen on alternate port number + --log-file=FILE override the "log file" setting +@@ -2131,6 +2132,14 @@ The default is /etc/rsyncd.conf unless the daemon is running over + a remote shell program and the remote user is not the super-user; in that case + the default is rsyncd.conf in the current directory (typically $HOME). + ++dit(bf(-M, --dparam=OVERRIDE)) This option can be used to set a daemon-config ++parameter when starting up rsync in daemon mode. It is equivalent to adding ++the parameter at the end of the global settings prior to the first module's ++definition. The parameter names can be specified without spaces, if you so ++desire. For instance: ++ ++verb( rsync --daemon -M pidfile=/path/rsync.pid ) ++ + dit(bf(--no-detach)) When running as a daemon, this option instructs + rsync to not detach itself and become a background process. This + option is required when running as a service on Cygwin, and may also +diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo +--- a/rsyncd.conf.yo ++++ b/rsyncd.conf.yo +@@ -83,10 +83,14 @@ dit(bf(motd file)) This parameter allows you to specify a + "message of the day" to display to clients on each connect. This + usually contains site information and any legal notices. The default + is no motd file. ++This can be overridden by the bf(--dparam=motdfile=FILE) ++command-line option when starting the daemon. + + dit(bf(pid file)) This parameter tells the rsync daemon to write + its process ID to that file. If the file already exists, the rsync + daemon will abort rather than overwrite the file. ++This can be overridden by the bf(--dparam=pidfile=FILE) ++command-line option when starting the daemon. + + dit(bf(port)) You can override the default port the daemon will listen on + by specifying this value (defaults to 873). This is ignored if the daemon +@@ -101,8 +105,8 @@ who like to tune their systems to the utmost degree. You can set all + sorts of socket options which may make transfers faster (or + slower!). Read the man page for the code(setsockopt()) system call for + details on some of the options you may be able to set. By default no +-special socket options are set. These settings are superseded by the +-bf(--sockopts) command-line option. ++special socket options are set. These settings can also be specified ++via the bf(--sockopts) command-line option. + + enddit() + +@@ -260,6 +264,12 @@ If the daemon fails to open to specified file, it will fall back to + using syslog and output an error about the failure. (Note that the + failure to open the specified log file used to be a fatal error.) + ++This setting can be overridden by using the bf(--log-file=FILE) or ++bf(--dparam=logfile=FILE) command-line options. The former overrides ++all the log-file parameters of the daemon and all module settings. ++The latter sets the daemon's log file and the default for all the ++modules, which still allows modules to override the default setting. ++ + dit(bf(syslog facility)) This parameter allows you to + specify the syslog facility name to use when logging messages from the + rsync daemon. You may use any standard syslog facility name which is