Skip to content

Commit

Permalink
base: luks-reencryption: stop on first luks match
Browse files Browse the repository at this point in the history
Assume the first luks device is the rootfs, the one requiring on-line
reencryption.

Signed-off-by: Ricardo Salveti <[email protected]>
  • Loading branch information
ricardosalveti committed Jan 10, 2024
1 parent cd3351f commit 67a82e8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -e

[ $(whoami) = "root" ] || { echo "E: You must be root" && exit 1; }

DEVICE=$(lsblk -f | awk '/crypto_LUKS/ {print $1}' | awk '{sub(/^[^a-zA-Z]*/, ""); print}')
DEVICE=$(lsblk -f | awk '/crypto_LUKS/ {print $1; exit}' | awk '{sub(/^[^a-zA-Z]*/, ""); print}')
DEVICE="/dev/${DEVICE}"

# Avoid using the PIN for OP-TEE supported PKCS#11 user authentication
Expand Down

0 comments on commit 67a82e8

Please sign in to comment.