Add debug

This commit is contained in:
oddlama 2020-10-06 21:26:13 +02:00
parent 6f427dc92e
commit 87b75b2466
No known key found for this signature in database
GPG Key ID: 88EA325D51D53908
1 changed files with 2 additions and 0 deletions

View File

@ -159,10 +159,12 @@ get_device_by_uuid() {
} }
get_device_by_ptuuid() { get_device_by_ptuuid() {
echo "get_device_by_ptuuid '$ptuuid'"
local ptuuid="${1,,}" local ptuuid="${1,,}"
local dev local dev
dev="$(lsblk --all --path --pairs --output NAME,PTUUID,PARTUUID)" \ dev="$(lsblk --all --path --pairs --output NAME,PTUUID,PARTUUID)" \
|| die "Error while executing lsblk to find PTUUID=$ptuuid" || die "Error while executing lsblk to find PTUUID=$ptuuid"
echo "lsblkout: $dev"
dev="$(grep "ptuuid=\"$ptuuid\" partuuid=\"\"" <<< "${dev,,}")" \ dev="$(grep "ptuuid=\"$ptuuid\" partuuid=\"\"" <<< "${dev,,}")" \
|| die "Could not find PTUUID=... in lsblk output" || die "Could not find PTUUID=... in lsblk output"
dev="${dev%'" ptuuid='*}" dev="${dev%'" ptuuid='*}"