Compare commits
3 commits
9668f9d761
...
f44c9a4985
Author | SHA1 | Date | |
---|---|---|---|
f44c9a4985 | |||
b19d9c5a22 | |||
e2f41d724f |
1 changed files with 5 additions and 3 deletions
|
@ -107,7 +107,7 @@ CHECK_ESP=$(echo "${CHECK_PARTITIONS_OUTPUT}" | grep -c "c12a7328-f81f-11d2-ba4b
|
||||||
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")
|
||||||
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")
|
||||||
if [[ ${CHECK_ESP} -eq 1 && ${CHECK_USR} -eq 1 && ${CHECK_USRHASH} -eq 1 && ${CHECK_ROOT} -eq 1 ]]; then
|
if [[ ${CHECK_ESP} -eq 1 && ${CHECK_USR} -eq 1 && ${CHECK_USRHASH} -eq 1 && ${CHECK_ROOT} -eq 1 ]]; then
|
||||||
read -r "Alle Partitionen sind vorhanden. Trotzdem neu erstellen? (j/N): " confirm
|
read -r -p "Alle Partitionen sind vorhanden. Trotzdem neu erstellen? (j/N): " confirm
|
||||||
if [[ "${confirm}" == [jJ] ]];then
|
if [[ "${confirm}" == [jJ] ]];then
|
||||||
echo "Partitionen werden neu erstellt"
|
echo "Partitionen werden neu erstellt"
|
||||||
RECREATE_PARTITIONS="1"
|
RECREATE_PARTITIONS="1"
|
||||||
|
@ -115,6 +115,7 @@ if [[ ${CHECK_ESP} -eq 1 && ${CHECK_USR} -eq 1 && ${CHECK_USRHASH} -eq 1 && ${CH
|
||||||
echo "Partitionen werden nicht neu erstellt"
|
echo "Partitionen werden nicht neu erstellt"
|
||||||
RECREATE_PARTITIONS="0"
|
RECREATE_PARTITIONS="0"
|
||||||
fi
|
fi
|
||||||
|
sleep 5
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${RECREATE_PARTITIONS} -eq 1 ]]; then
|
if [[ ${RECREATE_PARTITIONS} -eq 1 ]]; then
|
||||||
|
@ -251,7 +252,7 @@ for i in ${PARTITION_NUMBERS}; do
|
||||||
done
|
done
|
||||||
|
|
||||||
# Prüfen,ob die Dateisysteme schon korrekt sind
|
# Prüfen,ob die Dateisysteme schon korrekt sind
|
||||||
FILESYSTEM_OUTPUT=$(lsblk -o NAME,FSTYPE,FSVER,PARTUUID | grep "${DRIVE//\/dev\/}[0-9]")
|
FILESYSTEM_OUTPUT=$(lsblk -o NAME,FSTYPE,FSVER,PARTUUIDi,LABEL | grep "${DRIVE//\/dev\/}[0-9]")
|
||||||
CHECK_FS_ESP=$(echo "${FILESYSTEM_OUTPUT}" | grep "${ESP_PARTITION["PARTUUID"]}" | grep -i "vfat" | grep -i "fat32" | grep -c -i "${ESP_LABEL}")
|
CHECK_FS_ESP=$(echo "${FILESYSTEM_OUTPUT}" | grep "${ESP_PARTITION["PARTUUID"]}" | grep -i "vfat" | grep -i "fat32" | grep -c -i "${ESP_LABEL}")
|
||||||
CHECK_FS_USR=$(echo "${FILESYSTEM_OUTPUT}" | grep "${USR_PARTITION["PARTUUID"]}" | grep -i "ext4" | grep -c -i "${USR_LABEL}")
|
CHECK_FS_USR=$(echo "${FILESYSTEM_OUTPUT}" | grep "${USR_PARTITION["PARTUUID"]}" | grep -i "ext4" | grep -c -i "${USR_LABEL}")
|
||||||
CHECK_FS_USRHASH=$(echo "${FILESYSTEM_OUTPUT}" | grep "${USRHASH_PARTITION["PARTUUID"]}" | grep -c -i "dm_verity_hash")
|
CHECK_FS_USRHASH=$(echo "${FILESYSTEM_OUTPUT}" | grep "${USRHASH_PARTITION["PARTUUID"]}" | grep -c -i "dm_verity_hash")
|
||||||
|
@ -260,7 +261,7 @@ CHECK_FS_ROOT=$(echo "${FILESYSTEM_OUTPUT}" | grep "${ROOT_PARTITION["PARTUUID"]
|
||||||
RECREATE_FILESYSTEMS="0"
|
RECREATE_FILESYSTEMS="0"
|
||||||
if [[ ${CHECK_FS_ESP} -eq 1 && ${CHECK_FS_USR} -eq 1 && ${CHECK_FS_USRHASH} -eq 1 && ${CHECK_FS_ROOT} -eq 1 ]]; then
|
if [[ ${CHECK_FS_ESP} -eq 1 && ${CHECK_FS_USR} -eq 1 && ${CHECK_FS_USRHASH} -eq 1 && ${CHECK_FS_ROOT} -eq 1 ]]; then
|
||||||
echo "Alles vorhanden"
|
echo "Alles vorhanden"
|
||||||
read -r "Alle Dateisysteme vorhanden. Trotzdem neu erstellen? (j/N): " confirm
|
read -r -p "Alle Dateisysteme vorhanden. Trotzdem neu erstellen? (j/N): " confirm
|
||||||
if [[ ${confirm} == [jJ] ]]; then
|
if [[ ${confirm} == [jJ] ]]; then
|
||||||
echo "Dateisysteme werden neuerstellt."
|
echo "Dateisysteme werden neuerstellt."
|
||||||
RECREATE_FILESYSTEMS="1"
|
RECREATE_FILESYSTEMS="1"
|
||||||
|
@ -268,6 +269,7 @@ if [[ ${CHECK_FS_ESP} -eq 1 && ${CHECK_FS_USR} -eq 1 && ${CHECK_FS_USRHASH} -eq
|
||||||
echo "Dateisysteme werden nicht neu erstellt."
|
echo "Dateisysteme werden nicht neu erstellt."
|
||||||
RECREATE_FILESYSTEMS="0"
|
RECREATE_FILESYSTEMS="0"
|
||||||
fi
|
fi
|
||||||
|
sleep 5
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ (${CHECK_ESP} -eq 0 || ${RECREATE_FILESYSTEMS} -eq 1) && -n ${ESP_PARTITION["PARTUUID"]} ]]; then
|
if [[ (${CHECK_ESP} -eq 0 || ${RECREATE_FILESYSTEMS} -eq 1) && -n ${ESP_PARTITION["PARTUUID"]} ]]; then
|
||||||
|
|
Loading…
Reference in a new issue