Compare commits
No commits in common. "f44c9a49857e4ed0676422f33b8972726bace835" and "9668f9d7616e071a43d7382856860ce2a54dd207" have entirely different histories.
f44c9a4985
...
9668f9d761
1 changed files with 3 additions and 5 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 -p "Alle Partitionen sind vorhanden. Trotzdem neu erstellen? (j/N): " confirm
|
read -r "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,7 +115,6 @@ 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
|
||||||
|
@ -252,7 +251,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,PARTUUIDi,LABEL | grep "${DRIVE//\/dev\/}[0-9]")
|
FILESYSTEM_OUTPUT=$(lsblk -o NAME,FSTYPE,FSVER,PARTUUID | 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")
|
||||||
|
@ -261,7 +260,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 -p "Alle Dateisysteme vorhanden. Trotzdem neu erstellen? (j/N): " confirm
|
read -r "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"
|
||||||
|
@ -269,7 +268,6 @@ 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