Code zum Finden der UUID einer Partition hinzugefügt.

This commit is contained in:
eichehome 2023-09-12 21:00:54 +02:00
parent aa18bc5e73
commit bde3e23553

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -x
### Konstanten ###
declare -A GUIDS=""
@ -134,8 +134,8 @@ find_uuid_for_partition () {
local TYPE="$2"
if [[ "$(existing_partitions "${DEVICE}" "${TYPE}")" == "yes" ]]
then
uuid=$()
echo "uuid"
uuid=$(lsblk -lo PARTTYPE,PARTUUID "${DEVICE}" | grep "${GUIDS[${TYPE}]}" | awk '{ print $2 }')
echo "uuid: ${uuid}"
else
echo "null"
fi