diff options
Diffstat (limited to 'databases/postgresql-repmgr/files')
-rw-r--r-- | databases/postgresql-repmgr/files/patch-repmgr.c | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/databases/postgresql-repmgr/files/patch-repmgr.c b/databases/postgresql-repmgr/files/patch-repmgr.c index 98301dd07338..380d8fe43059 100644 --- a/databases/postgresql-repmgr/files/patch-repmgr.c +++ b/databases/postgresql-repmgr/files/patch-repmgr.c @@ -1,35 +1,6 @@ ---- ./repmgr.c.orig 2012-07-28 02:30:35.000000000 +1000 -+++ ./repmgr.c 2012-12-04 19:41:06.157429458 +1100 -@@ -28,6 +28,7 @@ - - #include <stdio.h> - #include <stdlib.h> -+#include <sys/wait.h> - #include <time.h> - #include <unistd.h> - -@@ -1603,11 +1604,18 @@ - char script[MAXLEN]; - int r; - -+/* On some OS, true is located in a different place than in Linux */ -+#ifdef __FreeBSD__ -+#define TRUEBIN_PATH "/usr/bin/true" -+#else -+#define TRUEBIN_PATH "/bin/true" -+#endif -+ - /* Check if we have ssh connectivity to host before trying to rsync */ - if (!remote_user[0]) -- maxlen_snprintf(script, "ssh -o Batchmode=yes %s /bin/true", host); -+ maxlen_snprintf(script, "ssh -o Batchmode=yes %s %s", host, TRUEBIN_PATH); - else -- maxlen_snprintf(script, "ssh -o Batchmode=yes %s -l %s /bin/true", host, remote_user); -+ maxlen_snprintf(script, "ssh -o Batchmode=yes %s -l %s %s", host, remote_user, TRUEBIN_PATH); - - log_debug(_("command is: %s"), script); - r = system(script); -@@ -1625,7 +1633,7 @@ +--- repmgr.c.orig 2014-03-17 21:27:40.000000000 +0800 ++++ repmgr.c 2014-05-24 17:55:10.996404127 +0800 +@@ -1871,7 +1871,7 @@ char host_string[MAXLEN]; int r; |