Variable korrigiert, in die das Device gespeichert wird.
This commit is contained in:
parent
f0ef237c14
commit
a911f16859
1 changed files with 17 additions and 17 deletions
34
script.uefi
34
script.uefi
|
@ -67,28 +67,28 @@ erase () {
|
||||||
create () {
|
create () {
|
||||||
case $1 in
|
case $1 in
|
||||||
"USR")
|
"USR")
|
||||||
echo "sgdisk -n 0:0:+${USR_SIZE} -t 0:${GUIDS[USR]} -c 0:${USR_LABEL} ${DRIVE}"
|
echo "sgdisk -n 0:0:+${USR_SIZE} -t 0:${GUIDS[USR]} -c 0:${USR_LABEL} ${DEVICE}"
|
||||||
#sgdisk -n 0:0:+"${USR_SIZE}" -t 0:"${GUIDS[USR]}" -c 0:"${USR_LABEL}" "${DRIVE}"
|
#sgdisk -n 0:0:+"${USR_SIZE}" -t 0:"${GUIDS[USR]}" -c 0:"${USR_LABEL}" "${DEVICE}"
|
||||||
;;
|
;;
|
||||||
"ROOT")
|
"ROOT")
|
||||||
echo "sgdisk -n 0:0:+${ROOT_SIZE} -t 0:${GUIDS[ROOT]} -c 0:${ROOT_LABEL} ${DRIVE}"
|
echo "sgdisk -n 0:0:+${ROOT_SIZE} -t 0:${GUIDS[ROOT]} -c 0:${ROOT_LABEL} ${DEVICE}"
|
||||||
#sgdisk -n 0:0:+"${ROOT_SIZE}" -t 0:"${GUIDS[ROOT]}" -c 0:"${ROOT_LABEL}" "${DRIVE}"
|
#sgdisk -n 0:0:+"${ROOT_SIZE}" -t 0:"${GUIDS[ROOT]}" -c 0:"${ROOT_LABEL}" "${DEVICE}"
|
||||||
;;
|
;;
|
||||||
"USRHASH")
|
"USRHASH")
|
||||||
echo "sgdisk -n 0:0:+${USRHASH_SIZE} -t 0:${GUIDS[USRHASH]} -c 0:${USRHASH_LABEL} ${DRIVE}"
|
echo "sgdisk -n 0:0:+${USRHASH_SIZE} -t 0:${GUIDS[USRHASH]} -c 0:${USRHASH_LABEL} ${DEVICE}"
|
||||||
#sgdisk -n 0:0:+"${USRHASH_SIZE}" -t 0:"${GUIDS[USRHASH]}" -c 0:"${USRHASH_LABEL}" "${DRIVE}"
|
#sgdisk -n 0:0:+"${USRHASH_SIZE}" -t 0:"${GUIDS[USRHASH]}" -c 0:"${USRHASH_LABEL}" "${DEVICE}"
|
||||||
;;
|
;;
|
||||||
"ESP")
|
"ESP")
|
||||||
echo "sgdisk -n 0:0:+${ESP_SIZE} -t 0:${GUIDS[ESP]} -c 0:${ESP_LABEL} ${DRIVE}"
|
echo "sgdisk -n 0:0:+${ESP_SIZE} -t 0:${GUIDS[ESP]} -c 0:${ESP_LABEL} ${DEVICE}"
|
||||||
#sgdisk -n 0:0:+"${ESP_SIZE}" -t 0:"${GUIDS[ESP]}" -c 0:"${ESP_LABEL}" "${DRIVE}"
|
#sgdisk -n 0:0:+"${ESP_SIZE}" -t 0:"${GUIDS[ESP]}" -c 0:"${ESP_LABEL}" "${DEVICE}"
|
||||||
;;
|
;;
|
||||||
"SWAP")
|
"SWAP")
|
||||||
echo "sgdisk -n 0:0:+${SWAP_SIZE} -t 0:${GUIDS[SWAP]} -c 0:${SWAP_LABEL} ${DRIVE}"
|
echo "sgdisk -n 0:0:+${SWAP_SIZE} -t 0:${GUIDS[SWAP]} -c 0:${SWAP_LABEL} ${DEVICE}"
|
||||||
#sgdisk -n 0:0:+"${SWAP_SIZE}" -t 0:"${GUIDS[SWAP]}" -c 0:"${SWAP_LABEL}" "${DRIVE}"
|
#sgdisk -n 0:0:+"${SWAP_SIZE}" -t 0:"${GUIDS[SWAP]}" -c 0:"${SWAP_LABEL}" "${DEVICE}"
|
||||||
;;
|
;;
|
||||||
"TABLE")
|
"TABLE")
|
||||||
echo "sgdisk -og ${DRIVE}"
|
echo "sgdisk -og ${DEVICE}"
|
||||||
#sgdisk -og "${DRIVE}"
|
#sgdisk -og "${DEVICE}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
die 1 "Unbekannte Partition zum Erstellen angegeben"
|
die 1 "Unbekannte Partition zum Erstellen angegeben"
|
||||||
|
@ -115,10 +115,10 @@ existing_partitions () {
|
||||||
format () {
|
format () {
|
||||||
if [[ "${FORCE}" == "yes" ]]
|
if [[ "${FORCE}" == "yes" ]]
|
||||||
then
|
then
|
||||||
erase "${DRIVE}"
|
erase "${DEVICE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
EXISTING_PARTITIONS=$(existing_partitions "${DRIVE}")
|
EXISTING_PARTITIONS=$(existing_partitions "${DEVICE}")
|
||||||
if [[ "${EXISTING_PARTITIONS}" == "no" ]]
|
if [[ "${EXISTING_PARTITIONS}" == "no" ]]
|
||||||
then
|
then
|
||||||
create "TABLE"
|
create "TABLE"
|
||||||
|
@ -133,13 +133,13 @@ format () {
|
||||||
if [[ ${ask_overwrite} == [Nn] ]]
|
if [[ ${ask_overwrite} == [Nn] ]]
|
||||||
then
|
then
|
||||||
die 10 "Noch nicht implementiert"
|
die 10 "Noch nicht implementiert"
|
||||||
EXISTING_ESP=$(existing_partitions "${DRIVE}" "ESP")
|
EXISTING_ESP=$(existing_partitions "${DEVICE}" "ESP")
|
||||||
if [[ "${EXISTING_ESP}" == "no" ]]
|
if [[ "${EXISTING_ESP}" == "no" ]]
|
||||||
then
|
then
|
||||||
create "ESP"
|
create "ESP"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
erase "${DRIVE}"
|
erase "${DEVICE}"
|
||||||
create "TABLE"
|
create "TABLE"
|
||||||
create "ESP"
|
create "ESP"
|
||||||
create "USR"
|
create "USR"
|
||||||
|
@ -236,7 +236,7 @@ echo "### DEBUG ###"
|
||||||
|
|
||||||
# Prüfen, ob DEVICE existiert
|
# Prüfen, ob DEVICE existiert
|
||||||
|
|
||||||
#CHECK_PARTITION_EXISTENCE_OUTPUT=$(lsblk -pldo NAME | grep -ic "${DRIVE}")
|
#CHECK_PARTITION_EXISTENCE_OUTPUT=$(lsblk -pldo NAME | grep -ic "${DEVICE}")
|
||||||
|
|
||||||
#if ! lsblk -d "${DEVICE}" > /dev/null 2>&1 ; then
|
#if ! lsblk -d "${DEVICE}" > /dev/null 2>&1 ; then
|
||||||
if [ ! -b "${DEVICE}" ]; then
|
if [ ! -b "${DEVICE}" ]; then
|
||||||
|
|
Loading…
Reference in a new issue