command/seal

This commit is contained in:
Mitchell Hashimoto
2015-03-04 08:56:10 -08:00
parent c0557579da
commit d8ec17588c
3 changed files with 74 additions and 4 deletions

View File

@@ -14,7 +14,9 @@ type UnsealCommand struct {
}
func (c *UnsealCommand) Run(args []string) int {
var reset bool
flags := c.Meta.FlagSet("unseal", FlagSetDefault)
flags.BoolVar(&reset, "reset", false, "")
flags.Usage = func() { c.Ui.Error(c.Help()) }
if err := flags.Parse(args); err != nil {
return 1
@@ -67,6 +69,11 @@ General Options:
not recommended. This is especially not recommended
for unsealing a vault.
Unseal Options:
-reset Reset the unsealing process by throwing away
prior keys in process to unseal the vault.
`
return strings.TrimSpace(helpText)
}