inconsistent parameter --key-file usage results in being silently ignored when adding a key using luksAddKey
Issue Description:
Inconsistent parameter handling of key files with the luksAddKey
command.
This can be confusing to the user, especially if the command is not invoked interactively (i.e. via scripts / automation).
Example:
If you use the parameter --key-file=
when using luksAddKey
the key file is silently ignored.
Caused By:
This is because unlike other luks commands, luksAddKey
expects the key file passed in at the end of the command or via -
to pass stdin.
Suggested Solution / Workaround:
Suggest to either make luksAddKey
align with other commands and accept --key-file=
input, or at least issue a warning like --key-file= style input is not supported by the luksAddKey command, try stdin.