summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker
diff options
context:
space:
mode:
authorJoe Julian <me@joejulian.name>2012-11-30 14:17:31 -0800
committerAnand Avati <avati@redhat.com>2013-02-07 17:17:18 -0800
commit83c84028552d41ec0914a0c5db97e6557d9fe039 (patch)
treea6d47de0d558792f80ccf2f8af9fc9afa140e900 /xlators/features/marker
parent9869c0f86675d7bf44ecfc246185e4a5fff21c63 (diff)
gsyncd: allow the override of the compiled-in python path
.. using the environment variable $PYTHON Change-Id: Ieaad8be98b826c803268216826e250d9944c8190 BUG: 882127 Signed-off-by: Joe Julian <me@joejulian.name> Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/4252 Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/features/marker')
-rw-r--r--xlators/features/marker/utils/src/gsyncd.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/xlators/features/marker/utils/src/gsyncd.c b/xlators/features/marker/utils/src/gsyncd.c
index a45873a7178..9c4a5bdffb3 100644
--- a/xlators/features/marker/utils/src/gsyncd.c
+++ b/xlators/features/marker/utils/src/gsyncd.c
@@ -108,6 +108,7 @@ invoke_gsyncd (int argc, char **argv)
int i = 0;
int j = 0;
char *nargv[argc + 4];
+ char *python = NULL;
if (restricted) {
size_t len;
@@ -142,7 +143,10 @@ invoke_gsyncd (int argc, char **argv)
goto error;
j = 0;
- nargv[j++] = PYTHON;
+ python = getenv("PYTHON");
+ if(!python)
+ python = PYTHON;
+ nargv[j++] = python;
nargv[j++] = GSYNCD_PREFIX"/python/syncdaemon/"GSYNCD_PY;
for (i = 1; i < argc; i++)
nargv[j++] = argv[i];
@@ -152,9 +156,9 @@ invoke_gsyncd (int argc, char **argv)
}
nargv[j++] = NULL;
- execvp (PYTHON, nargv);
+ execvp (python, nargv);
- fprintf (stderr, "exec of "PYTHON" failed\n");
+ fprintf (stderr, "exec of '%s' failed\n", python);
return 127;
error: