src/zlevis: removed key option indefinitely
This commit is contained in:
parent
5b914c13a3
commit
1b067ff34c
1 changed files with 3 additions and 18 deletions
21
src/zlevis
21
src/zlevis
|
@ -36,28 +36,13 @@ encrypt_pool_info() {
|
|||
# Determine the argument path and execute the relevant script or function
|
||||
if [ -t 0 ]; then
|
||||
case "$1" in
|
||||
"decrypt")
|
||||
case "$2" in
|
||||
"pool") zfs list -Ho tpm:jwe "$3" | zlevis-decrypt;;
|
||||
*) info;;
|
||||
esac
|
||||
;;
|
||||
"encrypt")
|
||||
case "$2" in
|
||||
"pool") encrypt_pool_info;;
|
||||
*) info;;
|
||||
esac
|
||||
;;
|
||||
"decrypt") zfs list -Ho tpm:jwe "$2" | zlevis-decrypt;;
|
||||
"encrypt") encrypt_pool_info;;
|
||||
*) info;;
|
||||
esac
|
||||
else
|
||||
case "$1" in
|
||||
"encrypt")
|
||||
case "$2" in
|
||||
"pool") read -r -d . key || zfs set tpm:jwe=$(printf "%s" "$key" | zlevis-encrypt "$4") "$3";;
|
||||
*) info;;
|
||||
esac
|
||||
;;
|
||||
"encrypt") read -r -d . key || zfs set tpm:jwe=$(printf "%s" "$key" | zlevis-encrypt "$3") "$2";;
|
||||
*) info;;
|
||||
esac
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue