mirror of
https://github.com/Le0xFF/VoidLinuxInstaller.git
synced 2024-09-11 18:47:17 +03:00
Rewrite lvm_creation function
This commit is contained in:
parent
e089428333
commit
b3ac2d6908
161
vli_rewrite.sh
161
vli_rewrite.sh
@ -19,9 +19,11 @@ user_drive=''
|
|||||||
encryption_yn='n'
|
encryption_yn='n'
|
||||||
luks_ot=''
|
luks_ot=''
|
||||||
encrypted_name=''
|
encrypted_name=''
|
||||||
|
encrypted_partition=''
|
||||||
lvm_yn='n'
|
lvm_yn='n'
|
||||||
vg_name=''
|
vg_name=''
|
||||||
lv_root_name=''
|
lv_root_name=''
|
||||||
|
lvm_partition=''
|
||||||
final_drive=''
|
final_drive=''
|
||||||
boot_partition=''
|
boot_partition=''
|
||||||
root_partition=''
|
root_partition=''
|
||||||
@ -2274,6 +2276,12 @@ function disk_encryption {
|
|||||||
echo -e -n "\n${RED_LIGHT}Please select a valid ROOT partition before enabling Full Disk Encryption.${NORMAL}\n\n"
|
echo -e -n "\n${RED_LIGHT}Please select a valid ROOT partition before enabling Full Disk Encryption.${NORMAL}\n\n"
|
||||||
read -n 1 -r -p "[Press any key to continue...]" _key
|
read -n 1 -r -p "[Press any key to continue...]" _key
|
||||||
clear
|
clear
|
||||||
|
else
|
||||||
|
if [[ $lvm_yn =~ ${regex_YES} ]] && [[ -b /dev/mapper/"$vg_name"-"$lv_root_name" ]]; then
|
||||||
|
header_de
|
||||||
|
echo -e -n "\n${RED_LIGHT}In this script is not allowed to encrypt a partition after using LVM.${NORMAL}\n\n"
|
||||||
|
read -n 1 -r -p "[Press any key to continue...]" _key
|
||||||
|
clear
|
||||||
else
|
else
|
||||||
if [[ $encryption_yn =~ ${regex_YES} ]]; then
|
if [[ $encryption_yn =~ ${regex_YES} ]]; then
|
||||||
while true; do
|
while true; do
|
||||||
@ -2283,9 +2291,10 @@ function disk_encryption {
|
|||||||
read -r yn
|
read -r yn
|
||||||
if [[ $yn =~ ${regex_YES} ]]; then
|
if [[ $yn =~ ${regex_YES} ]]; then
|
||||||
if cryptsetup close /dev/mapper/"${encrypted_name}"; then
|
if cryptsetup close /dev/mapper/"${encrypted_name}"; then
|
||||||
|
encryption_yn='n'
|
||||||
|
encrypted_partition=''
|
||||||
echo -e -n "\n${RED_LIGHT}Encryption will be disabled.${NORMAL}\n\n"
|
echo -e -n "\n${RED_LIGHT}Encryption will be disabled.${NORMAL}\n\n"
|
||||||
read -n 1 -r -p "[Press any key to continue...]" _key
|
read -n 1 -r -p "[Press any key to continue...]" _key
|
||||||
encryption_yn='n'
|
|
||||||
clear
|
clear
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
@ -2344,9 +2353,8 @@ function disk_encryption {
|
|||||||
if cryptsetup luksFormat --type=luks"$luks_ot" "$root_partition"; then
|
if cryptsetup luksFormat --type=luks"$luks_ot" "$root_partition"; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
echo -e -n "\n${RED_LIGHT}Something went wrong, please try again.${NORMAL}\n\n"
|
echo -e -n "\n${RED_LIGHT}Something went wrong, exiting...${NORMAL}\n\n"
|
||||||
read -n 1 -r -p "[Press any key to continue...]" _key
|
kill_script
|
||||||
echo
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo -e -n "\n${GREEN_LIGHT}Partition successfully encrypted.${NORMAL}\n\n"
|
echo -e -n "\n${GREEN_LIGHT}Partition successfully encrypted.${NORMAL}\n\n"
|
||||||
@ -2380,11 +2388,11 @@ function disk_encryption {
|
|||||||
if cryptsetup open "$root_partition" "$encrypted_name"; then
|
if cryptsetup open "$root_partition" "$encrypted_name"; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
echo -e -n "\n${RED_LIGHT}Something went wrong, please try again.${NORMAL}\n\n"
|
echo -e -n "\n${RED_LIGHT}Something went wrong, exiting...${NORMAL}\n\n"
|
||||||
read -n 1 -r -p "[Press any key to continue...]" _key
|
kill_script
|
||||||
echo
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
encrypted_partition=/dev/mapper/"$encrypted_name"
|
||||||
echo -e -n "\n${GREEN_LIGHT}Encrypted partition successfully mounted.${NORMAL}\n\n"
|
echo -e -n "\n${GREEN_LIGHT}Encrypted partition successfully mounted.${NORMAL}\n\n"
|
||||||
read -n 1 -r -p "[Press any key to continue...]" _key
|
read -n 1 -r -p "[Press any key to continue...]" _key
|
||||||
clear
|
clear
|
||||||
@ -2422,6 +2430,7 @@ function disk_encryption {
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2435,51 +2444,98 @@ function header_lc {
|
|||||||
|
|
||||||
function lvm_creation {
|
function lvm_creation {
|
||||||
|
|
||||||
|
if [[ $encryption_yn =~ ${regex_NO} ]] && [[ ! -b "$root_partition" ]]; then
|
||||||
|
header_lc
|
||||||
|
echo -e -n "\n${RED_LIGHT}Please select a valid ROOT partition before enabling LVM.${NORMAL}\n\n"
|
||||||
|
read -n 1 -r -p "[Press any key to continue...]" _key
|
||||||
|
clear
|
||||||
|
elif [[ $encryption_yn =~ ${regex_YES} ]] && [[ ! -b "$encrypted_partition" ]]; then
|
||||||
|
header_lc
|
||||||
|
echo -e -n "\n${RED_LIGHT}Please encrypt a valid ROOT partition before enabling LVM.${NORMAL}\n\n"
|
||||||
|
read -n 1 -r -p "[Press any key to continue...]" _key
|
||||||
|
clear
|
||||||
|
else
|
||||||
|
if [[ $lvm_yn =~ ${regex_YES} ]]; then
|
||||||
|
while true; do
|
||||||
|
header_de
|
||||||
|
if [[ $encryption_yn =~ ${regex_YES} ]]; then
|
||||||
|
echo -e -n "\nLVM is already enabled for partition ${BLUE_LIGHT}$root_partition${NORMAL}."
|
||||||
|
elif [[ $encryption_yn =~ ${regex_NO} ]]; then
|
||||||
|
echo -e -n "\nLVM is already enabled for partition ${BLUE_LIGHT}$encrypted_partition${NORMAL}."
|
||||||
|
fi
|
||||||
|
echo -e -n "\nDo you want to disable it? (y/n): "
|
||||||
|
read -r yn
|
||||||
|
if [[ $yn =~ ${regex_YES} ]]; then
|
||||||
|
if lvchange -an /dev/mapper/"$vg_name"-"$lv_root_name" && vgchange -an /dev/mapper/"$vg_name"; then
|
||||||
|
lvm_yn='n'
|
||||||
|
lvm_partition=''
|
||||||
|
echo -e -n "\n${RED_LIGHT}LVM will be disabled.${NORMAL}\n\n"
|
||||||
|
read -n 1 -r -p "[Press any key to continue...]" _key
|
||||||
|
clear
|
||||||
|
break
|
||||||
|
else
|
||||||
|
echo -e -n "\n${RED_LIGHT}Something went wrong, exiting...${NORMAL}\n\n"
|
||||||
|
kill_script
|
||||||
|
fi
|
||||||
|
elif [[ $yn =~ ${regex_NO} ]]; then
|
||||||
|
clear
|
||||||
|
break
|
||||||
|
else
|
||||||
|
echo -e -n "\n${RED_LIGHT}Not a valid input.${NORMAL}\n\n"
|
||||||
|
read -n 1 -r -p "[Press any key to continue...]" _key
|
||||||
|
clear
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
elif [[ $lvm_yn =~ ${regex_NO} ]]; then
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
|
|
||||||
header_lc
|
header_lc
|
||||||
|
|
||||||
echo -e -n "\nWith LVM will be easier in the future to add more space\nto the root partition without formatting the whole system\n"
|
echo -e -n "\nWith LVM will be easier in the future to add more space"
|
||||||
|
echo -e -n "\nto the ROOT partition without formatting the whole system.\n"
|
||||||
echo -e -n "\nDo you want to use ${BLUE_LIGHT}LVM${NORMAL}? (y/n): "
|
echo -e -n "\nDo you want to use ${BLUE_LIGHT}LVM${NORMAL}? (y/n): "
|
||||||
read -n 1 -r lvm_yn
|
read -r lvm_yn
|
||||||
|
|
||||||
if [[ "$lvm_yn" == "y" ]] || [[ "$lvm_yn" == "Y" ]]; then
|
if [[ $lvm_yn =~ ${regex_YES} ]]; then
|
||||||
|
|
||||||
clear
|
clear
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
|
|
||||||
header_lc
|
header_lc
|
||||||
|
|
||||||
echo -e -n "\nCreating logical partitions wih LVM.\n"
|
echo -e -n "\nCreating logical partitions wih LVM.\n"
|
||||||
|
|
||||||
echo -e -n "\nEnter a ${BLUE_LIGHT}name${NORMAL} for the ${BLUE_LIGHT}Volume Group${NORMAL} without any spaces (i.e. MyLinuxVolumeGroup).\n"
|
echo -e -n "\nEnter a ${BLUE_LIGHT}name${NORMAL} for the ${BLUE_LIGHT}Volume Group${NORMAL} without any spaces (i.e. MyLinuxVolumeGroup).\n"
|
||||||
echo -e -n "\nThe name will be used to mount the Volume Group as: ${BLUE_LIGHT}/dev/mapper/[...]${NORMAL} : "
|
echo -e -n "\nThe name will be used to mount the Volume Group as: ${BLUE_LIGHT}/dev/mapper/[...]${NORMAL} : "
|
||||||
read -r vg_name
|
read -r vg_name
|
||||||
|
|
||||||
if [[ -z "$vg_name" ]]; then
|
if [[ -z "$vg_name" ]]; then
|
||||||
echo -e -n "\nPlease enter a valid name.\n\n"
|
echo -e -n "\n${RED_LIGHT}Please enter a valid name.${NORMAL}\n\n"
|
||||||
read -n 1 -r -p "[Press any key to continue...]" _key
|
read -n 1 -r -p "[Press any key to continue...]" _key
|
||||||
clear
|
clear
|
||||||
else
|
else
|
||||||
while true; do
|
while true; do
|
||||||
echo -e -n "\nYou entered: ${BLUE_LIGHT}$vg_name${NORMAL}.\n\n"
|
echo -e -n "\nYou entered: ${BLUE_LIGHT}$vg_name${NORMAL}.\n\n"
|
||||||
read -n 1 -r -p "Is this the desired name? (y/n): " yn
|
read -r -p "Is this the desired name? (y/n): " yn
|
||||||
|
|
||||||
if [[ "$yn" == "y" ]] || [[ "$yn" == "Y" ]]; then
|
if [[ $yn =~ ${regex_YES} ]]; then
|
||||||
echo -e -n "\n\nVolume Group will now be created and mounted as: ${BLUE_LIGHT}/dev/mapper/$vg_name${NORMAL}\n\n"
|
echo -e -n "\n\nVolume Group will now be created and mounted as: ${BLUE_LIGHT}/dev/mapper/$vg_name${NORMAL}\n\n"
|
||||||
vgcreate "$vg_name" "$final_drive"
|
if [[ $encryption_yn =~ ${regex_YES} ]]; then
|
||||||
|
vgcreate "$vg_name" "$encrypted_partition"
|
||||||
|
elif [[ $encryption_yn =~ ${regex_NO} ]]; then
|
||||||
|
vgcreate "$vg_name" "$root_partition"
|
||||||
|
fi
|
||||||
echo
|
echo
|
||||||
read -n 1 -r -p "[Press any key to continue...]" _key
|
read -n 1 -r -p "[Press any key to continue...]" _key
|
||||||
clear
|
clear
|
||||||
break 2
|
break 2
|
||||||
elif [[ "$yn" == "n" ]] || [[ "$yn" == "N" ]]; then
|
elif [[ $yn =~ ${regex_NO} ]]; then
|
||||||
echo -e -n "\n\nPlease select another name.\n\n"
|
echo -e -n "\n${RED_LIGHT}Please select another name${NORMAL}.\n\n"
|
||||||
read -n 1 -r -p "[Press any key to continue...]" _key
|
read -n 1 -r -p "[Press any key to continue...]" _key
|
||||||
clear
|
clear
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
echo -e -n "\nPlease answer y or n.\n\n"
|
echo -e -n "\n${RED_LIGHT}Not a valid input.${NORMAL}\n\n"
|
||||||
read -n 1 -r -p "[Press any key to continue...]" _key
|
read -n 1 -r -p "[Press any key to continue...]" _key
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -2490,35 +2546,39 @@ function lvm_creation {
|
|||||||
while true; do
|
while true; do
|
||||||
|
|
||||||
header_lc
|
header_lc
|
||||||
|
echo -e -n "\nEnter a ${BLUE_LIGHT}name${NORMAL} for the ${BLUE_LIGHT}Logical Volume${NORMAL} without any spaces (i.e. MyLinuxLogicVolume)."
|
||||||
echo -e -n "\nEnter a ${BLUE_LIGHT}name${NORMAL} for the ${BLUE_LIGHT}Logical Volume${NORMAL} without any spaces (i.e. MyLinuxLogicVolume).\nIts size will be the entire partition previosly selected.\n"
|
echo -e -n "\nIts size will be the entire partition previosly selected.\n"
|
||||||
echo -e -n "\nThe name will be used to mount the Logical Volume as: ${BLUE_LIGHT}/dev/mapper/$vg_name-[...]${NORMAL} : "
|
echo -e -n "\nThe name will be used to mount the Logical Volume as: ${BLUE_LIGHT}/dev/mapper/$vg_name-[...]${NORMAL} : "
|
||||||
read -r lv_root_name
|
read -r lv_root_name
|
||||||
|
|
||||||
if [[ -z "$lv_root_name" ]]; then
|
if [[ -z "$lv_root_name" ]]; then
|
||||||
echo -e -n "\nPlease enter a valid name.\n\n"
|
echo -e -n "\n${RED_LIGHT}Please enter a valid name.${NORMAL}\n\n"
|
||||||
read -n 1 -r -p "[Press any key to continue...]" _key
|
read -n 1 -r -p "[Press any key to continue...]" _key
|
||||||
clear
|
clear
|
||||||
else
|
else
|
||||||
while true; do
|
while true; do
|
||||||
echo -e -n "\nYou entered: ${BLUE_LIGHT}$lv_root_name${NORMAL}.\n\n"
|
echo -e -n "\nYou entered: ${BLUE_LIGHT}$lv_root_name${NORMAL}.\n\n"
|
||||||
read -n 1 -r -p "Is this correct? (y/n): " yn
|
read -r -p "Is this correct? (y/n): " yn
|
||||||
|
|
||||||
if [[ "$yn" == "y" ]] || [[ "${yn}" == "Y" ]]; then
|
if [[ $yn =~ ${regex_YES} ]]; then
|
||||||
echo -e -n "\n\nLogical Volume ${BLUE_LIGHT}$lv_root_name${NORMAL} will now be created.\n\n"
|
echo -e -n "\nLogical Volume ${BLUE_LIGHT}$lv_root_name${NORMAL} will now be created.\n\n"
|
||||||
lvcreate --name "$lv_root_name" -l +100%FREE "$vg_name"
|
if lvcreate --name "$lv_root_name" -l +100%FREE "$vg_name"; then
|
||||||
echo
|
echo
|
||||||
read -n 1 -r -p "[Press any key to continue...]" _key
|
read -n 1 -r -p "[Press any key to continue...]" _key
|
||||||
final_drive=/dev/mapper/"$vg_name"-"$lv_root_name"
|
lvm_partition=/dev/mapper/"$vg_name"-"$lv_root_name"
|
||||||
clear
|
clear
|
||||||
break 3
|
break 3
|
||||||
elif [[ "$yn" == "n" ]] || [[ "$yn" == "N" ]]; then
|
else
|
||||||
echo -e -n "\n\nPlease select another name.\n\n"
|
echo -e -n "\n${RED_LIGHT}Something went wrong, exiting...${NORMAL}\n\n"
|
||||||
|
kill_script
|
||||||
|
fi
|
||||||
|
elif [[ $yn =~ ${regex_NO} ]]; then
|
||||||
|
echo -e -n "\n${RED_LIGHT}Please select another name${NORMAL}.\n\n"
|
||||||
read -n 1 -r -p "[Press any key to continue...]" _key
|
read -n 1 -r -p "[Press any key to continue...]" _key
|
||||||
clear
|
clear
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
echo -e -n "\nPlease answer y or n.\n\n"
|
echo -e -n "\n${RED_LIGHT}Not a valid input.${NORMAL}\n\n"
|
||||||
read -n 1 -r -p "[Press any key to continue...]" _key
|
read -n 1 -r -p "[Press any key to continue...]" _key
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -2526,19 +2586,20 @@ function lvm_creation {
|
|||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
elif [[ "$lvm_yn" == "n" ]] || [[ "$lvm_yn" == "N" ]]; then
|
elif [[ $lvm_yn =~ ${regex_NO} ]]; then
|
||||||
echo -e -n "\n\nLVM won't be used.\n\n"
|
|
||||||
read -n 1 -r -p "[Press any key to continue...]" _key
|
|
||||||
clear
|
clear
|
||||||
break
|
break
|
||||||
|
|
||||||
else
|
else
|
||||||
echo -e -n "\nPlease answer y or n.\n\n"
|
echo -e -n "\n${RED_LIGHT}Not a valid input.${NORMAL}\n\n"
|
||||||
read -n 1 -r -p "[Press any key to continue...]" _key
|
read -n 1 -r -p "[Press any key to continue...]" _key
|
||||||
clear
|
clear
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2906,7 +2967,7 @@ function main {
|
|||||||
|
|
||||||
header_main
|
header_main
|
||||||
|
|
||||||
echo -e -n "\n1) Set keyboard layout\t\t......\tKeyboard layout: "
|
echo -e -n "\n1) Set keyboard layout\t\t\t......\tKeyboard layout: "
|
||||||
current_xkeyboard_layout=$(setxkbmap -query 2>/dev/null | grep layout | awk '{print $2}')
|
current_xkeyboard_layout=$(setxkbmap -query 2>/dev/null | grep layout | awk '{print $2}')
|
||||||
if [[ -n "${current_xkeyboard_layout}" ]] || [[ -n "${user_keyboard_layout}" ]]; then
|
if [[ -n "${current_xkeyboard_layout}" ]] || [[ -n "${user_keyboard_layout}" ]]; then
|
||||||
echo -e -n "\t${GREEN_LIGHT}${current_xkeyboard_layout:-${user_keyboard_layout}}${NORMAL}"
|
echo -e -n "\t${GREEN_LIGHT}${current_xkeyboard_layout:-${user_keyboard_layout}}${NORMAL}"
|
||||||
@ -2915,7 +2976,7 @@ function main {
|
|||||||
echo -e -n "${RED_LIGHT}\tnone${NORMAL}"
|
echo -e -n "${RED_LIGHT}\tnone${NORMAL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e -n "\n2) Set up internet connection\t......\tConnection status: "
|
echo -e -n "\n2) Set up internet connection\t\t......\tConnection status: "
|
||||||
if ping -c 1 8.8.8.8 &>/dev/null; then
|
if ping -c 1 8.8.8.8 &>/dev/null; then
|
||||||
echo -e -n "${GREEN_LIGHT}\tconnected${NORMAL}"
|
echo -e -n "${GREEN_LIGHT}\tconnected${NORMAL}"
|
||||||
else
|
else
|
||||||
@ -2924,21 +2985,21 @@ function main {
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo -e -n "\n3) Select destination drive\t......\tDrive selected: "
|
echo -e -n "\n3) Select destination drive\t\t......\tDrive selected: "
|
||||||
if [[ -b "$user_drive" ]]; then
|
if [[ -b "$user_drive" ]]; then
|
||||||
echo -e -n "${GREEN_LIGHT}\t${user_drive}${NORMAL}"
|
echo -e -n "${GREEN_LIGHT}\t${user_drive}${NORMAL}"
|
||||||
else
|
else
|
||||||
echo -e -n "${RED_LIGHT}\tnone${NORMAL}"
|
echo -e -n "${RED_LIGHT}\tnone${NORMAL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e -n "\n4) Wipe destination drive\t......\tDrive selected: "
|
echo -e -n "\n4) Wipe destination drive\t\t......\tDrive selected: "
|
||||||
if [[ -b "$user_drive" ]]; then
|
if [[ -b "$user_drive" ]]; then
|
||||||
echo -e -n "${GREEN_LIGHT}\t${user_drive}${NORMAL}"
|
echo -e -n "${GREEN_LIGHT}\t${user_drive}${NORMAL}"
|
||||||
else
|
else
|
||||||
echo -e -n "${RED_LIGHT}\tnone${NORMAL}"
|
echo -e -n "${RED_LIGHT}\tnone${NORMAL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e -n "\n5) Partition destination drive\t......\tDrive selected: "
|
echo -e -n "\n5) Partition destination drive\t\t......\tDrive selected: "
|
||||||
if [[ -b "$user_drive" ]]; then
|
if [[ -b "$user_drive" ]]; then
|
||||||
echo -e -n "${GREEN_LIGHT}\t${user_drive}${NORMAL}"
|
echo -e -n "${GREEN_LIGHT}\t${user_drive}${NORMAL}"
|
||||||
else
|
else
|
||||||
@ -2947,14 +3008,14 @@ function main {
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo -e -n "\n6) Select EFI partition\t\t......\tPartition selected: "
|
echo -e -n "\n6) Select EFI partition\t\t\t......\tPartition selected: "
|
||||||
if [[ -b "$boot_partition" ]]; then
|
if [[ -b "$boot_partition" ]]; then
|
||||||
echo -e -n "${GREEN_LIGHT}\t${boot_partition}${NORMAL}"
|
echo -e -n "${GREEN_LIGHT}\t${boot_partition}${NORMAL}"
|
||||||
else
|
else
|
||||||
echo -e -n "${RED_LIGHT}\tnone${NORMAL}"
|
echo -e -n "${RED_LIGHT}\tnone${NORMAL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e -n "\n7) Select ROOT partition\t......\tPartition selected: "
|
echo -e -n "\n7) Select ROOT partition\t\t......\tPartition selected: "
|
||||||
if [[ -b "$root_partition" ]]; then
|
if [[ -b "$root_partition" ]]; then
|
||||||
echo -e -n "${GREEN_LIGHT}\t${root_partition}${NORMAL}"
|
echo -e -n "${GREEN_LIGHT}\t${root_partition}${NORMAL}"
|
||||||
else
|
else
|
||||||
@ -2963,11 +3024,22 @@ function main {
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo -e -n "\n8) Set up Full Disk Encryption\t......\tEncryption: "
|
echo -e -n "\n8) Set up Full Disk Encryption\t\t......\tEncryption: "
|
||||||
if [[ $encryption_yn =~ ${regex_YES} ]]; then
|
if [[ $encryption_yn =~ ${regex_YES} ]]; then
|
||||||
echo -e -n "${GREEN_LIGHT}\t\tYES${NORMAL}"
|
echo -e -n "${GREEN_LIGHT}\t\tYES${NORMAL}"
|
||||||
|
echo -e -n "\n\t\t\t\t\t......\tEncrypted partition:\t${GREEN_LIGHT}${encrypted_partition}${NORMAL}"
|
||||||
elif [[ $encryption_yn =~ ${regex_NO} ]]; then
|
elif [[ $encryption_yn =~ ${regex_NO} ]]; then
|
||||||
echo -e -n "${RED_LIGHT}\t\tNO${NORMAL}"
|
echo -e -n "${RED_LIGHT}\t\tNO${NORMAL}"
|
||||||
|
echo -e -n "\n\t\t\t\t\t......\tEncrypted partition:\t${RED_LIGHT}none${NORMAL}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e -n "\n9) Set up Logical Volume Management\t......\tLVM: "
|
||||||
|
if [[ $lvm_yn =~ ${regex_YES} ]]; then
|
||||||
|
echo -e -n "${GREEN_LIGHT}\t\t\tYES${NORMAL}"
|
||||||
|
echo -e -n "\n\t\t\t\t\t......\tLVM partition\t\t${GREEN_LIGHT}${lvm_partition}${NORMAL}"
|
||||||
|
elif [[ $lvm_yn =~ ${regex_NO} ]]; then
|
||||||
|
echo -e -n "${RED_LIGHT}\t\t\tNO${NORMAL}"
|
||||||
|
echo -e -n "\n\t\t\t\t\t......\tLVM partition:\t\t${RED_LIGHT}none${NORMAL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e -n "\n\nx) ${RED_LIGHT}Quit and unmount everything.${NORMAL}\n"
|
echo -e -n "\n\nx) ${RED_LIGHT}Quit and unmount everything.${NORMAL}\n"
|
||||||
@ -3022,6 +3094,11 @@ function main {
|
|||||||
disk_encryption
|
disk_encryption
|
||||||
clear
|
clear
|
||||||
;;
|
;;
|
||||||
|
9)
|
||||||
|
clear
|
||||||
|
lvm_creation
|
||||||
|
clear
|
||||||
|
;;
|
||||||
x)
|
x)
|
||||||
kill_script
|
kill_script
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user