diff options
author | Shaun Verch <shaun.verch@mongodb.com> | 2014-03-27 19:28:27 -0400 |
---|---|---|
committer | Shaun Verch <shaun.verch@mongodb.com> | 2014-03-28 13:46:54 -0400 |
commit | 9f0e88d0a4c00c125ce52d3954503dd1c91eae7c (patch) | |
tree | a950cc6b66e2f7494a09181a9af79070b16fc0e6 /src/mongo/db/server_options_helpers.cpp | |
parent | c5f52ad447f5ae0c1c577c270bff91c5af0d3436 (diff) | |
download | mongo-9f0e88d0a4c00c125ce52d3954503dd1c91eae7c.tar.gz |
SERVER-13379 Canonicalize nounixsocket as net.unixDomainSocket.enabled
Diffstat (limited to 'src/mongo/db/server_options_helpers.cpp')
-rw-r--r-- | src/mongo/db/server_options_helpers.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/mongo/db/server_options_helpers.cpp b/src/mongo/db/server_options_helpers.cpp index 05d508f977f..c3285616a26 100644 --- a/src/mongo/db/server_options_helpers.cpp +++ b/src/mongo/db/server_options_helpers.cpp @@ -440,6 +440,19 @@ namespace { } } + // "net.unixDomainSocket.enabled" comes from the config file, so override it if + // "nounixsocket" is set since that comes from the command line. + if (params->count("nounixsocket")) { + Status ret = params->set("net.unixDomainSocket.enabled", moe::Value(false)); + if (!ret.isOK()) { + return ret; + } + ret = params->remove("nounixsocket"); + if (!ret.isOK()) { + return ret; + } + } + return Status::OK(); } @@ -599,16 +612,10 @@ namespace { serverGlobalParams.socket = params["net.unixDomainSocket.pathPrefix"].as<string>(); } - // --nounixsocket is checked after this since net.unixDomainSocket.enabled is from the - // config file and the command line should override the config file if (params.count("net.unixDomainSocket.enabled")) { serverGlobalParams.noUnixSocket = !params["net.unixDomainSocket.enabled"].as<bool>(); } - if (params.count("nounixsocket")) { - serverGlobalParams.noUnixSocket = true; - } - if (params.count("processManagement.fork") && !params.count("shutdown")) { serverGlobalParams.doFork = true; } |