Add more validations
This commit is contained in:
parent
2893f66655
commit
888d87157c
|
@ -23,6 +23,8 @@ sh CocoASAIS
|
||||||
|
|
||||||
You can use `-d` or `-f` to debug.
|
You can use `-d` or `-f` to debug.
|
||||||
|
|
||||||
|
The script only supports UEFI boot mode.
|
||||||
|
|
||||||
## Contributing <a name="contributing"></a>
|
## Contributing <a name="contributing"></a>
|
||||||
PRs are welcome.
|
PRs are welcome.
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,12 @@ partDisks() {
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -eq 1 ]; then
|
||||||
calcHeightAndRun "whiptail --msgbox \"You will partition the disk yourself with gdisk and then, when finished, you will continue with the installation.\" HEIGHT 62 3>&1 1>&2 2>&3"
|
calcHeightAndRun "whiptail --msgbox \"You will partition the disk yourself with gdisk and then, when finished, you will continue with the installation.\" HEIGHT 62 3>&1 1>&2 2>&3"
|
||||||
gdisk $disk
|
gdisk $disk
|
||||||
|
parts=$(lsblk /dev/sdb -nl | wc -l)
|
||||||
|
if [ $parts -eq 1 ]; then
|
||||||
|
whiptail --msgbox "You must at least create boot and root partitions." 0 0
|
||||||
|
logStep "partDisks"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
# TODO: Ask for home partition
|
# TODO: Ask for home partition
|
||||||
formatOptions $(lsblk ${disk} -pnlo NAME,SIZE,MOUNTPOINTS | sed -n '2~1p')
|
formatOptions $(lsblk ${disk} -pnlo NAME,SIZE,MOUNTPOINTS | sed -n '2~1p')
|
||||||
result=$(whiptail --title "Select the boot partition." --menu "" 0 0 0 "${options[@]}" 3>&1 1>&2 2>&3)
|
result=$(whiptail --title "Select the boot partition." --menu "" 0 0 0 "${options[@]}" 3>&1 1>&2 2>&3)
|
||||||
|
|
Loading…
Reference in New Issue