summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd.c
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2011-08-22 20:28:50 +0530
committerVijay Bellur <vijay@gluster.com>2011-08-22 08:06:24 -0700
commit1acef91232abbeb5fbf9a5fce2c71cba0df2a86c (patch)
tree8f0c2c4044b08695ea64a55b8482ee40f1495620 /cli/src/cli-cmd.c
parentab6494bddc6c5dcf298f04bb38ff222952eae8d2 (diff)
cli: Exit if glusterd is not operational in non-prompt modesv3.2.3qa6v3.2.3
Change-Id: Icab7965f570e3c422e5b18b89bc418f3598c2c4d BUG: 3120 Reviewed-on: http://review.gluster.com/297 Reviewed-by: Vijay Bellur <vijay@gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'cli/src/cli-cmd.c')
-rw-r--r--cli/src/cli-cmd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/src/cli-cmd.c b/cli/src/cli-cmd.c
index 982d39d..a9016ae 100644
--- a/cli/src/cli-cmd.c
+++ b/cli/src/cli-cmd.c
@@ -132,7 +132,9 @@ cli_cmd_process (struct cli_state *state, int argc, char **argv)
if ( strcmp (word->word,"help")==0 )
goto callback;
- ret = cli_cmd_await_connected (cli_cmd_needs_connection (word));
+ state->await_connected = cli_cmd_needs_connection (word);
+
+ ret = cli_cmd_await_connected (state->await_connected);
if (ret) {
cli_out ("Connection failed. Please check if gluster "
"daemon is operational.");