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
|
# Determine the argument path and execute the relevant script or function
|
||||||
if [ -t 0 ]; then
|
if [ -t 0 ]; then
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"decrypt")
|
"decrypt") zfs list -Ho tpm:jwe "$2" | zlevis-decrypt;;
|
||||||
case "$2" in
|
"encrypt") encrypt_pool_info;;
|
||||||
"pool") zfs list -Ho tpm:jwe "$3" | zlevis-decrypt;;
|
|
||||||
*) info;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
"encrypt")
|
|
||||||
case "$2" in
|
|
||||||
"pool") encrypt_pool_info;;
|
|
||||||
*) info;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*) info;;
|
*) info;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"encrypt")
|
"encrypt") read -r -d . key || zfs set tpm:jwe=$(printf "%s" "$key" | zlevis-encrypt "$3") "$2";;
|
||||||
case "$2" in
|
|
||||||
"pool") read -r -d . key || zfs set tpm:jwe=$(printf "%s" "$key" | zlevis-encrypt "$4") "$3";;
|
|
||||||
*) info;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*) info;;
|
*) info;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue