diff options
| -rw-r--r-- | glusterfsd/src/glusterfsd-mgmt.c | 12 | ||||
| -rw-r--r-- | glusterfsd/src/glusterfsd.c | 4 | 
2 files changed, 10 insertions, 6 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c index 2e44f94b1bd..4a3e08a31b0 100644 --- a/glusterfsd/src/glusterfsd-mgmt.c +++ b/glusterfsd/src/glusterfsd-mgmt.c @@ -2101,6 +2101,7 @@ glusterfs_mgmt_init (glusterfs_ctx_t *ctx)          char                    *host = NULL;          cmd_args = &ctx->cmd_args; +        GF_VALIDATE_OR_GOTO (THIS->name, cmd_args->volfile_server, out);          if (ctx->mgmt)                  return 0; @@ -2108,11 +2109,14 @@ glusterfs_mgmt_init (glusterfs_ctx_t *ctx)          if (cmd_args->volfile_server_port)                  port = cmd_args->volfile_server_port; -        host = "localhost"; -        if (cmd_args->volfile_server) -                host = cmd_args->volfile_server; +        host = cmd_args->volfile_server; -        ret = rpc_transport_inet_options_build (&options, host, port); +        if (cmd_args->volfile_server_transport && +            !strcmp (cmd_args->volfile_server_transport, "unix")) { +                ret = rpc_transport_unix_options_build (&options, host, 0); +        } else { +                ret = rpc_transport_inet_options_build (&options, host, port); +        }          if (ret)                  goto out; diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index f767e28b18d..bbaca1e7277 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -96,8 +96,8 @@ static error_t parse_opts (int32_t key, char *arg, struct argp_state *_state);  static struct argp_option gf_options[] = {          {0, 0, 0, 0, "Basic options:"},          {"volfile-server", ARGP_VOLFILE_SERVER_KEY, "SERVER", 0, -         "Server to get the volume file from.  This option overrides " -         "--volfile option"}, +         "Server to get the volume file from. Unix domain socket path when " +         "transport type 'unix'. This option overrides --volfile option"},          {"volfile", ARGP_VOLUME_FILE_KEY, "VOLFILE", 0,           "File to use as VOLUME_FILE"},          {"spec-file", ARGP_VOLUME_FILE_KEY, "VOLFILE", OPTION_HIDDEN,  | 
