New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Soft reset #197
Soft reset #197
Conversation
@Antagonym looks like sign commit is required, could you push signed commit ? Else please contact one of admins to manually merge tihs feature. |
really waiting for this fix, as it's really necessary for container environments |
@Antagonym I'll merge this on the condition that You can either simply agree here, or you can submit a further patch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please default to hard
, current behavior.
In truth, I'm not sure |
… Antagonym-soft-reset Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
Closed via 14a29f9 Default is set to |
This is similar to what was suggested in #178.
This adds
soft-reset
andhard-reset
cmd-opts toinit-pki
subcommand, wherehard-reset
recursively removes the PKI directory (the current behavior) andsoft-reset
only removes most of the content, but keeps the directory and thevars
file (as well as other user created files) intact.I decided to implement this as cmd-opts instead of a
--option
, because from looking at the existing options, it seems like they are more generic or common to a family of subcommands, whereas cmd-opts seem to be specific to a single subcommand (thoughnopass
would be an exception to that rule).Note that I have made
soft-reset
the default behavior if no cmd-opt is passed, which is different from the previous behavior and may break scripts relying on this. I did this because I find this the saner option in most use-cases, but this can easily be changed if maintaining previous behavior is deemed more important.