[lvm-devel] dev-prajnoha-report-select - vgchange: With '--yes', don't prompt the user

Peter Rajnoha prajnoha at fedoraproject.org
Fri Jun 6 12:03:27 UTC 2014


Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c0f9c79ae8e1df16d23f3eb608fb4bf5455ec841
Commit:        c0f9c79ae8e1df16d23f3eb608fb4bf5455ec841
Parent:        1f2aedb1903d1422b7093f6afbdd81d912c969b6
Author:        Jonathan Brassow <jbrassow at redhat.com>
AuthorDate:    Thu Jun 5 22:45:19 2014 -0500
Committer:     Jonathan Brassow <jbrassow at redhat.com>
CommitterDate: Thu Jun 5 22:45:19 2014 -0500

vgchange:  With '--yes', don't prompt the user

If the user supplies a '--yes' argument, then don't bother them with
a question to confirm whether to change the cluster attribute (even
if clvmd isn't running).
---
 tools/vgchange.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/vgchange.c b/tools/vgchange.c
index 478a8ca..958919c 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -317,7 +317,7 @@ static int _vgchange_clustered(struct cmd_context *cmd,
 		return 0;
 	}
 
-	if (clustered) {
+	if (clustered && !arg_count(cmd, yes_ARG)) {
 		if (!dm_daemon_is_running(CLVMD_PIDFILE)) {
 			if (yes_no_prompt("LVM cluster daemon (clvmd) is not"
 					  " running.\n"




More information about the lvm-devel mailing list