From a35d63050ec7e745a66c1aef8e1c8eb42d7b67a1 Mon Sep 17 00:00:00 2001 From: Jiffin Tony Thottan Date: Tue, 8 Nov 2016 19:54:11 +0530 Subject: nfs/cli : add warning message while enabling gluster nfs Change-Id: Ice70003f7295d2d8af9877e1ecf6f3c81422b30c BUG: 1376693 Signed-off-by: Jiffin Tony Thottan Reviewed-on: http://review.gluster.org/15805 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Atin Mukherjee Reviewed-by: soumya k Reviewed-by: Kaleb KEITHLEY --- cli/src/cli-cmd-parser.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'cli') diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index d6ac6fd7077..1498f6cb99a 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -1666,6 +1666,20 @@ cli_cmd_volume_set_parse (struct cli_state *state, const char **words, goto out; } } + if ((!strcmp (key, "nfs.disable")) && + (!strcmp (value, "off"))) { + question = "Gluster NFS is being deprecated in favor " + "of NFS-Ganesha Enter \"yes\" to continue " + "using Gluster NFS"; + answer = cli_cmd_get_confirmation (state, question); + if (GF_ANSWER_NO == answer) { + gf_log ("cli", GF_LOG_ERROR, "Operation " + "cancelled, exiting"); + *op_errstr = gf_strdup ("Aborted by user."); + ret = -1; + goto out; + } + } } ret = dict_set_int32 (dict, "count", wordcount-3); -- cgit