Die Ausgabe um einzelne Ausgeben für die Partitionen erweitert.

This commit is contained in:
eichehome 2023-07-25 20:54:49 +02:00
parent 438ac33769
commit fe4ca7fec7

View file

@ -23,15 +23,36 @@ fi
#----------------------------# #----------------------------#
RECREATE_PARTITIONS="1" RECREATE_PARTITIONS="1"
declare -A PARTITIONS_PRESENT=()
CHECK_PARTITIONS_OUTPUT=$(lsblk -o NAME,PARTTYPE | grep "${DRIVE//\/dev\/}[0-9]") 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") 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") 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") 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") 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