Code zum Finden der UUID einer Partition hinzugefügt.
This commit is contained in:
parent
aa18bc5e73
commit
bde3e23553
1 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash -x
|
||||||
### Konstanten ###
|
### Konstanten ###
|
||||||
|
|
||||||
declare -A GUIDS=""
|
declare -A GUIDS=""
|
||||||
|
@ -134,8 +134,8 @@ find_uuid_for_partition () {
|
||||||
local TYPE="$2"
|
local TYPE="$2"
|
||||||
if [[ "$(existing_partitions "${DEVICE}" "${TYPE}")" == "yes" ]]
|
if [[ "$(existing_partitions "${DEVICE}" "${TYPE}")" == "yes" ]]
|
||||||
then
|
then
|
||||||
uuid=$()
|
uuid=$(lsblk -lo PARTTYPE,PARTUUID "${DEVICE}" | grep "${GUIDS[${TYPE}]}" | awk '{ print $2 }')
|
||||||
echo "uuid"
|
echo "uuid: ${uuid}"
|
||||||
else
|
else
|
||||||
echo "null"
|
echo "null"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue