add more warning text

This commit is contained in:
Tobias Powalowski 2023-01-15 20:50:27 +01:00
parent 8ed07a3107
commit a134bd725e
4 changed files with 6 additions and 8 deletions

View file

@ -189,7 +189,6 @@ _autoprepare() {
_dialog --defaultno --yesno "${_DISK} will be COMPLETELY ERASED! Are you absolutely sure?" 0 0 || return 1 _dialog --defaultno --yesno "${_DISK} will be COMPLETELY ERASED! Are you absolutely sure?" 0 0 || return 1
[[ -e /tmp/.fstab ]] && rm -f /tmp/.fstab [[ -e /tmp/.fstab ]] && rm -f /tmp/.fstab
# disable swap and all mounted partitions, umount / last! # disable swap and all mounted partitions, umount / last!
_umountall
_printk off _printk off
_dialog --infobox "Partitioning ${_DISK} ..." 0 0 _dialog --infobox "Partitioning ${_DISK} ..." 0 0
_clean_disk "${_DISK}" _clean_disk "${_DISK}"

View file

@ -274,9 +274,9 @@ _set_device_name_scheme() {
} }
_clean_disk() { _clean_disk() {
# clear all magic strings/signatures - mdadm, lvm, partition tables etc. # clear all magic strings/signatures - mdadm, lvm, partition tables etc
wipefs -a --force "${1}" &>"${_NO_LOG}" wipefs -a --force "${1}" &>"${_NO_LOG}"
partprobe "${1}" partprobe "${1}" &>"${_NO_LOG}"
} }
_getavaildisks() _getavaildisks()
@ -350,7 +350,7 @@ _stoplvm()
[[ -n "${_LV_GROUPS}" ]] && _DETECTED_LVM=1 [[ -n "${_LV_GROUPS}" ]] && _DETECTED_LVM=1
[[ -n "${_LV_PHYSICAL}" ]] && _DETECTED_LVM=1 [[ -n "${_LV_PHYSICAL}" ]] && _DETECTED_LVM=1
if [[ -n "${_DETECTED_LVM}" ]]; then if [[ -n "${_DETECTED_LVM}" ]]; then
_dialog --defaultno --yesno "Setup detected lvm volumes, volume groups or physical devices, do you want to delete ALL of them completely?" 0 0 && _DISABLELVM=1 _dialog --defaultno --yesno "Setup detected lvm volumes, volume groups or physical devices, do you want to delete ALL of them completely?\nALL DATA WILL BE LOST!" 0 0 && _DISABLELVM=1
fi fi
if [[ -n "${_DISABLELVM}" ]]; then if [[ -n "${_DISABLELVM}" ]]; then
_umountall _umountall
@ -378,7 +378,7 @@ _stopluks()
_LUKSDEV="$(${_LSBLK} NAME,TYPE | grep " crypt$" | cut -d' ' -f1)" _LUKSDEV="$(${_LSBLK} NAME,TYPE | grep " crypt$" | cut -d' ' -f1)"
[[ -z "${_LUKSDEV}" ]] || _DETECTED_LUKS=1 [[ -z "${_LUKSDEV}" ]] || _DETECTED_LUKS=1
if [[ -n "${_DETECTED_LUKS}" ]]; then if [[ -n "${_DETECTED_LUKS}" ]]; then
_dialog --defaultno --yesno "Setup detected running luks encrypted devices, do you want to delete ALL of them completely?" 0 0 && _DISABLELUKS=1 _dialog --defaultno --yesno "Setup detected running luks encrypted devices, do you want to delete ALL of them completely?\nALL DATA WILL BE LOST!" 0 0 && _DISABLELUKS=1
fi fi
if [[ -n "${_DISABLELUKS}" ]]; then if [[ -n "${_DISABLELUKS}" ]]; then
_umountall _umountall
@ -395,7 +395,7 @@ _stopluks()
# detect not running luks devices # detect not running luks devices
${_LSBLK} FSTYPE | grep -q "crypto_LUKS" && _DETECTED_LUKS=1 ${_LSBLK} FSTYPE | grep -q "crypto_LUKS" && _DETECTED_LUKS=1
if [[ -n "${_DETECTED_LUKS}" ]]; then if [[ -n "${_DETECTED_LUKS}" ]]; then
_dialog --defaultno --yesno "Setup detected not running luks encrypted devices, do you want to delete ALL of them completely?" 0 0 && _DISABLELUKS=1 _dialog --defaultno --yesno "Setup detected not running luks encrypted devices, do you want to delete ALL of them completely?\nALL DATA WILL BE LOST!" 0 0 && _DISABLELUKS=1
fi fi
if [[ -n "${_DISABLELUKS}" ]]; then if [[ -n "${_DISABLELUKS}" ]]; then
_dialog --infobox "Removing not running luks encrypted devices ..." 0 0 _dialog --infobox "Removing not running luks encrypted devices ..." 0 0

View file

@ -102,7 +102,6 @@ _check_efisys_part() {
} }
_partition() { _partition() {
_umountall
# stop special devices, else weird things can happen during partitioning # stop special devices, else weird things can happen during partitioning
_stopluks _stopluks
_stopmd _stopmd

View file

@ -86,7 +86,7 @@ _create_luks_menu() {
#shellcheck disable=SC2086 #shellcheck disable=SC2086
dialog ${_DEFAULT} --backtitle "${_TITLE}" --menu "Manage Luks Encryption" 11 60 5 \ dialog ${_DEFAULT} --backtitle "${_TITLE}" --menu "Manage Luks Encryption" 11 60 5 \
"1" "Create Luks" \ "1" "Create Luks" \
"2" "Reset Luks Encryption completely" \ "2" "Reset Luks Encryption" \
"3" "Luks Help" \ "3" "Luks Help" \
"4" "Return to Previous Menu" 2>"${_ANSWER}" || _CANCEL=1 "4" "Return to Previous Menu" 2>"${_ANSWER}" || _CANCEL=1
_NEXTITEM="$(cat "${_ANSWER}")" _NEXTITEM="$(cat "${_ANSWER}")"