1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

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 <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2018-02-21 14:58:04 +11:00 committed by Amitay Isaacs
parent 81b57fa544
commit 4961711621
2 changed files with 0 additions and 19 deletions

View File

@ -466,23 +466,6 @@
</listitem>
</varlistentry>
<varlistentry>
<term>--socket=<parameter>FILENAME</parameter></term>
<listitem>
<para>
FILENAME specifies the name of the Unix domain socket that
ctdbd will create. This socket is used by local clients to
communicate with ctdbd.
</para>
<para>
The default is <filename>/usr/local/var/run/ctdb/ctdbd.socket</filename>.
You only need to use this option if you plan to run
multiple ctdbd daemons on the same physical host, usually
for testing.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>--script-log-level=<parameter>DEBUGLEVEL</parameter></term>
<listitem>

View File

@ -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"));