Die Ausgabe um einzelne Ausgeben für die Partitionen erweitert.
This commit is contained in:
parent
438ac33769
commit
fe4ca7fec7
1 changed files with 22 additions and 1 deletions
23
test.uefi
23
test.uefi
|
@ -23,15 +23,36 @@ fi
|
|||
#----------------------------#
|
||||
|
||||
RECREATE_PARTITIONS="1"
|
||||
declare -A PARTITIONS_PRESENT=()
|
||||
|
||||
CHECK_PARTITIONS_OUTPUT=$(lsblk -o NAME,PARTTYPE | grep "${DRIVE//\/dev\/}[0-9]")
|
||||
|
||||
CHECK_ESP=$(echo "${CHECK_PARTITIONS_OUTPUT}" | grep -c "c12a7328-f81f-11d2-ba4b-00a0c93ec93b")
|
||||
PARTITIONS_PRESENT+=([ESP]="${CHECK_ESP}")
|
||||
|
||||
CHECK_USR=$(echo "${CHECK_PARTITIONS_OUTPUT}" | grep -c "8484680c-9521-48c6-9c11-b0720656f69e")
|
||||
PARTITIONS_PRESENT+=([USR]="${CHECK_USR}")
|
||||
|
||||
CHECK_USRHASH=$(echo "${CHECK_PARTITIONS_OUTPUT}" | grep -c "77ff5f63-e7b6-4633-acf4-1565b864c0e6")
|
||||
PARTITIONS_PRESENT+=([USRHASH]="${CHECK_USRHASH}")
|
||||
|
||||
CHECK_ROOT=$(echo "${CHECK_PARTITIONS_OUTPUT}" | grep -c "4f68bce3-e8cd-4db1-96e7-fbcaf984b709")
|
||||
PARTITIONS_PRESENT+=([ROOT]="${CHECK_ROOT}")
|
||||
|
||||
echo "ESP: ${CHECK_ESP}, USR: ${CHECK_USR}, USRHASH: ${CHECK_USRHASH}, ROOT: ${CHECK_ROOT}"
|
||||
echo "ESP: ${CHECK_ESP}, USR: ${CHECK_USR}, USRHASH: ${CHECK_USRHASH}, ROOT: ${CHECK_ROOT}"
|
||||
|
||||
if [[ ${PARTITIONS_PRESENT[ROOT]} ]]; then
|
||||
echo "Root-Partition vorhanden."
|
||||
fi
|
||||
|
||||
if [[ ${PARTITIONS_PRESENT[USR]} ]]; then
|
||||
echo "/usr-Partition vorhanden."
|
||||
fi
|
||||
|
||||
if [[ ${PARTITIONS_PRESENT[USRHASH]} ]]; then
|
||||
echo "/usr-Verity-Partition vorhanden."
|
||||
fi
|
||||
|
||||
if [[ ${PARTITIONS_PRESENT[ESP]} ]]; then
|
||||
echo "ESP-Partition vorhanden."
|
||||
fi
|
Loading…
Reference in a new issue