Workflow zur Partitionserstellung umgearbeitet.
This commit is contained in:
parent
048ff40795
commit
f36f3cd9e9
1 changed files with 104 additions and 18 deletions
122
test.uefi
122
test.uefi
|
@ -41,26 +41,112 @@ PARTITIONS_PRESENT+=([ROOT]="${CHECK_ROOT}")
|
|||
|
||||
echo "ESP: ${CHECK_ESP}, USR: ${CHECK_USR}, USRHASH: ${CHECK_USRHASH}, ROOT: ${CHECK_ROOT}"
|
||||
|
||||
if [[ ${PARTITIONS_PRESENT[ROOT]} -eq 1 ]]; then
|
||||
echo "Root-Partition vorhanden."
|
||||
if [[ ${PARTITIONS_PRESENT[ROOT]} -eq 1 && ${PARTITIONS_PRESENT[USR]} -eq 1 && ${PARTITIONS_PRESENT[USRHASH]} -eq 1 && ${PARTITIONS_PRESENT[ESP]} -eq 1 ]]; then
|
||||
echo "Alle Partitionen vorhanden."
|
||||
elif [[ ${PARTITIONS_PRESENT[ROOT]} -eq 0 && ${PARTITIONS_PRESENT[USR]} -eq 0 && ${PARTITIONS_PRESENT[USRHASH]} -eq 0 && ${PARTITIONS_PRESENT[ESP]} -eq 0 ]]; then
|
||||
echo "Keine Partition ist vorhanden."
|
||||
echo "Partitionen werden erstellt."
|
||||
else
|
||||
echo "Root-Partition nicht vorhanden."
|
||||
echo " ##################################################################################"
|
||||
echo " ##################################################################################"
|
||||
echo " ## _______ _ _ ___________ _ _ ___ _ ______ ##"
|
||||
echo " ## /\ / ______ \| | | |___ _____| | | | \ | |/ ___ \ ##"
|
||||
echo " ## / \ | | \/| |_____| | | | | | | | |\ \ | | / \_| ##"
|
||||
echo " ## / /\ \ | | | | | | | | | | | \ \ | | | ___ ##"
|
||||
echo " ## / /__\ \ | | | _____ | | | | | | | | \ \ | | | |_ | ##"
|
||||
echo " ## / ______ \| |_____/\| | | | | | \ \____/ | | \ \| | \___| | ##"
|
||||
echo " ## /_/ \_\________/|_| |_| |_| \________/|_| \___|\_______| ##"
|
||||
echo " ## ##"
|
||||
echo " ##################################################################################"
|
||||
echo " ##################################################################################"
|
||||
echo ""
|
||||
echo " Partitionen teilweise vorhanden."
|
||||
echo " Fehlende Partitionen:"
|
||||
for part in "${!PARTITIONS_PRESENT[@]}"; do
|
||||
echo "- $part"
|
||||
case $part in
|
||||
"ROOT" )
|
||||
echo " - Root-Partition"
|
||||
;;
|
||||
"USR" )
|
||||
echo " - /usr-Partition"
|
||||
;;
|
||||
"USRHASH" )
|
||||
echo " - /usr-Verity-Partition"
|
||||
;;
|
||||
"ESP" )
|
||||
echo " - ESP-Partition"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
echo ""
|
||||
echo " =================================================================================="
|
||||
echo ""
|
||||
echo " Alle Partitionen werden neu erstellt!"
|
||||
echo " Die gesammte Platte ${DRIVE//\/dev\/} wird verwendet!"
|
||||
echo " =================================================================================="
|
||||
echo ""
|
||||
read -r -p " Partitionen trotz der Warnung neu erstellen? (j/N): " confirm_recreate_partitions
|
||||
if [[ ${confirm_recreate_partitions} == [jJ] ]]; then
|
||||
echo
|
||||
echo "Recreate Partitions"
|
||||
else
|
||||
echo "Do nothing (Partitions)"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${PARTITIONS_PRESENT[USR]} -eq 1 ]]; then
|
||||
echo "/usr-Partition vorhanden."
|
||||
else
|
||||
echo "/usr-Partition nicht vorhanden."
|
||||
fi
|
||||
# if [[ ${PARTITIONS_PRESENT[ROOT]} -eq 1 ]]; then
|
||||
# echo "Root-Partition vorhanden."
|
||||
# read -r -p "Partition trotzdem neuerstellen? (j/N): " confirm_root
|
||||
# if [[ ${confirm_root} == [jJ] ]]; then
|
||||
# echo "Root-Partition wird neu erstellt"
|
||||
# echo sgdisk -n 0:
|
||||
# else
|
||||
# echo "Root-Partition wird nicht neu erstellt"
|
||||
# fi
|
||||
# else
|
||||
# echo "Root-Partition nicht vorhanden."
|
||||
# fi
|
||||
|
||||
if [[ ${PARTITIONS_PRESENT[USRHASH]} -eq 1 ]]; then
|
||||
echo "/usr-Verity-Partition vorhanden."
|
||||
else
|
||||
echo "/usr-Verity-Partition nicht vorhanden."
|
||||
fi
|
||||
# if [[ ${PARTITIONS_PRESENT[USR]} -eq 1 ]]; then
|
||||
# echo "/usr-Partition vorhanden."
|
||||
# read -r -p "Partition trotzdem neuerstellen? (j/N): " confirm_usr
|
||||
# if [[ ${confirm_usr} == [jJ] ]]; then
|
||||
# echo "/usr-Partition wird neu erstellt"
|
||||
# else
|
||||
# echo "/usr-Partition wird nicht neu erstellt"
|
||||
# fi
|
||||
# else
|
||||
# echo "/usr-Partition nicht vorhanden."
|
||||
# fi
|
||||
|
||||
if [[ ${PARTITIONS_PRESENT[ESP]} -eq 1 ]]; then
|
||||
echo "ESP-Partition vorhanden."
|
||||
else
|
||||
echo "ESP-Partition nicht vorhanden."
|
||||
fi
|
||||
# if [[ ${PARTITIONS_PRESENT[USRHASH]} -eq 1 ]]; then
|
||||
# echo "/usr-Verity-Partition vorhanden."
|
||||
# read -r -p "Partition trotzdem neuerstellen? (j/N): " confirm_usrhash
|
||||
# if [[ ${confirm_usrhash} == [jJ] ]]; then
|
||||
# echo "/usr-Verity-Partition wird neu erstellt"
|
||||
# else
|
||||
# echo "/usr-Verity-Partition wird nicht neu erstellt"
|
||||
# fi
|
||||
# else
|
||||
# echo "/usr-Verity-Partition nicht vorhanden."
|
||||
# fi
|
||||
|
||||
# if [[ ${PARTITIONS_PRESENT[ESP]} -eq 1 ]]; then
|
||||
# echo "ESP-Partition vorhanden."
|
||||
# read -r -p "Partition trotzdem neuerstellen? (j/N): " confirm_esp
|
||||
# if [[ ${confirm_esp} == [jJ] ]]; then
|
||||
# echo "ESP-Partition wird neu erstellt"
|
||||
# else
|
||||
# echo "ESP-Partition wird nicht neu erstellt"
|
||||
# fi
|
||||
# else
|
||||
# echo "ESP-Partition nicht vorhanden."
|
||||
# fi
|
||||
# _______ _ _ ___________ _ _ ___ _ ______
|
||||
# /\ / ______ \| | | |___ _____| | | | \ | |/ ___ \
|
||||
# / \ | | \/| |_____| | | | | | | | |\ \ | | / \_|
|
||||
# / /\ \ | | | | | | | | | | | \ \ | | | ___
|
||||
# / /__\ \ | | | _____ | | | | | | | | \ \ | | | |_ |
|
||||
# / ______ \| |_____/\| | | | | | \ \____/ | | \ \| | \___| |
|
||||
#/_/ \_\________/|_| |_| |_| \________/|_| \___|\_______|
|
Loading…
Reference in a new issue