ctdb-daemon: Set environment variable if running in interactive mode
authorAmitay Isaacs <amitay@gmail.com>
Tue, 26 Jun 2018 08:39:09 +0000 (18:39 +1000)
committerMartin Schwenke <martins@samba.org>
Wed, 4 Jul 2018 21:56:42 +0000 (23:56 +0200)
CTDB_INTERACTIVE will be used to tell the other daemons if the ctdb daemon
is started in interactive mode.  This is primarily used only for testing.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/server/ctdbd.c

index 146524d7a845cc8606b204d3f2bc6aa038c57d96..49e5b304d92e4913e6754f18951cb59b8c1730cd 100644 (file)
@@ -234,6 +234,7 @@ int main(int argc, const char *argv[])
        /* Log to stderr (ignoring configuration) when running as interactive */
        if (interactive) {
                logging_location = "file:";
+               setenv("CTDB_INTERACTIVE", "true", 1);
        } else {
                logging_location = logging_conf_location(conf);
        }