fix dos check

This commit is contained in:
Tobias Powalowski 2024-05-21 15:20:47 +02:00
parent 593e9c6a73
commit b8d89cd056

View file

@ -3,7 +3,7 @@
# created by Tobias Powalowski <tpowa@archlinux.org>
_check_gpt() {
_GUID_DETECTED=""
[[ "$(${_LSBLK} PTTYPE "${_DISK}")" == "gpt" ]] && _GUID_DETECTED=1
[[ "$(${_LSBLK} PTTYPE -d "${_DISK}")" == "gpt" ]] && _GUID_DETECTED=1
if [[ -z "${_GUID_DETECTED}" ]]; then
_dialog --defaultno --yesno "Setup detected no GUID (gpt) partition table on ${_DISK}.\n\nDo you want to create a new GUID (gpt) table now on ${_DISK}?\n\n${_DISK} will be COMPLETELY ERASED! Are you absolutely sure?" 0 0 || return 1
_clean_disk "${_DISK}"
@ -56,7 +56,7 @@ _partition() {
_RUN_CFDISK=1
_check_gpt
else
[[ "$(${_LSBLK} PTTYPE "${_DISK}")" == "dos" ]] && _MSDOS_DETECTED=1
[[ "$(${_LSBLK} PTTYPE -d "${_DISK}")" == "dos" ]] && _MSDOS_DETECTED=1
if [[ -z "${_MSDOS_DETECTED}" ]]; then
_dialog --defaultno --yesno "Setup detected no MBR/BIOS partition table on ${_DISK}.\nDo you want to create a MBR/BIOS partition table now on ${_DISK}?\n\n${_DISK} will be COMPLETELY ERASED! Are you absolutely sure?" 0 0 || return 1
_clean_disk "${_DISK}"