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 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.
|
# Check if the ping was successful. If it was not inform the user and exit.
|
||||||
if [ $? != 0 ]; then
|
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 "[?] 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."
|
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.
|
# Check for manual mode and drop them into a shell.
|
||||||
if [ $disk_base == "manual" ]; then
|
if [ $disk_base == "manual" ]; then
|
||||||
|
@ -51,7 +51,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Make sure that the user wants to erase the full disk.
|
# 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 they are not exit.
|
||||||
if [ $confirmation != "y" ]; then
|
if [ $confirmation != "y" ]; then
|
||||||
|
@ -59,11 +59,12 @@ else
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "[?] Creating GPT"
|
||||||
# Create a new GPT.
|
# Create a new GPT.
|
||||||
parted $disk_base -- mklabel gpt
|
parted $disk_base -- mklabel gpt
|
||||||
|
|
||||||
# Get the size of swap to use.
|
# 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.
|
# Create partitions.
|
||||||
echo "[?] Creating partitions."
|
echo "[?] Creating partitions."
|
||||||
|
@ -81,7 +82,7 @@ else
|
||||||
# Get the partition prefix from the user.
|
# 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 "[?] 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"
|
echo "[?] For nvme SSDs it will most likely be something like /dev/nvme0n1p"
|
||||||
read partition_base -p "[?] "
|
read -p "[?] " partition_base
|
||||||
|
|
||||||
# Create filesystems.
|
# Create filesystems.
|
||||||
echo "[?] Creating file systems. This might take a while."
|
echo "[?] Creating file systems. This might take a while."
|
||||||
|
|
Loading…
Reference in New Issue