From 5c8a2812fe07b46fe8722bacb223c953f2636ebe Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 13 Mar 2015 10:38:19 -0700 Subject: [PATCH] command/init: make the output a little nicer --- command/init.go | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/command/init.go b/command/init.go index 7b3813e29..7c6262812 100644 --- a/command/init.go +++ b/command/init.go @@ -39,10 +39,25 @@ func (c *InitCommand) Run(args []string) int { return 1 } - for _, key := range resp.Keys { - c.Ui.Output(fmt.Sprintf("Key: %s", key)) + for i, key := range resp.Keys { + c.Ui.Output(fmt.Sprintf("Key %d: %s", i+1, key)) } + c.Ui.Output(fmt.Sprintf( + "\n"+ + "Vault initialized with %d keys and a key threshold of %d!\n\n"+ + "Please securely distribute the above keys. Whenever a Vault server\n"+ + "is started, it must be unsealed with %d (the threshold)\n of the"+ + "keys above (any of the keys, as long as the total number equals\n"+ + "the threshold).\n\n"+ + "Vault does not store the original master key. If you lose the keys\n"+ + "above such that you no longer have the minimum number (the\n"+ + "threshold), then your Vault will not be able to be unsealed.", + shares, + threshold, + threshold, + )) + return 0 }