summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/rsync/files/rsync-2.6.9-pid-early.patch')
-rw-r--r--net-misc/rsync/files/rsync-2.6.9-pid-early.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/net-misc/rsync/files/rsync-2.6.9-pid-early.patch b/net-misc/rsync/files/rsync-2.6.9-pid-early.patch
new file mode 100644
index 000000000000..72482603e35e
--- /dev/null
+++ b/net-misc/rsync/files/rsync-2.6.9-pid-early.patch
@@ -0,0 +1,43 @@
+diff -ur a/clientserver.c b/clientserver.c
+--- a/clientserver.c 2006-10-24 01:36:42 +0100
++++ b/clientserver.c 2007-09-20 10:17:50 +0100
+@@ -830,21 +830,14 @@
+ return start_daemon(STDIN_FILENO, STDIN_FILENO);
+ }
+
+- if (!no_detach)
+- become_daemon();
+-
+ if (!lp_load(config_file, 1))
+ exit_cleanup(RERR_SYNTAX);
+
+- if (rsync_port == 0 && (rsync_port = lp_rsync_port()) == 0)
+- rsync_port = RSYNC_PORT;
+- if (bind_address == NULL && *lp_bind_address())
+- bind_address = lp_bind_address();
+-
+ log_init(0);
+
+- rprintf(FLOG, "rsyncd version %s starting, listening on port %d\n",
+- RSYNC_VERSION, rsync_port);
++ if (!no_detach)
++ become_daemon();
++
+ /* TODO: If listening on a particular address, then show that
+ * address too. In fact, why not just do inet_ntop on the
+ * local address??? */
+@@ -866,6 +859,14 @@
+ close(fd);
+ }
+
++ if (rsync_port == 0 && (rsync_port = lp_rsync_port()) == 0)
++ rsync_port = RSYNC_PORT;
++ if (bind_address == NULL && *lp_bind_address())
++ bind_address = lp_bind_address();
++
++ rprintf(FLOG, "rsyncd version %s starting, listening on port %d\n",
++ RSYNC_VERSION, rsync_port);
++
+ start_accept_loop(rsync_port, start_daemon);
+ return -1;
+ }