summaryrefslogtreecommitdiffstats
path: root/ctdb/server/ctdbd.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronniesahlberg@gmail.com>2008-11-20 16:39:56 +1100
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2008-11-20 16:39:56 +1100
commit331b9bdb5f31c1ffbb1b25e82a1361033ece5eee (patch)
tree11b60161a8acf3a5b4c0dac5c9c7dba812f2fa69 /ctdb/server/ctdbd.c
parenta2a5904f6651b2bfb0913b49fe5c0435f8b91ef1 (diff)
downloadsamba-331b9bdb5f31c1ffbb1b25e82a1361033ece5eee.tar.gz
samba-331b9bdb5f31c1ffbb1b25e82a1361033ece5eee.tar.xz
samba-331b9bdb5f31c1ffbb1b25e82a1361033ece5eee.zip
dont override/change CTDB_BASE if it is already set by the shell
(This used to be ctdb commit 0a6f9326cb99f14b5c9edd0d8854d8229df49910)
Diffstat (limited to 'ctdb/server/ctdbd.c')
-rw-r--r--ctdb/server/ctdbd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ctdb/server/ctdbd.c b/ctdb/server/ctdbd.c
index 8e15df00fb0..b95aaca16e5 100644
--- a/ctdb/server/ctdbd.c
+++ b/ctdb/server/ctdbd.c
@@ -300,9 +300,11 @@ int main(int argc, const char *argv[])
ctdb->do_setsched = !options.no_setsched;
- /* setup a environment variable for the event scripts to use to find the
- installation directory */
- setenv("CTDB_BASE", ETCDIR "/ctdb", 1);
+ if (getenv("CTDB_BASE") == NULL) {
+ /* setup a environment variable for the event scripts to use
+ to find the installation directory */
+ setenv("CTDB_BASE", ETCDIR "/ctdb", 1);
+ }
/* start the protocol running (as a child) */
return ctdb_start_daemon(ctdb, interactive?False:True);