Check auf existierende Partitionen hinzugefügt.
This commit is contained in:
parent
2b65cdd2dd
commit
7e4bb4607a
1 changed files with 19 additions and 2 deletions
21
test.uefi
21
test.uefi
|
@ -8,7 +8,7 @@ ROOT_LABEL="root"
|
|||
USR_LABEL="usr"
|
||||
ESP_LABEL="EFI"
|
||||
|
||||
#---------------------------#
|
||||
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
|
||||
|
||||
CHECK_EXISTENCE_OUTPUT=$(lsblk -o NAME | grep -c "^${DRIVE//\/dev\/}")
|
||||
|
||||
|
@ -17,4 +17,21 @@ if [[ ${CHECK_EXISTENCE_OUTPUT} -lt 1 ]]; then
|
|||
exit 1
|
||||
else
|
||||
echo "Platte existiert , Weitermachen."
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
#----------------------------#
|
||||
|
||||
RECREATE_PARTITIONS="1"
|
||||
|
||||
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_USR=$(echo "${CHECK_PARTITIONS_OUTPUT}" | grep -c "8484680c-9521-48c6-9c11-b0720656f69e")
|
||||
|
||||
CHECK_USRHASH=$(echo "${CHECK_PARTITIONS_OUTPUT}" | grep -c "77ff5f63-e7b6-4633-acf4-1565b864c0e6")
|
||||
|
||||
CHECK_ROOT=$(echo "${CHECK_PARTITIONS_OUTPUT}" | grep -c "c12a7328-f81f-11d2-ba4b-00a0c93ec93b")
|
||||
|
||||
echo "ESP: ${CHECK_ESP}, USR: ${CHECK_USR}, USRHASH: ${CHECK_USRHASH}, ROOT: ${CHECK_ROOT}"
|
Loading…
Reference in a new issue