From: Martin Schwenke Date: Wed, 21 Feb 2018 03:58:04 +0000 (+1100) Subject: ctdb-daemon: Drop ctdbd --socket option X-Git-Tag: talloc-2.1.12~127 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4961711621fd359e8b2135238b2da63243bae0a3;p=thirdparty%2Fsamba.git ctdb-daemon: Drop ctdbd --socket option Use environment variables for test-only options. The setenv() can be dropped because the socket location is either the compile-time default or the already set environment variable. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/doc/ctdbd.1.xml b/ctdb/doc/ctdbd.1.xml index 703cb7eb219..8791ead1df9 100644 --- a/ctdb/doc/ctdbd.1.xml +++ b/ctdb/doc/ctdbd.1.xml @@ -466,23 +466,6 @@ - - --socket=FILENAME - - - FILENAME specifies the name of the Unix domain socket that - ctdbd will create. This socket is used by local clients to - communicate with ctdbd. - - - The default is /usr/local/var/run/ctdb/ctdbd.socket. - You only need to use this option if you plan to run - multiple ctdbd daemons on the same physical host, usually - for testing. - - - - --script-log-level=DEBUGLEVEL diff --git a/ctdb/server/ctdbd.c b/ctdb/server/ctdbd.c index 10e92f42f42..63986b0388b 100644 --- a/ctdb/server/ctdbd.c +++ b/ctdb/server/ctdbd.c @@ -117,7 +117,6 @@ int main(int argc, const char *argv[]) struct poptOption popt_options[] = { POPT_AUTOHELP - { "socket", 0, POPT_ARG_STRING, &ctdb_socket, 0, "local socket name", "filename" }, { "debug", 'd', POPT_ARG_STRING, &options.debuglevel, 0, "debug level", NULL }, { "interactive", 'i', POPT_ARG_NONE, &interactive, 0, "don't fork", NULL }, { "public-addresses", 0, POPT_ARG_STRING, &options.public_address_list, 0, "public address list file", "filename" }, @@ -217,7 +216,6 @@ int main(int argc, const char *argv[]) setenv("CTDB_LOGGING", options.logging, 1); setenv("CTDB_DEBUGLEVEL", debug_level_to_string(DEBUGLEVEL), 1); - setenv("CTDB_SOCKET", ctdb_socket, 1); ret = ctdb_set_socketname(ctdb, ctdb_socket); if (ret == -1) { DEBUG(DEBUG_ERR, ("ctdb_set_socketname() failed\n"));