added ssd check in disk selection
This commit is contained in:
parent
8fb6610ee9
commit
38ec740df8
|
|
@ -208,23 +208,6 @@ echo -ne "Your key boards layout: ${keymap} \n"
|
||||||
set_option KEYMAP $keymap
|
set_option KEYMAP $keymap
|
||||||
}
|
}
|
||||||
|
|
||||||
drivessd () {
|
|
||||||
echo -ne "
|
|
||||||
Is this an ssd? yes/no:
|
|
||||||
"
|
|
||||||
|
|
||||||
options=("Yes" "No")
|
|
||||||
select_option $? 1 "${options[@]}"
|
|
||||||
|
|
||||||
case ${options[$?]} in
|
|
||||||
y|Y|yes|Yes|YES)
|
|
||||||
set_option MOUNT_OPTIONS "noatime,compress=zstd,ssd,commit=120";;
|
|
||||||
n|N|no|NO|No)
|
|
||||||
set_option MOUNT_OPTIONS "noatime,compress=zstd,commit=120";;
|
|
||||||
*) echo "Wrong option. Try again";drivessd;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
# selection for disk type
|
# selection for disk type
|
||||||
diskpart () {
|
diskpart () {
|
||||||
echo -ne "
|
echo -ne "
|
||||||
|
|
@ -238,15 +221,19 @@ echo -ne "
|
||||||
|
|
||||||
PS3='
|
PS3='
|
||||||
Select the disk to install on: '
|
Select the disk to install on: '
|
||||||
options=($(lsblk -n --output TYPE,KNAME,SIZE | awk '$1=="disk"{print "/dev/"$2"|"$3}'))
|
options=("$(lsblk -n --output TYPE,KNAME,SIZE | awk '$1=="disk"{print "/dev/"$2"|"$3}')")
|
||||||
|
|
||||||
select_option $? 1 "${options[@]}"
|
select_option $? 1 "${options[@]}"
|
||||||
disk=${options[$?]%|*}
|
disk=${options[$?]%|*}
|
||||||
|
|
||||||
echo -e "\n${disk%|*} selected \n"
|
echo -e "\n${disk%|*} selected \n"
|
||||||
set_option DISK ${disk%|*}
|
set_option DISK "${disk%|*}"
|
||||||
|
if [[ "$(lsblk -n --output TYPE,ROTA | awk '$1=="disk"{print $2}')" -eq "0" ]]; then
|
||||||
|
set_option "MOUNT_OPTION" "noatime,compress=zstd,ssd,commit=120"
|
||||||
|
else
|
||||||
|
set_option "MOUNT_OPTION" "noatime,compress=zstd,commit=120"
|
||||||
|
fi
|
||||||
|
|
||||||
drivessd
|
|
||||||
}
|
}
|
||||||
userinfo () {
|
userinfo () {
|
||||||
read -p "Please enter your username: " username
|
read -p "Please enter your username: " username
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue