mirror of
https://github.com/kevinveenbirkenbach/linux-image-manager.git
synced 2024-11-25 16:31:03 +01:00
Optimized luksClose
This commit is contained in:
parent
384b5ab19e
commit
fe6908e6bd
@ -33,8 +33,8 @@ create_luks_key_and_update_cryptab(){
|
|||||||
fi
|
fi
|
||||||
sudo dd if=/dev/urandom of="$secret_key_path" bs=512 count=8 &&
|
sudo dd if=/dev/urandom of="$secret_key_path" bs=512 count=8 &&
|
||||||
sudo cryptsetup -v luksAddKey "$2" "$secret_key_path" &&
|
sudo cryptsetup -v luksAddKey "$2" "$secret_key_path" &&
|
||||||
info "Opening and closing device to verify that that everything works fine..." &&
|
info "Opening and closing device to verify that that everything works fine..." || error
|
||||||
sudo cryptsetup -v luksClose "$1" &&
|
sudo cryptsetup -v luksClose "$1" || info "No need to luksClose $1."
|
||||||
sudo cryptsetup -v luksOpen "$2" "$1" --key-file="$secret_key_path" &&
|
sudo cryptsetup -v luksOpen "$2" "$1" --key-file="$secret_key_path" &&
|
||||||
sudo cryptsetup -v luksClose "$1" &&
|
sudo cryptsetup -v luksClose "$1" &&
|
||||||
info "Reading UUID..." &&
|
info "Reading UUID..." &&
|
||||||
|
Loading…
Reference in New Issue
Block a user