allow /home on / in quicksetuü

This commit is contained in:
Tobias Powalowski 2023-08-27 17:19:35 +02:00
parent 4b1c246263
commit 8a0e5425b4

View file

@ -170,7 +170,7 @@ _autoprepare() {
fi fi
if [[ -n "${_UEFISYS_BOOTDEV}" ]]; then if [[ -n "${_UEFISYS_BOOTDEV}" ]]; then
while [[ -z "${_UEFISYSDEV_SET}" ]]; do while [[ -z "${_UEFISYSDEV_SET}" ]]; do
_dialog --title " /boot In MiB" --no-cancel --inputbox "Minimum value is 260 | Disk space left: ${_DISK_SIZE}M" 8 55 "512" 2>"${_ANSWER}" || return 1 _dialog --title " /boot In MiB" --no-cancel --inputbox "Disk space left: ${_DISK_SIZE}M | Minimum value is 260" 8 55 "512" 2>"${_ANSWER}" || return 1
_UEFISYSDEV_SIZE="$(cat "${_ANSWER}")" _UEFISYSDEV_SIZE="$(cat "${_ANSWER}")"
if [[ -z "${_UEFISYSDEV_SIZE}" ]]; then if [[ -z "${_UEFISYSDEV_SIZE}" ]]; then
_dialog --title " ERROR " --no-mouse --infobox "You have entered a invalid size, please enter again." 3 60 _dialog --title " ERROR " --no-mouse --infobox "You have entered a invalid size, please enter again." 3 60
@ -189,7 +189,7 @@ _autoprepare() {
done done
else else
while [[ -z "${_UEFISYSDEV_SET}" ]]; do while [[ -z "${_UEFISYSDEV_SET}" ]]; do
_dialog --title " EFI SYSTEM PARTITION (ESP) In MiB " --no-cancel --inputbox "Minimum value is 260 | Disk space left: ${_DISK_SIZE}M" 8 55 "1024" 2>"${_ANSWER}" || return 1 _dialog --title " EFI SYSTEM PARTITION (ESP) In MiB " --no-cancel --inputbox "Disk space left: ${_DISK_SIZE}M | Minimum value is 260" 8 55 "1024" 2>"${_ANSWER}" || return 1
_UEFISYSDEV_SIZE="$(cat "${_ANSWER}")" _UEFISYSDEV_SIZE="$(cat "${_ANSWER}")"
if [[ -z "${_UEFISYSDEV_SIZE}" ]]; then if [[ -z "${_UEFISYSDEV_SIZE}" ]]; then
_dialog --title " ERROR " --no-mouse --infobox "You have entered a invalid size, please enter again." 3 60 _dialog --title " ERROR " --no-mouse --infobox "You have entered a invalid size, please enter again." 3 60
@ -208,7 +208,7 @@ _autoprepare() {
fi fi
_DISK_SIZE="$((_DISK_SIZE-_UEFISYSDEV_SIZE))" _DISK_SIZE="$((_DISK_SIZE-_UEFISYSDEV_SIZE))"
while [[ -z "${_BOOTDEV_SET}" ]]; do while [[ -z "${_BOOTDEV_SET}" ]]; do
_dialog --title " /boot In MiB " --no-cancel --inputbox "Minimum value is 100 | Disk space left: ${_DISK_SIZE}M" 8 55 "512" 2>"${_ANSWER}" || return 1 _dialog --title " /boot In MiB " --no-cancel --inputbox "Disk space left: ${_DISK_SIZE}M | Minimum value is 100" 8 55 "512" 2>"${_ANSWER}" || return 1
_BOOTDEV_SIZE="$(cat "${_ANSWER}")" _BOOTDEV_SIZE="$(cat "${_ANSWER}")"
if [[ -z "${_BOOTDEV_SIZE}" ]]; then if [[ -z "${_BOOTDEV_SIZE}" ]]; then
_dialog --title " ERROR " --no-mouse --infobox "You have entered a invalid size, please enter again." 3 60 _dialog --title " ERROR " --no-mouse --infobox "You have entered a invalid size, please enter again." 3 60
@ -226,7 +226,7 @@ _autoprepare() {
done done
else else
while [[ -z "${_BOOTDEV_SET}" ]]; do while [[ -z "${_BOOTDEV_SET}" ]]; do
_dialog --title " /boot In MiB "--no-cancel --inputbox "Minimum value is 100 | Disk space left: ${_DISK_SIZE}M" 8 55 "512" 2>"${_ANSWER}" || return 1 _dialog --title " /boot In MiB "--no-cancel --inputbox "Disk space left: ${_DISK_SIZE}M | Minimum value is 100" 8 55 "512" 2>"${_ANSWER}" || return 1
_BOOTDEV_SIZE="$(cat "${_ANSWER}")" _BOOTDEV_SIZE="$(cat "${_ANSWER}")"
if [[ -z "${_BOOTDEV_SIZE}" ]]; then if [[ -z "${_BOOTDEV_SIZE}" ]]; then
_dialog --title " ERROR " --no-mouse --infobox "You have entered a invalid size, please enter again." 3 60 _dialog --title " ERROR " --no-mouse --infobox "You have entered a invalid size, please enter again." 3 60
@ -247,7 +247,7 @@ _autoprepare() {
_SWAP_SIZE="256" _SWAP_SIZE="256"
[[ "${_DISK_SIZE}" -lt "256" ]] && _SWAP_SIZE="${_DISK_SIZE}" [[ "${_DISK_SIZE}" -lt "256" ]] && _SWAP_SIZE="${_DISK_SIZE}"
while [[ -z "${_SWAPDEV_SET}" ]]; do while [[ -z "${_SWAPDEV_SET}" ]]; do
_dialog --title " Swap In MiB " --no-cancel --inputbox "0=Skip Swap partition | Disk space left: ${_DISK_SIZE}M" 8 55 "${_SWAP_SIZE}" 2>"${_ANSWER}" || return 1 _dialog --title " Swap In MiB " --no-cancel --inputbox "Disk space left: ${_DISK_SIZE}M | 0=Skip Swap partition" 8 55 "${_SWAP_SIZE}" 2>"${_ANSWER}" || return 1
_SWAPDEV_SIZE=$(cat "${_ANSWER}") _SWAPDEV_SIZE=$(cat "${_ANSWER}")
if [[ -z "${_SWAPDEV_SIZE}" ]]; then if [[ -z "${_SWAPDEV_SIZE}" ]]; then
_dialog --title " ERROR " --no-mouse --infobox "You have entered an invalid size, please enter again." 3 60 _dialog --title " ERROR " --no-mouse --infobox "You have entered an invalid size, please enter again." 3 60
@ -280,11 +280,13 @@ _autoprepare() {
_ROOTDEV_NUM="$((_DEV_NUM+1))" _ROOTDEV_NUM="$((_DEV_NUM+1))"
_DEV_NUM="${_ROOTDEV_NUM}" _DEV_NUM="${_ROOTDEV_NUM}"
while [[ -z "${_ROOTDEV_SET}" ]]; do while [[ -z "${_ROOTDEV_SET}" ]]; do
_dialog --title " / in MiB " --inputbox "Minimum value is 2000 | Disk space left: $((_DISK_SIZE-350))M\n0=Skip /home partition and use rest ${_DISK_SIZE}M for /" 9 55 "${_ROOT_SIZE}" 2>"${_ANSWER}" || return 1 _dialog --title " / in MiB " --inputbox "Disk space left: $((_DISK_SIZE-350))M | Minimum value is 2000\n0=Skip /home partition and use rest ${_DISK_SIZE}M for /" 9 55 "${_ROOT_SIZE}" 2>"${_ANSWER}" || return 1
_ROOTDEV_SIZE=$(cat "${_ANSWER}") _ROOTDEV_SIZE=$(cat "${_ANSWER}")
if [[ "${_ROOTDEV_SIZE}" == 0 ]]; then if [[ "${_ROOTDEV_SIZE}" == 0 ]]; then
_ROOTDEV_SET=1 if _dialog --yesno "${_DISK_SIZE}M will be used for your / partition. Is this OK?" 0 0; then
_SKIP_HOME=1 _ROOTDEV_SET=1
_SKIP_HOME=1
fi
else else
if [[ -z "${_ROOTDEV_SIZE}" || "${_ROOTDEV_SIZE}" == 0 || "${_ROOTDEV_SIZE}" -lt "2000" ]]; then if [[ -z "${_ROOTDEV_SIZE}" || "${_ROOTDEV_SIZE}" == 0 || "${_ROOTDEV_SIZE}" -lt "2000" ]]; then
_dialog --title " ERROR " --no-mouse --infobox "You have entered an invalid size, please enter again." 3 60 _dialog --title " ERROR " --no-mouse --infobox "You have entered an invalid size, please enter again." 3 60