From c0d04dfea790d911712aa9ea0650dc7dc87010c5 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Fri, 3 May 2019 12:09:59 -0400 Subject: [PATCH] Re-add stored-shares for init and spit out a warning (#6677) --- command/operator_init.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/command/operator_init.go b/command/operator_init.go index e47c19499dee..6c7d41925943 100644 --- a/command/operator_init.go +++ b/command/operator_init.go @@ -30,6 +30,7 @@ type OperatorInitCommand struct { flagRecoveryShares int flagRecoveryThreshold int flagRecoveryPGPKeys []string + flagStoredShares int // Consul flagConsulAuto bool @@ -139,6 +140,13 @@ func (c *OperatorInitCommand) Flags() *FlagSets { "key.", }) + f.IntVar(&IntVar{ + Name: "stored-shares", + Target: &c.flagStoredShares, + Default: -1, + Usage: "DEPRECATED: This flag does nothing. It will be removed in Vault 1.3.", + }) + // Consul Options f = set.NewFlagSet("Consul Options") @@ -220,6 +228,10 @@ func (c *OperatorInitCommand) Run(args []string) int { return 1 } + if c.flagStoredShares != -1 { + c.UI.Warn("-stored-shares has no effect and will be removed in Vault 1.3.\n") + } + // Build the initial init request initReq := &api.InitRequest{ SecretShares: c.flagKeyShares,