Add cancel back to main menu
This commit is contained in:
parent
5b93073fda
commit
1fb3167454
@ -14,7 +14,7 @@
|
|||||||
# immutable variables {
|
# immutable variables {
|
||||||
|
|
||||||
readonly DIST="Archlabs" # Linux distributor
|
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 LIVE="liveuser" # Live session user
|
||||||
readonly TRN="/usr/share/archlabs-installer" # Translation path
|
readonly TRN="/usr/share/archlabs-installer" # Translation path
|
||||||
readonly MNT="/mnt/install" # Install mountpoint
|
readonly MNT="/mnt/install" # Install mountpoint
|
||||||
@ -622,7 +622,7 @@ extra_packages() {
|
|||||||
|
|
||||||
choose_kernel() {
|
choose_kernel() {
|
||||||
if ! grep -qi "hypervisor" <<< "$(dmesg)"; then
|
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
|
if yesno "Choose Kernel" "$msg" "Current" "LTS"; then
|
||||||
KERNEL="linux"
|
KERNEL="linux"
|
||||||
else
|
else
|
||||||
@ -1687,14 +1687,14 @@ lvm_menu() {
|
|||||||
|
|
||||||
config_install() {
|
config_install() {
|
||||||
# whether to use a custom mirror sorting command later
|
# whether to use a custom mirror sorting command later
|
||||||
oneshot set_hostname || return 1
|
set_hostname || return 1
|
||||||
oneshot set_locale || return 1
|
set_locale || return 1
|
||||||
oneshot set_timezone || return 1
|
set_timezone || return 1
|
||||||
oneshot user_setup || return 1
|
user_setup || return 1
|
||||||
oneshot mirrorlist_cmd || return 1
|
mirrorlist_cmd || return 1
|
||||||
oneshot window_manager || return 1
|
window_manager || return 1
|
||||||
oneshot extra_packages || return 1
|
extra_packages || return 1
|
||||||
oneshot choose_kernel
|
choose_kernel
|
||||||
CONFIG_DONE=true
|
CONFIG_DONE=true
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@ -1734,7 +1734,8 @@ install_main() {
|
|||||||
install_base() {
|
install_base() {
|
||||||
# unpack the main system
|
# unpack the main system
|
||||||
tput cnorm
|
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
|
# remove archiso init files
|
||||||
find $MNT/usr/lib/initcpio -name 'archiso*' -type f -exec rm '{}' \;
|
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)"
|
REMOVE_PKGS="$(pacman -Qssq 'xfce4*' 2>/dev/null)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $INSTALL_WMS =~ dwm && -d $MNT/home/$NEWUSER ]]; then
|
if [[ $INSTALL_WMS =~ dwm ]]; then
|
||||||
mkdir -p $MNT/home/$NEWUSER/suckless
|
echo -e "\nSetting up dwm..\n\n"
|
||||||
|
mkdir -pv $MNT/home/$NEWUSER/suckless
|
||||||
for prog in dwm st dmenu; do
|
for prog in dwm st dmenu; do
|
||||||
echo -e "\nInstalling $prog..\n"
|
echo -e "\nInstalling $prog..\n"
|
||||||
git clone https://bitbucket.org/natemaia/$prog $MNT/home/$NEWUSER/suckless/$prog
|
git clone https://bitbucket.org/natemaia/$prog $MNT/home/$NEWUSER/suckless/$prog
|
||||||
@ -1974,6 +1976,7 @@ setup_user_home() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
update_mirrorlist() {
|
update_mirrorlist() {
|
||||||
|
echo -e "\nSorting the mirrorlist..\n\n"
|
||||||
$MIRROR_CMD --verbose --save $MNT/etc/pacman.d/mirrorlist && return 0
|
$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"
|
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
|
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"
|
local msg="$_InstBootloader $BOOTLOADER\n"
|
||||||
[[ $BOOT_PART != "" ]] && msg="$msg\n$_InstBootDev $BOOT_PART\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
|
prep_for_bootloader
|
||||||
|
|
||||||
@ -2220,7 +2223,7 @@ main() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
tput civis
|
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 \
|
--title " $_PrepTitle " --default-item $MENU_HIGHLIGHT --menu "$_PrepBody" 0 0 0 \
|
||||||
"1" "$_PrepShowDev" "2" "$_PrepParts" "3" "$_PrepLUKS" "4" "$_PrepLVM" \
|
"1" "$_PrepShowDev" "2" "$_PrepParts" "3" "$_PrepLUKS" "4" "$_PrepLVM" \
|
||||||
"5" "$_PrepMount" "6" "$_PrepConfig" "7" "$_PrepInstall" "8" "$_Done")
|
"5" "$_PrepMount" "6" "$_PrepConfig" "7" "$_PrepInstall" "8" "$_Done")
|
||||||
|
Reference in New Issue
Block a user