Add cancel back to main menu

This commit is contained in:
natemaia 2018-08-25 21:25:35 -07:00
parent 5b93073fda
commit 1fb3167454

View File

@ -14,7 +14,7 @@
# immutable variables {
readonly DIST="Archlabs" # Linux distributor
readonly VER="1.6.46" # Installer version
readonly VER="1.6.47" # Installer version
readonly LIVE="liveuser" # Live session user
readonly TRN="/usr/share/archlabs-installer" # Translation path
readonly MNT="/mnt/install" # Install mountpoint
@ -622,7 +622,7 @@ extra_packages() {
choose_kernel() {
if ! grep -qi "hypervisor" <<< "$(dmesg)"; then
local msg="\nUse the standard current Linux kernel or the LTS kernel?"
local msg="\nUse the current Linux kernel or the LTS kernel?\n"
if yesno "Choose Kernel" "$msg" "Current" "LTS"; then
KERNEL="linux"
else
@ -1687,14 +1687,14 @@ lvm_menu() {
config_install() {
# whether to use a custom mirror sorting command later
oneshot set_hostname || return 1
oneshot set_locale || return 1
oneshot set_timezone || return 1
oneshot user_setup || return 1
oneshot mirrorlist_cmd || return 1
oneshot window_manager || return 1
oneshot extra_packages || return 1
oneshot choose_kernel
set_hostname || return 1
set_locale || return 1
set_timezone || return 1
user_setup || return 1
mirrorlist_cmd || return 1
window_manager || return 1
extra_packages || return 1
choose_kernel
CONFIG_DONE=true
return 0
}
@ -1734,7 +1734,8 @@ install_main() {
install_base() {
# unpack the main system
tput cnorm
rsync -avh /run/archiso/sfs/airootfs/ $MNT/
clear && echo -e "\nUnpacking base filesystem..\n\n"
rsync -avh --info=progress2 /run/archiso/sfs/airootfs/ $MNT/
# remove archiso init files
find $MNT/usr/lib/initcpio -name 'archiso*' -type f -exec rm '{}' \;
@ -1857,8 +1858,9 @@ install_packages() {
REMOVE_PKGS="$(pacman -Qssq 'xfce4*' 2>/dev/null)"
fi
if [[ $INSTALL_WMS =~ dwm && -d $MNT/home/$NEWUSER ]]; then
mkdir -p $MNT/home/$NEWUSER/suckless
if [[ $INSTALL_WMS =~ dwm ]]; then
echo -e "\nSetting up dwm..\n\n"
mkdir -pv $MNT/home/$NEWUSER/suckless
for prog in dwm st dmenu; do
echo -e "\nInstalling $prog..\n"
git clone https://bitbucket.org/natemaia/$prog $MNT/home/$NEWUSER/suckless/$prog
@ -1974,6 +1976,7 @@ setup_user_home() {
}
update_mirrorlist() {
echo -e "\nSorting the mirrorlist..\n\n"
$MIRROR_CMD --verbose --save $MNT/etc/pacman.d/mirrorlist && return 0
infobox "$_ErrTitle" "\nAn error occurred while updating the mirrorlist.\n\nFalling back to automatic sorting...\n"
reflector --score 100 -l 50 -f 10 --sort rate --verbose --save $MNT/etc/pacman.d/mirrorlist
@ -2129,7 +2132,7 @@ install_bootloader() {
local msg="$_InstBootloader $BOOTLOADER\n"
[[ $BOOT_PART != "" ]] && msg="$msg\n$_InstBootDev $BOOT_PART\n"
infobox "$_InstBootTitle" "$msg\nMountpoint: ${BOOT_MNTS[$SYS-$BOOTLOADER]}\n" 0
echo -e "$msg\nMountpoint: ${BOOT_MNTS[$SYS-$BOOTLOADER]}\n" 0
prep_for_bootloader
@ -2220,7 +2223,7 @@ main() {
fi
tput civis
MENU_HIGHLIGHT=$(dialog --cr-wrap --no-cancel --stdout --backtitle "$BT" \
MENU_HIGHLIGHT=$(dialog --cr-wrap --stdout --backtitle "$BT" \
--title " $_PrepTitle " --default-item $MENU_HIGHLIGHT --menu "$_PrepBody" 0 0 0 \
"1" "$_PrepShowDev" "2" "$_PrepParts" "3" "$_PrepLUKS" "4" "$_PrepLVM" \
"5" "$_PrepMount" "6" "$_PrepConfig" "7" "$_PrepInstall" "8" "$_Done")