Fix some read commands
parent
d549dec7bf
commit
23bb16bdc0
11
install.sh
11
install.sh
|
@ -9,7 +9,7 @@ echo "+===============================+"
|
|||
#
|
||||
|
||||
# Ping my server to check network.
|
||||
ping -c 1 kallestruik.nl
|
||||
ping -c 1 kallestruik.nl > /dev/null
|
||||
|
||||
# Check if the ping was successful. If it was not inform the user and exit.
|
||||
if [ $? != 0 ]; then
|
||||
|
@ -37,7 +37,7 @@ lsblk -o NAME,LABEL,HOTPLUG,SIZE,MODEL
|
|||
|
||||
echo "[?] Above is a list of block devices found on the system. Please choose the one that you want to use for this installation."
|
||||
echo "[?] Or enter manual to drop to a shell for manual partitioning."
|
||||
read -p "[/dev/sda,/dev/nvme0n1,manual,etc]" disk_base
|
||||
read -p "[/dev/sda,/dev/nvme0n1,manual,etc] " disk_base
|
||||
|
||||
# Check for manual mode and drop them into a shell.
|
||||
if [ $disk_base == "manual" ]; then
|
||||
|
@ -51,7 +51,7 @@ else
|
|||
fi
|
||||
|
||||
# Make sure that the user wants to erase the full disk.
|
||||
read confirmation -p "[!] This will destroy all data on device $disk_base! Are you sure you want to continue? [y/N] "
|
||||
read -p "[!] This will destroy all data on device $disk_base! Are you sure you want to continue? [y/N] " confirmation
|
||||
|
||||
# If they are not exit.
|
||||
if [ $confirmation != "y" ]; then
|
||||
|
@ -59,11 +59,12 @@ else
|
|||
exit 0
|
||||
fi
|
||||
|
||||
echo "[?] Creating GPT"
|
||||
# Create a new GPT.
|
||||
parted $disk_base -- mklabel gpt
|
||||
|
||||
# Get the size of swap to use.
|
||||
read swap_size -p "[?] How large do you want your swap to be? [GiB] "
|
||||
read -p "[?] How large do you want your swap to be? [GiB] " swap_size
|
||||
|
||||
# Create partitions.
|
||||
echo "[?] Creating partitions."
|
||||
|
@ -81,7 +82,7 @@ else
|
|||
# Get the partition prefix from the user.
|
||||
echo "[?] What prefix should be used for partitions? For HDDs and SATA SSDs this is probably the same as the device you selected earlier."
|
||||
echo "[?] For nvme SSDs it will most likely be something like /dev/nvme0n1p"
|
||||
read partition_base -p "[?] "
|
||||
read -p "[?] " partition_base
|
||||
|
||||
# Create filesystems.
|
||||
echo "[?] Creating file systems. This might take a while."
|
||||
|
|
Loading…
Reference in New Issue