More recursion refactoring, update dialog text
This commit is contained in:
parent
8c85cc08af
commit
e6e52af3cb
@ -1,7 +1,6 @@
|
||||
# english translation file
|
||||
# written by natemaia10@gmail.com - 2018
|
||||
|
||||
# Generic
|
||||
_Done="Done"
|
||||
_Back="Back"
|
||||
_Name="Name:"
|
||||
@ -13,16 +12,13 @@ _Pass2="\nRe-enter the password for"
|
||||
_NoFileErr="\nFile does not exist.\n"
|
||||
_OnlyOne="\nOnly one partition available"
|
||||
|
||||
# Welcome
|
||||
_WelTitle="Welcome to"
|
||||
_WelBody="\nThis will unpack and help you setup $DIST on your system.\n\n\nMenu Navigation:\n\n - Select items with the arrow keys or the option number.\n - Use [Space] to toggle options and [Enter] to confirm.\n - Switch between buttons using [Tab] or the arrow keys.\n - Use [Page Up] and [Page Down] to jump whole pages\n - Press the highlighted key of an option to select it.\n"
|
||||
|
||||
# Requirements
|
||||
_NotRoot="\nThis installer must be run as root or using sudo.\n"
|
||||
_Not64Bit="\nThis installer only supports x86_64 capable machines.\n"
|
||||
_NoNetwork="\nThis installer needs to be run with an active internet connection in order to update and install packages.\n"
|
||||
_Not64Bit="\nThis installer only supports x86_64 architectures.\n"
|
||||
_NoNetwork="\nThis installer requires an active internet connection.\n"
|
||||
|
||||
# Preparation Menu
|
||||
_PrepTitle="Prepare Install"
|
||||
_PrepBody="\nThis is the menu in which you will prepare your system for the install.\n\nTo begin the install you must first have:\n\n - A root (/) partition mounted (UEFI systems also require a seperate boot partition).\n - A user created and the passwords set.\n - The system settings configured."
|
||||
_PrepLayout="Keyboard Layout"
|
||||
@ -38,169 +34,142 @@ _PrepPkg="Select additional packages (optional)"
|
||||
_PrepShow="Check configuration choices (optional)"
|
||||
_PrepInstall="Start the installation"
|
||||
|
||||
# Select Config Files
|
||||
_EditTitle="Finalization"
|
||||
_EditBody="\nBefore exiting you can select configuration files from below to review/change.\n\nIf you need to make additional changes with the drives still mounted, use Ctrl-z to pause the installer and return to the terminal, when finished type 'fg' and Enter or Ctrl-z again to resume the installer."
|
||||
_EditBody="\nBefore exiting you can select configuration files from below to review/change.\n\nIf you need to make additional changes with the drives still mounted, use Ctrl-z to pause the installer and return to the terminal, when finished type 'fg' and [Enter] or Ctrl-z again to resume the installer."
|
||||
|
||||
# Close Installer
|
||||
_CloseInst="Exit"
|
||||
_CloseInstBody="\nUnmount partitions (if any) and exit the installer?\n"
|
||||
|
||||
# timezone
|
||||
_TimeZTitle="Timezone"
|
||||
_TimeZQ="\nConfirm time zone:"
|
||||
_TimeZBody="\nThe time zone is used to set the system clock.\n\nSelect your country or continent from the list below"
|
||||
_TimeSubZBody="\nSelect the nearest city to you or one with the same time zone.\n\nTIP: Pressing the first letter of the city name repeatedly will navigate between entries beggining with that letter."
|
||||
|
||||
# bootloader
|
||||
_MntBootBody="\nSelect which bootloader to use."
|
||||
_InstSysTitle="Syslinux"
|
||||
_InstSysBody="\nInstall syslinux to the master boot record (MBR) or to the root (/) partition?"
|
||||
|
||||
# mirrors
|
||||
_MirrorTitle="Mirrorlist Sorting"
|
||||
_MirrorTitle="Mirrorlist"
|
||||
_MirrorSetup="\nSort the mirrorlist automatically?\n\nTakes longer but gets fastest mirrors.\n"
|
||||
_MirrorCmd="\nThe command below will be used to sort the mirrorlist, edit if needed.\n"
|
||||
|
||||
# window managers and packages
|
||||
_WMChoice="Sessions"
|
||||
_WMChoiceBody="\nUse [Space] to toggle available sessions.\n\nFor all sessions a basic package set will be installed for basic compatibilty across sessions. In addition to this extra packages specific to each sessions will also be installed to provide basic functionality most people expect from an environment."
|
||||
|
||||
_Packages="Additional Packages"
|
||||
_Packages="Packages"
|
||||
_PackageMenu="\nSelect a category to choose packages from, once finished select the last entery or press [Esc] to return to the main menu."
|
||||
_PackageBody="\nUse [Space] to toggle packages(s) and press [Enter] to accept the selection.\n\nNOTE: Some packages may already be installed by your desktop environment (if any). Extra packages may also be installed for the selected packages eg. Selecting qutebrowser will also install qt5ct (the Qt5 theme tool) and qt5-styleplugins (for Gtk themes in Qt applications)."
|
||||
|
||||
# login setup
|
||||
_WMLogin="Login Managment"
|
||||
_LoginTypeBody="\nSelect which login managment to use."
|
||||
_AutoLoginBody="\nDo you want auto login+startx enabled?"
|
||||
_WMLoginBody="\nSelect which to use as your primary login session.\n\nThis can be changed by editing your ~/.xinitrc."
|
||||
_AutoLoginBody="\nDo you want autologin enabled?\n"
|
||||
_WMLoginBody="\nSelect which of your session choices to use for the initial login.\n\nYou can be change this later by editing your ~/.xinitrc"
|
||||
|
||||
# Set keymap, hwclock, local and timezone
|
||||
_XMapBody="\nPick your system keymap from the list below\n\nThis is the keymap used once a graphical environment is running (usually Xorg).\n\nSystem default: us"
|
||||
_LocaleBody="\nLocale determines the system language and currency formats.\n\nThe format for locale names is languagecode_COUNTRYCODE\n\neg. en_US is: english United States\n en_GB is: english Great Britain"
|
||||
|
||||
_CMapTitle="Console Keymap"
|
||||
_CMapBody="\nSelect console keymap, the console is the tty shell you reach before starting a graphical environment (usually Xorg).\n\nIts keymap is seperate from the one used by the graphical environments, though many do use the same such as 'us' English.\n\nSystem default: us"
|
||||
|
||||
# Configure
|
||||
_ConfHost="Hostname"
|
||||
_ConfLocale="Language and Locale"
|
||||
_HostNameBody="\nEnter a hostname for the new system.\n\nA hostname is used to identify systems on the network.\n\nIt's restricted to alphanumeric characters (a-z, A-Z, 0-9).\nIt can contain hyphens (-) BUT NOT at the beggining or end."
|
||||
|
||||
# Create new user and set password
|
||||
_UserTitle="User Creation"
|
||||
_Username="Username:"
|
||||
_Password="Password:"
|
||||
_Password2="Password2:"
|
||||
_RootBody="--- Enter root password (empty uses the password entered above) ---"
|
||||
_UserBody="\nEnter a name and password for the new user account.\n\nThe name must not use capital letters, contain any periods (.), end with a hyphen (-), or include any colons (:)\n\nNOTE: Use the arrow keys to switch between input fields, [Tab] to toggle between input fields and the buttons, or just press [Enter] to accept."
|
||||
_UserBody="\nEnter a name and password for the new user account.\n\nThe name must not use capital letters, contain any periods (.), end with a hyphen (-), or include any colons (:)\n\nNOTE: Use the [Up] and [Down] arrows to switch between input fields, [Tab] to toggle between input fields and the buttons, and [Enter] to accept."
|
||||
|
||||
# Mounting (Partitions)
|
||||
_MntTitle="Mount Status"
|
||||
_MntFail="\nMount Failed!\n"
|
||||
_MntSucc="\nMount Succeeded!\n"
|
||||
_MntConfBody="\nConfirm mount options:"
|
||||
_MntBody="\nUse [Space] to toggle mount options from below, press [Enter] when done to confirm selection.\n\nNot selecting any and confirming will run an automatic mount."
|
||||
_WarnMount="\nIMPORTANT: Please choose carefully during mounting and formatting.\n\nDuring mounting, partitions can be mounted without formatting by selecting '$_Skip', useful for extra or already formatted partitions.\n\nThe exception to this is the root (/) partition, it needs to be formatted before install to ensure system stability.\n"
|
||||
_WarnMount="\nIMPORTANT: Please choose carefully during mounting and formatting.\n\nPartitions can be mounted without formatting by selecting '$_Skip' during mounting, useful for extra or already formatted partitions.\n\nThe exception to this is the root (/) partition, it needs to be formatted before install to ensure system stability.\n"
|
||||
|
||||
# Select Device
|
||||
_DevSelTitle="Device Selection"
|
||||
_DevSelBody="\nSelect a device to use from the list below.\n\nDevices (/dev) are the available drives on the system. /sda, /sdb, /sdc ..."
|
||||
|
||||
# Extra Partitions
|
||||
_ExtPartBody="\nYou can now select additional partitions you want mounted, once choosen you will be asked to enter a mountpoint.\n\nSelect '$_Done' to finish the mounting step and return to the main menu."
|
||||
_ExtPartBody1="\nWhere do you want the partition mounted?\n\nEnsure the name begins with a slash (/).\nExamples include: /usr, /home, /var, etc.\n"
|
||||
_ExtPartBody1="\nWhere do you want the partition mounted?\n\nEnsure the name begins with a slash (/).\nExamples include: /usr, /home, /var, etc."
|
||||
|
||||
# kernel
|
||||
_KernelTitle="Linux Kernel"
|
||||
_KernelBody="\nSelect which kernel to use for the install."
|
||||
_KernelBody="\nSelect a kernel to use for the install."
|
||||
|
||||
# shell
|
||||
_ShellTitle="Login Shell"
|
||||
_ShellBody="\nChoose a shell for the new user and root."
|
||||
|
||||
# Partitioning Menu
|
||||
_PartTitle="Partitioning"
|
||||
_PartWipe="Secure wipe"
|
||||
_PartAuto="Automatic partitioning"
|
||||
_PartAuto="Auto partitioning"
|
||||
_PartShowTree="Show partition Table"
|
||||
_PartBody="\nFull device auto partitioning is available for beginners otherwise cfdisk is recommended.\n\n - UEFI systems require a vfat/fat32 partition between 100-512M in size to be mounted at /boot or /boot/efi\n - BIOS systems using LUKS will also require this but it does NOT require vfat/fat32 formatting."
|
||||
_PartBody="\nFull device auto partitioning is available for beginners otherwise cfdisk is recommended.\n\n - All systems will require a root partition (8G or greater).\n - UEFI and BIOS using LUKS without LVM will require a boot partition (100-512M)."
|
||||
|
||||
# Auto partition
|
||||
_PartBody1="\nWARNING: ALL data on"
|
||||
_PartBody2="will be destroyed and the following partitions will be created\n\n- A 512M vfat/fat32 boot partition with boot flags enabled.\n- An ext4 partition using all remaining space"
|
||||
_PartBody3="\n\nDo you want to continue?\n"
|
||||
_PartWipeBody="will be destroyed using 'wipe -Ifre'.\n\nThis is ONLY intended for use on devices before sale or disposal to reliably destroy the data beyond recovery. This is NOT for devices you intend to continue using.\nThe wiping process can take a long time depending on the size and speed of the drive.\n\nDo you still want to continue?\n"
|
||||
|
||||
# bootloader
|
||||
_InstSysTitle="Install Syslinux"
|
||||
_InstSysBody="\nInstall syslinux to the master boot record (MBR) or to root (/)?"
|
||||
|
||||
# File System
|
||||
_FSTitle="Choose Filesystem"
|
||||
_SelRootBody="\nSelect the system root (/) partition.\n\nThis is where $DIST will be installed."
|
||||
_SelBiosBody="\nDo you want to use a separate boot partition?\n\nThis partition is where the bootloader and init will be installed.\n"
|
||||
_FSTitle="Filesystem"
|
||||
_SelRootBody="\nSelect the root (/) partition, this is where $DIST will be installed."
|
||||
_SelUefiBody="\nSelect the EFI boot partition (/boot), required for UEFI boot.\n\nIt's usually the first partition on the device, 100-512M, and will be formatted as vfat/fat32 if not already."
|
||||
_SelBiosBody="\nDo you want to use a separate boot partition? (optional)\n\nIt's usually the first partition on the device, 100-512M, and will be formatted as ext3/4 if not already."
|
||||
_SelBiosLuksBody="\nSelect the boot partition (/boot), required for LUKS.\n\nIt's usually the first partition on the device, 100-512M, and will be formatted as ext3/4 if not already."
|
||||
_FormUefiBody="\nIMPORTANT: The EFI partition"
|
||||
_FormBiosBody="\nIMPORTANT: The boot partition"
|
||||
_FormBootBody="is already formatted correctly.\n\nFor a clean install, previously existing partitions should be reformatted, however this removes ALL data (bootloaders) on the partition so choose carefully.\n\nDo you want to reformat the partition?\n"
|
||||
|
||||
_SelSwpNone="None"
|
||||
_SelSwpFile="Swapfile"
|
||||
_SelSwpSetup="Swap Setup"
|
||||
_SelSwpBody="\nSelect whether to use a swap partition, swapfile, or none."
|
||||
_SelSwpErr="Swap Setup Error: Must be 1(M|G) or greater, and can only contain whole numbers\n\nSize Entered:"
|
||||
_SelSwpErr="\nSwap Setup Error: Must be 1(M|G) or greater, and can only contain whole numbers\n\nSize Entered:"
|
||||
_SelSwpSize="\nEnter the size of the swapfile in megabytes (M) or gigabytes (G).\n\neg. 100M will create a 100 megabyte swapfile, while 10G will create a 10 gigabyte swapfile.\n\nFor ease of use and as an example it is filled in to match the size of your system memory (RAM).\n\nMust be greater than 1, contain only whole numbers, and end with either M or G."
|
||||
|
||||
_SelUefiBody="\nSelect the system EFI boot partition.\n\nThis is a required partition for booting UEFI systems. It's usually the first partition on the drive, less than 512M, and will be formatted as vfat/fat32 if not already."
|
||||
_FormUefiBody="\nIMPORTANT: The EFI partition"
|
||||
_FormUefiBody2="is already formatted as vfat/fat32.\n\nFor a clean install, previously existing partitions should be reformatted, however this removes ALL data (bootloaders) on the partition so choose carefully.\n\nDo you want to reformat the partition?\n"
|
||||
_FormBiosBody="IMPORTANT:\n\nThe boot partition"
|
||||
_FormBiosBody2="is already formatted as ext3/4.\n\nFor a clean install, previously existing partitions should be reformatted, however this removes ALL data (bootloaders) on the partition so choose carefully.\n\nDo you want to reformat the partition?\n"
|
||||
|
||||
# LUKS / DM-Crypt / Encryption
|
||||
_LuksMenuBody="\nDevices and volumes encrypted using dm_crypt cannot be accessed or seen without being first unlocked."
|
||||
_LuksMenuBody2="\n\nA seperate boot partition without encryption or logical volume management (LVM - unless using BIOS Grub) is required."
|
||||
_LuksMenuBody="\nDevices and volumes encrypted using dm_crypt cannot be accessed or seen without first being unlocked."
|
||||
_LuksMenuBody2="\n\nA seperate boot partition without encryption or logical volume management (LVM) is required (unless using BIOS Grub)."
|
||||
_LuksMenuBody3="\n\nAutomatic uses default encryption settings, and is recommended for beginners, otherwise cypher and key size parameters may be entered manually."
|
||||
_LuksOpen="Open Encrypted Partition"
|
||||
_LuksOpenBody="Enter a name and password for the encrypted device.\n\nIt is not necessary to prefix it with /dev/mapper/\n\nAn example name has been provided."
|
||||
_LuksEncrypt="Automatic LUKS Encryption"
|
||||
_LuksEncryptAdv="Define Key-Size and Cypher"
|
||||
_LuksOpenBody="\nEnter a name and password for the encrypted device.\n\nIt is not necessary to prefix the name with /dev/mapper/,an example has been provided."
|
||||
_LuksEncrypt="Basic LUKS Encryption"
|
||||
_LuksEncryptAdv="Advanced LUKS Encryption"
|
||||
_LuksOpen="Open Previous Encryption"
|
||||
_LuksEncryptBody="\nSelect the partition you want to encrypt."
|
||||
_LuksEncryptSucc="\nDone! encrypted partition opened and ready for mounting.\n"
|
||||
_LuksPartErrBody="\nA minimum of two partitions are required for encryption:\n\n1. root (/) - standard or LVM.\n\n2. boot (/boot or /boot/efi) - standard (except for LVM on BIOS systems)."
|
||||
_LuksPartErrBody="\nA minimum of two partitions are required for encryption:\n\n 1. root (/) - standard or LVM.\n 2. boot (/boot) - standard (unless using LVM on BIOS systems).\n"
|
||||
_LuksCreateWaitBody="\nCreating encrypted partition:"
|
||||
_LuksOpenWaitBody="\nOpening encrypted partition:"
|
||||
_LuksWaitBody2="\n\nDevice or volume used:"
|
||||
_LuksCipherKey="Once the specified flags have been amended, they will automatically be used with the 'cryptsetup -q luksFormat /dev/...' command.\n\nNOTE: Do not specify any additional flags such as -v (--verbose) or -y (--verify-passphrase)."
|
||||
|
||||
# Logical Volume Management
|
||||
_LvmMenu="Logical volume management (LVM) allows 'virtual' hard drives (volume groups) and partitions (logical volumes) to be created from existing drives and partitions.\n\nA volume group must be created first, then one or more logical volumes within it.\n\nLVM can also be used with an encrypted partition to create multiple logical volumes (e.g. root and home) in it."
|
||||
_LvmCreateVG="Create Volume Group and Logical Volume(s)"
|
||||
_LvmDelVG="Delete Volume Groups"
|
||||
_LvMDelAll="Delete *ALL* volume groups, logical volumes, and physical volumes"
|
||||
_LvmDetBody="\nExisting logical volume management (LVM) detected.\n\nActivating, please wait...\n"
|
||||
_LvmNameVgBody="Enter the name of the volume group (VG) to create.\n\nThe VG is the new virtual device to create out of the partition(s) selected."
|
||||
_LvmPvSelBody="Select the partition(s) to use for the physical volume (PV)."
|
||||
_LvmMenu="\nLogical volume management (LVM) allows 'virtual' hard drives (volume groups) and partitions (logical volumes) to be created from existing device partitions.\n\nA volume group must be created first, then one or more logical volumes within it.\n\nLVM can also be used with an encrypted partition to create multiple logical volumes (e.g. root and home) within it."
|
||||
_LvmCreateVG="Create New VG and LV(s)"
|
||||
_LvmDelVG="Delete Existing VG(s)"
|
||||
_LvMDelAll="\nDelete *ALL* volume groups, logical volumes, and physical volumes"
|
||||
_LvmDetBody="\nExisting logical volume management (LVM) detected.\n\nActivating...\n"
|
||||
_LvmNameVgBody="\nEnter the name of the volume group (VG) to create.\n\nThe VG is the new virtual device to create out of the partition(s) selected."
|
||||
_LvmPvSelBody="\nSelect the partition(s) to use for the physical volume (PV)."
|
||||
_LvmPvConfBody1="\nConfirm creation of volume group:"
|
||||
_LvmPvConfBody2="With the following partition(s):"
|
||||
_LvmPvConfBody2="with the following partition(s):"
|
||||
_LvmPvActBody1="\nCreating and activating volume group:"
|
||||
_LvmPvDoneBody1="Volume group:"
|
||||
_LvmPvDoneBody1="volume group:"
|
||||
_LvmPvDoneBody2="has been created"
|
||||
_LvmLvNumBody1="\nUse [Spacebar] to select the number of logical volumes (LVs) to create in:"
|
||||
_LvmLvNumBody2="\nThe last (or only) logical volume will automatically use all remaining space in the volume group."
|
||||
_LvmLvNameBody1="Enter the name of the logical volume (LV) to create.\n\nThis is like setting a name or label for a partition.\n"
|
||||
_LvmLvNameBody1="\nEnter the name of the logical volume (LV) to create.\n\nThis is like setting a name or label for a partition.\n"
|
||||
_LvmLvNameBody2="\nNOTE: This LV will use up all remaining space in the volume group"
|
||||
_LvmLvSizeBody1="remaining"
|
||||
_LvmLvSizeBody2="\n\nEnter the size of the logical volume (LV) in megabytes (M) or gigabytes (G). For example, 100M will create a 100 megabyte LV. 10G will create a 10 gigabyte LV.\n"
|
||||
_LvmLvSizeBody2="\nEnter the size of the logical volume (LV) in megabytes (M) or gigabytes (G). For example, 100M will create a 100 megabyte LV. 10G will create a 10 gigabyte LV.\n"
|
||||
_LvmCompBody="\nDone! all logical volumes have been created for the volume group.\n\nDo you want to view the device tree for the new LVM scheme?\n"
|
||||
_LvmDelQ="\nConfirm deletion of volume group(s) and logical volume(s).\n\nDeleting a volume group, will delete all logical volumes within as well."
|
||||
_LvmSelVGBody="Select volume group to delete.\n\nAll logical volumes within will also be deleted."
|
||||
_LvmDelQ="\nConfirm deletion of volume group(s) and logical volume(s).\n\nDeleting a volume group, will delete all logical volumes within as well.\n"
|
||||
_LvmSelVGBody="\nSelect volume group to delete.\n\nAll logical volumes within will also be deleted."
|
||||
|
||||
# LVM Errors
|
||||
_LvmVGErr="\nNo volume groups found."
|
||||
_LvmNameVgErr="Invalid name entered.\n\nThe volume group name may be alpha-numeric, but may not contain spaces, start with a '/', or already be in use.\n"
|
||||
_LvmPartErrBody="There are no viable partitions available to use for LVM. A minimum of one is required.\n\nIf LVM is already in use, deactivating it will allow the partition(s) to be used again."
|
||||
_LvmLvNameErrBody="Invalid name entered.\n\nThe logical volume (LV) name may be alpha-numeric, but may not contain spaces or be preceded with a '/'\n"
|
||||
_LvmNameVgErr="\nInvalid name entered.\n\nThe volume group name may be alpha-numeric, but may not contain spaces, start with a '/', or already be in use.\n"
|
||||
_LvmPartErrBody="\nThere are no viable partitions available to use for LVM, a minimum of one is required.\n\nIf LVM is already in use, deactivating it will allow the partition(s) to be used again.\n"
|
||||
_LvmLvNameErrBody="\nInvalid name entered.\n\nThe logical volume (LV) name may be alpha-numeric, but may not contain spaces or be preceded with a '/'\n"
|
||||
_LvmLvSizeErrBody="\nInvalid value Entered.\n\nMust be a numeric value with 'M' (megabytes) or 'G' (gigabytes) at the end.\n\neg. 400M, 10G, 250G, etc...\n\nThe value may also not be equal to or greater than the remaining size of the volume group.\n"
|
||||
|
||||
# Error Messages
|
||||
_UserErrTitle="User Name Error"
|
||||
_PassErr="\nThe passwords entered do not match.\n"
|
||||
_UserErrBody="\nIncorrect user name.\n\nPlease try again.\n"
|
||||
@ -208,8 +177,9 @@ _UserPassErr="\nThe user passwords entered do not match.\n"
|
||||
_RootPassErr="\nThe root passwords entered do not match.\n"
|
||||
_UserPassEmpty="\nThe user password cannot be left empty.\n"
|
||||
_ErrNoMount="\nPartition(s) must be mounted first.\n"
|
||||
_ErrNoConfig="\nYou need to configure the system first.\n"
|
||||
_ExtErrBody="\nCannot mount partition due to a problem with the mountpoint name.\n\nA name must be given after a forward slash.\n"
|
||||
_PartErrBody="\nYou'll need create the partiton(s) first.\n\n\nBIOS systems require at least one partition (ROOT).\n\nUEFI systems require at least two (ROOT and EFI).\n"
|
||||
_ErrNoConfig="\nSystem configuration must be done first.\n"
|
||||
_ErrNoUser="\nA new user account must be created first.\n"
|
||||
_ExtErrBody="\nCannot mount partition due to a problem with the mountpoint.\n\nEnsure it begins with a slash (/) followed by atleast one character.\n"
|
||||
_PartErrBody="\nYou need create the partiton(s) first.\n\n\nBIOS systems require at least one partition (ROOT).\n\nUEFI systems require at least two (ROOT and EFI).\n"
|
||||
|
||||
# vim:tw=9999:syntax=off:nospell
|
||||
|
@ -32,9 +32,9 @@ LOGIN_TYPE="" # login manager can be lightdm or xinit
|
||||
INSTALL_WMS="" # space separated list of chosen wm/de
|
||||
KERNEL="linux" # can be linux, linux-lts, linux-zen, or linux-hardened
|
||||
MYSHELL="" # login shell for root and the primary user
|
||||
PACKAGES="" # list of all packages to install including WM_PACKAGES
|
||||
PACKAGES="" # list of all packages to install including WM_PKGS
|
||||
USER_PKGS="" # packages selected by the user during install
|
||||
WM_PACKAGES="" # full list of packages added during wm/de choice
|
||||
WM_PKGS="" # full list of packages added during wm/de choice
|
||||
HOOKS="shutdown" # list of additional HOOKS to add in /etc/mkinitcpio.conf
|
||||
FONT="ter-i16n" # font used in the linux console
|
||||
UCODE="" # cpu manufacturer microcode filename (if any)
|
||||
@ -57,15 +57,16 @@ CONFIG_DONE=false # basic configuration is finished
|
||||
BROADCOM_WL=false # fixes for broadcom cards eg. BCM4352
|
||||
CHECKED_NET=false # have we checked the network connection already
|
||||
|
||||
AUTO_ROOT_PART="" # values from auto partition
|
||||
AUTO_BOOT_PART=""
|
||||
AUTO_ROOT_PART="" # root value from auto partition
|
||||
AUTO_BOOT_PART="" # boot value from auto partition
|
||||
FORMATTED="" # partitions we formatted and should allow skipping
|
||||
|
||||
# sane baseline
|
||||
# baseline
|
||||
BASE_PKGS="archlabs-scripts archlabs-skel-base archlabs-themes archlabs-dARK archlabs-icons archlabs-wallpapers "
|
||||
BASE_PKGS+="base-devel xorg xorg-drivers sudo git gvfs gtk3 gtk-engines gtk-engine-murrine pavucontrol tumbler "
|
||||
BASE_PKGS+="playerctl ffmpeg gstreamer libmad libmatroska gst-libav gst-plugins-base gst-plugins-good"
|
||||
|
||||
# sane extras for window managers
|
||||
# extras for window managers
|
||||
WM_BASE_PKGS="arandr archlabs-networkmanager-dmenu xdg-user-dirs nitrogen polkit-gnome volumeicon xclip exo "
|
||||
WM_BASE_PKGS+="xdotool compton wmctrl gnome-keyring dunst feh gsimplecal xfce4-power-manager xfce4-settings laptop-detect"
|
||||
|
||||
@ -102,6 +103,7 @@ CMAPS="$(find /usr/share/kbd/keymaps -name '*.map.gz' | awk '{
|
||||
# make sure these are defined for some dialog size calculation
|
||||
[[ $LINES ]] || LINES=$(tput lines)
|
||||
[[ $COLUMNS ]] || COLUMNS=$(tput cols)
|
||||
SHL=$((LINES - 20))
|
||||
|
||||
# various associative arrays
|
||||
# {
|
||||
@ -225,10 +227,10 @@ main()
|
||||
|
||||
case $SEL in
|
||||
1) device_tree ;;
|
||||
2) partition_menu || (( SEL-- )) ;;
|
||||
2) part_menu || (( SEL-- )) ;;
|
||||
3) luks_menu || (( SEL-- )) ;;
|
||||
4) lvm_menu || (( SEL-- )) ;;
|
||||
5) mounting_menu || (( SEL-- )) ;;
|
||||
5) mount_menu || (( SEL-- )) ;;
|
||||
6) prechecks 0 && { mkuser || (( SEL-- )); } ;;
|
||||
7) prechecks 1 && { cfg_menu || (( SEL-- )); } ;;
|
||||
8) prechecks 2 && { select_sessions || (( SEL-- )); } ;;
|
||||
@ -245,7 +247,7 @@ main()
|
||||
show_cfg()
|
||||
{
|
||||
local cmd="${BCMDS[$BOOTLDR]}"
|
||||
local mnt="/boot"
|
||||
[[ $BOOT_PART ]] && local mnt="/boot" || local mnt="none"
|
||||
local pkgs="${USER_PKGS# }"
|
||||
pkgs="${pkgs% }"
|
||||
pkgs="${pkgs% } ${PACKAGES# }"
|
||||
@ -268,8 +270,8 @@ show_cfg()
|
||||
LVM: ${LVM:-none}
|
||||
LUKS: ${LUKS:-none}
|
||||
|
||||
Extra Mounts: ${EXMNTS:-${EXMNT:-none}}
|
||||
Mkinit Hooks: ${HOOKS:-none}
|
||||
Extra: ${EXMNTS:-${EXMNT:-none}}
|
||||
Hooks: ${HOOKS:-none}
|
||||
|
||||
|
||||
---------- BOOTLOADER CONFIGURATION -----------
|
||||
@ -307,29 +309,23 @@ show_cfg()
|
||||
|
||||
cfg_menu()
|
||||
{
|
||||
local err=0
|
||||
|
||||
tput civis
|
||||
if ! MYSHELL="$(menubox "$_ShellTitle" "$_ShellBody" '/usr/bin/zsh' '-' '/bin/bash' '-' '/usr/bin/mksh' '-')"; then
|
||||
return 1
|
||||
fi
|
||||
MYSHELL="$(menubox "$_ShellTitle" "$_ShellBody" '/usr/bin/zsh' '-' '/bin/bash' '-' '/usr/bin/mksh' '-')"
|
||||
[[ $MYSHELL ]] || return 1
|
||||
tput cnorm
|
||||
if ! HOSTNAME="$(getinput "$_ConfHost" "$_HostNameBody" "${DIST,,}")"; then
|
||||
return 1
|
||||
fi
|
||||
HOSTNAME="$(getinput "$_ConfHost" "$_HostNameBody" "${DIST,,}")"
|
||||
[[ $HOSTNAME ]] || return 1
|
||||
tput civis
|
||||
if ! LOCALE="$(dialog --cr-wrap --stdout --backtitle "$BT" \
|
||||
--title " $_ConfLocale " --menu "$_LocaleBody" 0 0 $((LINES - 20)) $LOCALES)"; then
|
||||
return 1
|
||||
fi
|
||||
LOCALE="$(dialog --cr-wrap --stdout --backtitle "$BT" --title " $_ConfLocale " --menu "$_LocaleBody" 0 0 $SHL $LOCALES)"
|
||||
[[ $LOCALE ]] || return 1
|
||||
select_timezone || return 1
|
||||
KERNEL="$(menubox "$_KernelTitle" "$_KernelBody" \
|
||||
'linux' 'Vanilla Linux kernel and modules, with a few patches applied.' \
|
||||
'linux-lts' 'Long-term support (LTS) Linux kernel and modules.' \
|
||||
'linux-zen' 'A collaborative effort of kernel hackers to provide the best Linux kernel for everyday systems' \
|
||||
'linux-hardened' 'A security-focused Linux kernel with hardening patches to mitigate kernel and userspace exploits')"
|
||||
err=$?
|
||||
(( err == 0 )) || return 1
|
||||
|
||||
[[ $KERNEL ]] || return 1
|
||||
select_mirrorcmd || return 1
|
||||
CONFIG_DONE=true
|
||||
return 0
|
||||
@ -386,7 +382,7 @@ select_keymap()
|
||||
{
|
||||
tput civis
|
||||
KEYMAP="$(dialog --cr-wrap --stdout --backtitle "$BT" \
|
||||
--title " $_PrepLayout " --menu "$_XMapBody" 0 0 $((LINES - 20)) \
|
||||
--title " $_PrepLayout " --menu "$_XMapBody" 0 0 $SHL \
|
||||
'us' 'English' 'cm' 'English' 'gb' 'English' 'au' 'English' 'gh' 'English' \
|
||||
'za' 'English' 'ng' 'English' 'ca' 'French' 'cd' 'French' 'gn' 'French' \
|
||||
'tg' 'French' 'fr' 'French' 'de' 'German' 'at' 'German' 'ch' 'German' \
|
||||
@ -409,13 +405,10 @@ select_keymap()
|
||||
'me' 'Montenegrin')"
|
||||
|
||||
[[ $KEYMAP ]] || return 1
|
||||
|
||||
if [[ $CMAPS == *"$KEYMAP"* ]]; then
|
||||
CMAP="$KEYMAP"
|
||||
else
|
||||
CMAP="$(dialog --cr-wrap --stdout --backtitle "$BT" \
|
||||
--title " $_CMapTitle " --menu "$_CMapBody" 0 0 $((LINES - 17)) $CMAPS)"
|
||||
|
||||
CMAP="$(dialog --cr-wrap --stdout --backtitle "$BT" --title " $_CMapTitle " --menu "$_CMapBody" 0 0 $SHL $CMAPS)"
|
||||
[[ $CMAP ]] || return 1
|
||||
fi
|
||||
|
||||
@ -430,26 +423,28 @@ select_keymap()
|
||||
|
||||
select_timezone()
|
||||
{
|
||||
# create associative array for SUBZONES[zone]
|
||||
local f="/usr/share/zoneinfo/zone.tab"
|
||||
declare -A SUBZONES
|
||||
local f="/usr/share/zoneinfo/zone.tab" err=0
|
||||
|
||||
declare -A subz
|
||||
for i in America Australia Asia Atlantic Africa Europe Indian Pacific Arctic Antarctica; do
|
||||
SUBZONES[$i]="$(awk '/'"$i"'\// {gsub(/'"$i"'\//, ""); print $3, $1}' $f | sort)"
|
||||
subz[$i]="$(awk '/'"$i"'\// {gsub(/'"$i"'\//, ""); print $3, $1}' $f | sort)"
|
||||
done
|
||||
|
||||
while true; do
|
||||
tput civis
|
||||
if ! ZONE="$(menubox "$_TimeZTitle" "$_TimeZBody" \
|
||||
ZONE="$(menubox "$_TimeZTitle" "$_TimeZBody" \
|
||||
'America' '-' 'Australia' '-' 'Asia' '-' 'Atlantic' '-' 'Africa' '-' \
|
||||
'Europe' '-' 'Indian' '-' 'Pacific' '-' 'Arctic' '-' 'Antarctica' '-')"; then
|
||||
return 1
|
||||
fi
|
||||
'Europe' '-' 'Indian' '-' 'Pacific' '-' 'Arctic' '-' 'Antarctica' '-')"
|
||||
|
||||
if ! SUBZONE="$(dialog --cr-wrap --stdout --backtitle "$BT" \
|
||||
--title " $_TimeZTitle " --menu "$_TimeSubZBody" 0 0 $((LINES - 17)) ${SUBZONES[$ZONE]})"; then
|
||||
return 1
|
||||
fi
|
||||
[[ $ZONE ]] || { err=1; break; }
|
||||
SUBZONE="$(dialog --cr-wrap --stdout --backtitle "$BT" \
|
||||
--title " $_TimeZTitle " --menu "$_TimeSubZBody" 0 0 $SHL ${subz[$ZONE]})"
|
||||
|
||||
yesno "$_TimeZTitle" "$_TimeZQ $ZONE/$SUBZONE?\n" || select_timezone
|
||||
[[ $SUBZONE ]] || { err=1; break; }
|
||||
yesno "$_TimeZTitle" "$_TimeZQ $ZONE/$SUBZONE\n" && break
|
||||
done
|
||||
|
||||
return $err
|
||||
}
|
||||
|
||||
select_sessions()
|
||||
@ -472,13 +467,13 @@ select_sessions()
|
||||
[[ $INSTALL_WMS ]] || return 1
|
||||
|
||||
WM_NUM=$(awk '{print NF}' <<< "$INSTALL_WMS")
|
||||
WM_PACKAGES="${INSTALL_WMS/dwm/}" # remove dwm from package list
|
||||
WM_PACKAGES="${WM_PACKAGES// / }" # remove double spaces
|
||||
WM_PACKAGES="${WM_PACKAGES# }" # remove leading space
|
||||
WM_PKGS="${INSTALL_WMS/dwm/}" # remove dwm from package list
|
||||
WM_PKGS="${WM_PKGS// / }" # remove double spaces
|
||||
WM_PKGS="${WM_PKGS# }" # remove leading space
|
||||
|
||||
for wm in $INSTALL_WMS; do
|
||||
LOGIN_CHOICES+="$wm - "
|
||||
[[ ${WM_EXT[$wm]} && $WM_PACKAGES != *"${WM_EXT[$wm]}"* ]] && WM_PACKAGES+=" ${WM_EXT[$wm]}"
|
||||
[[ ${WM_EXT[$wm]} && $WM_PKGS != *"${WM_EXT[$wm]}"* ]] && WM_PKGS+=" ${WM_EXT[$wm]}"
|
||||
done
|
||||
|
||||
select_login || return 1
|
||||
@ -496,8 +491,8 @@ select_sessions()
|
||||
fi
|
||||
|
||||
# add unique wm packages to main package list
|
||||
for i in $WM_PACKAGES; do
|
||||
[[ $PACKAGES == *$i* ]] || PACKAGES+=" ${WM_PACKAGES# }"
|
||||
for i in $WM_PKGS; do
|
||||
[[ $PACKAGES == *$i* ]] || PACKAGES+=" ${WM_PKGS# }"
|
||||
done
|
||||
|
||||
return 0
|
||||
@ -512,12 +507,12 @@ select_login()
|
||||
if [[ $LOGIN_TYPE == "" ]]; then
|
||||
return 1
|
||||
elif [[ $LOGIN_TYPE == 'lightdm' ]]; then
|
||||
WM_PACKAGES+=" lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings accountsservice"
|
||||
WM_PKGS+=" lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings accountsservice"
|
||||
EDIT_FILES[login]="/etc/lightdm/lightdm.conf /etc/lightdm/lightdm-gtk-greeter.conf"
|
||||
else
|
||||
PACKAGES="${PACKAGES// lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings accountsservice/}"
|
||||
WM_PACKAGES="${WM_PACKAGES// lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings accountsservice/}"
|
||||
WM_PACKAGES+=" xorg-xinit"
|
||||
WM_PKGS="${WM_PKGS// lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings accountsservice/}"
|
||||
WM_PKGS+=" xorg-xinit"
|
||||
EDIT_FILES[login]="/home/$NEWUSER/.xinitrc /home/$NEWUSER/.xprofile"
|
||||
fi
|
||||
}
|
||||
@ -568,9 +563,12 @@ select_mirrorcmd()
|
||||
edit_configs()
|
||||
{
|
||||
tput civis
|
||||
local choice
|
||||
local choice i=0
|
||||
|
||||
while true; do
|
||||
choice=$(dialog --cr-wrap --no-cancel --stdout --backtitle "$BT" \
|
||||
--title " $_EditTitle " --menu "$_EditBody" 0 0 0 \
|
||||
"finished" "exit the installer and reboot" \
|
||||
"keyboard" "${EDIT_FILES[keyboard]}" \
|
||||
"console" "${EDIT_FILES[console]}" \
|
||||
"locale" "${EDIT_FILES[locale]}" \
|
||||
@ -581,10 +579,9 @@ edit_configs()
|
||||
"crypttab" "${EDIT_FILES[crypttab]}" \
|
||||
"bootloader" "${EDIT_FILES[bootloader]}" \
|
||||
"pacman" "${EDIT_FILES[pacman]}" \
|
||||
"login" "${EDIT_FILES[login]}" \
|
||||
"Finished" "Unmount partitions, exit the installer, and reboot")
|
||||
"login" "${EDIT_FILES[login]}")
|
||||
|
||||
if [[ $choice == "" || $choice == "Finished" ]]; then
|
||||
if [[ $choice == "" || $choice == "finished" ]]; then
|
||||
[[ $DEBUG == true && -r $DBG ]] && vim $DBG
|
||||
# when die() is passed 127 it will call: systemctl -i reboot
|
||||
die 127
|
||||
@ -599,7 +596,7 @@ edit_configs()
|
||||
msgbox "$_ErrTitle" "$_NoFileErr"
|
||||
fi
|
||||
fi
|
||||
edit_configs
|
||||
done
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
@ -831,7 +828,7 @@ pkg_extra()
|
||||
###############################################################################
|
||||
# partition menus
|
||||
|
||||
partition_menu()
|
||||
part_menu()
|
||||
{
|
||||
local device choice
|
||||
|
||||
@ -843,7 +840,7 @@ partition_menu()
|
||||
fi
|
||||
|
||||
tput civis
|
||||
if [[ $DISPLAY ]] && hash gparted >/dev/null 2>&1; then
|
||||
if [[ $DISPLAY && $TERM != 'linux' ]] && hash gparted >/dev/null 2>&1; then
|
||||
choice="$(menubox "$_PartTitle" "$_PartBody" \
|
||||
"$_PartShowTree" "Shows output from the lsblk command" \
|
||||
"$_PartAuto" "Full device automatic partitioning" \
|
||||
@ -868,13 +865,11 @@ partition_menu()
|
||||
if [[ $choice == "$_Done" || $choice == "" ]]; then
|
||||
return 0
|
||||
elif [[ $choice != "$_PartWipe" && $choice != "$_PartAuto" && $choice != "$_PartShowTree" ]]; then
|
||||
clear; tput cnorm; $choice "$device"; partition_menu "$device"
|
||||
clear; tput cnorm; $choice "$device"
|
||||
elif [[ $choice == "$_PartShowTree" ]]; then
|
||||
msgbox "$_PartTitle" "\n\n$(lsblk -o NAME,MODEL,SIZE,TYPE,FSTYPE,MOUNTPOINT "$device")\n\n"
|
||||
partition_menu "$device"
|
||||
elif [[ $choice == "$_PartWipe" ]]; then
|
||||
yesno "$_PartWipe" "$_PartBody1 $device $_PartWipeBody" && wipe -Ifrev $device
|
||||
partition_menu "$device"
|
||||
else
|
||||
local root_size msg ret table boot_fs
|
||||
root_size=$(lsblk -lno SIZE "$device" | awk 'NR == 1 {
|
||||
@ -892,20 +887,22 @@ partition_menu()
|
||||
fi
|
||||
|
||||
if yesno "$_PrepParts" "$_PartBody1 $device $msg ($root_size)$_PartBody3"; then
|
||||
auto_partition "$device" "$table" "$boot_fs" "$root_size" || return 1
|
||||
if auto_partition "$device" "$table" "$boot_fs" "$root_size"; then
|
||||
return 0
|
||||
else
|
||||
partition_menu "$device"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
return 0
|
||||
part_menu "$device"
|
||||
}
|
||||
|
||||
format_as()
|
||||
{
|
||||
infobox "$_FSTitle" "\nRunning: ${FS_CMDS[$2]} $1\n" 1
|
||||
${FS_CMDS[$2]} "$1" >/dev/null 2>$ERR
|
||||
errshow "${FS_CMDS[$2]} $1"
|
||||
errshow "${FS_CMDS[$2]} $1" && FORMATTED+=" $part"
|
||||
}
|
||||
|
||||
enable_swap()
|
||||
@ -940,7 +937,6 @@ device_tree()
|
||||
select_device()
|
||||
{
|
||||
local dev msg
|
||||
|
||||
[[ $1 == 'boot' ]] && msg="$_DevSelTitle for bootloader\n" || umount_dir $MNT
|
||||
|
||||
if [[ $DEV_COUNT -eq 1 && $SYS_DEVS ]]; then
|
||||
@ -962,7 +958,6 @@ select_device()
|
||||
confirm_mount()
|
||||
{
|
||||
local part="$1" mount="$2"
|
||||
|
||||
[[ $mount == "$MNT" ]] && local m="/ (root)" || local m="${mount#$MNT}"
|
||||
if [[ $(mount) == *"$mount"* ]]; then
|
||||
infobox "$_MntTitle" "$_MntSucc\nPartition: $part\nMountpoint: $m\n" 1
|
||||
@ -1056,11 +1051,9 @@ auto_partition()
|
||||
|
||||
infobox "$_PrepParts" "\nCreating a $size ext4 root partition.\n" 0
|
||||
parted -s $device mkpart primary ext4 513MiB 100% >/dev/null 2>&1
|
||||
|
||||
sleep 0.5
|
||||
AUTO_ROOT_PART="$(lsblk -lno NAME,TYPE $device | awk 'NR == 3 {print "/dev/"$1}')"
|
||||
mkfs.ext4 -q $AUTO_ROOT_PART >/dev/null 2>&1
|
||||
|
||||
tput civis
|
||||
sleep 0.5
|
||||
msgbox "$_PrepParts" "\nAuto partitioning complete.\n\n$(lsblk -o NAME,MODEL,SIZE,TYPE,FSTYPE $device)\n"
|
||||
@ -1079,7 +1072,6 @@ mount_partition()
|
||||
else
|
||||
mount "$part" "$mountp" 2>$ERR
|
||||
fi
|
||||
|
||||
confirm_mount $part "$mountp" || return 1
|
||||
check_cryptlvm "$part"
|
||||
|
||||
@ -1088,8 +1080,7 @@ mount_partition()
|
||||
|
||||
find_partitions()
|
||||
{
|
||||
local str="$1"
|
||||
local err=''
|
||||
local str="$1" err=''
|
||||
|
||||
# string of partitions as /TYPE/PART SIZE
|
||||
if [[ $IGNORE_DEV != "" ]]; then
|
||||
@ -1144,9 +1135,8 @@ setup_boot_device()
|
||||
###############################################################################
|
||||
# mounting menus
|
||||
|
||||
mounting_menu()
|
||||
mount_menu()
|
||||
{
|
||||
# prepare partition list PARTS for dialog
|
||||
lvm_detect
|
||||
umount_dir $MNT
|
||||
find_partitions 'part|lvm|crypt' || { SEL=2; return 1; }
|
||||
@ -1224,6 +1214,7 @@ select_mount_opts()
|
||||
while true; do
|
||||
MNT_OPTS="$(dialog --cr-wrap --stdout --backtitle "$BT" \
|
||||
--title " $title " --checklist "$_MntBody" 0 0 0 $opts)"
|
||||
|
||||
if [[ $MNT_OPTS ]]; then
|
||||
MNT_OPTS="$(sed 's/ /,/g; $s/,$//' <<< "$MNT_OPTS" )"
|
||||
yesno "$title" "$_MntConfBody $MNT_OPTS\n" && break
|
||||
@ -1239,15 +1230,14 @@ select_filesystem()
|
||||
{
|
||||
local part="$1" fs="" cur_fs="" err=0
|
||||
cur_fs="$(lsblk -lno FSTYPE "$part" 2>/dev/null)"
|
||||
local msg="\nSelect which filesystem to use for: $part\n\nCurrent: ${cur_fs:-none}\nDefault: ext4"
|
||||
|
||||
[[ $part == $ROOT_PART && $ROOT_PART == $AUTO_ROOT_PART && $LUKS == "" && $LVM == "" ]] && return 0
|
||||
[[ $part == "$ROOT_PART" && $ROOT_PART == "$AUTO_ROOT_PART" && ! $LUKS && ! $LVM ]] && return 0
|
||||
|
||||
while true; do
|
||||
local msg="\nSelect which filesystem to use for: $part\n\nCurrent: ${cur_fs:-none}\nDefault: ext4"
|
||||
tput civis
|
||||
if [[ $cur_fs && $part != "$ROOT_PART" ]]; then
|
||||
if [[ $cur_fs && ( $part != "$ROOT_PART" || $FORMATTED == *"$part"* ) ]]; then
|
||||
fs="$(menubox "$_FSTitle: $part" "$msg" \
|
||||
"$_Skip" "-" \
|
||||
"$_Skip" "Do not format this partition" \
|
||||
"ext4" "${FS_CMDS[ext4]}" \
|
||||
"ext3" "${FS_CMDS[ext3]}" \
|
||||
"ext2" "${FS_CMDS[ext2]}" \
|
||||
@ -1261,6 +1251,7 @@ select_filesystem()
|
||||
|
||||
[[ $fs == "$_Skip" ]] && break
|
||||
else
|
||||
local msg="\nSelect which filesystem to use for: $part\n\nDefault: ext4"
|
||||
fs="$(menubox "$_FSTitle: $part" "$msg" \
|
||||
"ext4" "${FS_CMDS[ext4]}" \
|
||||
"ext3" "${FS_CMDS[ext3]}" \
|
||||
@ -1273,12 +1264,9 @@ select_filesystem()
|
||||
"reiserfs" "${FS_CMDS[reiserfs]}")"
|
||||
|
||||
fi
|
||||
|
||||
[[ $fs ]] || { err=1; break; }
|
||||
|
||||
yesno "$_FSTitle" "\nFormat $part as $fs?\n" && break
|
||||
done
|
||||
|
||||
(( err == 0 )) || return $err
|
||||
[[ $fs == "$_Skip" ]] || format_as "$part" "$fs"
|
||||
}
|
||||
@ -1288,18 +1276,16 @@ select_efi_partition()
|
||||
tput civis
|
||||
if (( COUNT == 1 )); then
|
||||
BOOT_PART="$(awk 'NF > 0 {print $1}' <<< "$PARTS")"
|
||||
infobox "$_PrepMount" "$_OnlyOne for EFI: $BOOT_PART\n" 1
|
||||
elif [[ $BOOT_PART == "$AUTO_BOOT_PART" ]]; then
|
||||
elif [[ $AUTO_BOOT_PART ]]; then
|
||||
BOOT_PART="$AUTO_BOOT_PART"
|
||||
return 0 # were done here
|
||||
else
|
||||
BOOT_PART="$(menubox "$_PrepMount" "$_SelUefiBody" $PARTS)"
|
||||
fi
|
||||
|
||||
[[ $BOOT_PART ]] || return 1
|
||||
|
||||
if grep -q 'fat' <<< "$(fsck -N "$BOOT_PART")"; then
|
||||
local msg="$_FormUefiBody $BOOT_PART $_FormUefiBody2"
|
||||
local msg="$_FormUefiBody $BOOT_PART $_FormBootBody"
|
||||
if yesno "$_PrepMount" "$msg" "Format $BOOT_PART" "Skip Formatting" "no"; then
|
||||
format_as "$BOOT_PART" "vfat"
|
||||
sleep 1
|
||||
@ -1315,11 +1301,11 @@ select_efi_partition()
|
||||
select_boot_partition()
|
||||
{
|
||||
tput civis
|
||||
if [[ $AUTO_BOOT_PART && $AUTO_BOOT_PART == "$BOOT_PART" ]]; then
|
||||
if [[ $AUTO_BOOT_PART && ! $LVM ]]; then
|
||||
BOOT_PART="$AUTO_BOOT_PART"
|
||||
return 0 # were done here
|
||||
elif [[ $LUKS && ! $LVM ]]; then
|
||||
BOOT_PART="$(menubox "$_PrepMount" "\nSelect the boot partition (/boot), this is required for LUKS." $PARTS)"
|
||||
BOOT_PART="$(menubox "$_PrepMount" "$_SelBiosLuksBody" $PARTS)"
|
||||
[[ $BOOT_PART ]] || return 1
|
||||
else
|
||||
BOOT_PART="$(menubox "$_PrepMount" "$_SelBiosBody" "$_Skip" "-" $PARTS)"
|
||||
@ -1327,7 +1313,7 @@ select_boot_partition()
|
||||
fi
|
||||
|
||||
if grep -q 'ext[34]' <<< "$(fsck -N "$BOOT_PART")"; then
|
||||
local msg="$_FormBiosBody $BOOT_PART $_FormBiosBody2"
|
||||
local msg="$_FormBiosBody $BOOT_PART $_FormBootBody"
|
||||
if yesno "$_PrepMount" "$msg" "Format $BOOT_PART" "Skip Formatting" "no"; then
|
||||
format_as "$BOOT_PART" "ext4"
|
||||
sleep 1
|
||||
@ -1344,7 +1330,6 @@ select_root_partition()
|
||||
tput civis
|
||||
if (( COUNT == 1 )); then
|
||||
ROOT_PART="$(awk 'NF > 0 {print $1}' <<< "$PARTS")"
|
||||
infobox "$_PrepMount" "$_OnlyOne for root (/): $ROOT_PART\n" 1
|
||||
elif ! ROOT_PART="$(menubox "$_PrepMount" "$_SelRootBody" $PARTS)"; then
|
||||
return 1
|
||||
fi
|
||||
@ -1360,7 +1345,6 @@ select_extra_partitions()
|
||||
while (( COUNT > 0 )); do
|
||||
tput civis
|
||||
part="$(menubox "$_PrepMount " "$_ExtPartBody" "$_Done" "Return to the main menu" $PARTS)"
|
||||
|
||||
if [[ $part == "$_Done" || $part == "" ]]; then
|
||||
break
|
||||
elif select_filesystem "$part" && select_mountpoint && mount_partition "$part" "$EXMNT"; then
|
||||
@ -1395,7 +1379,7 @@ install()
|
||||
login_manager
|
||||
printf "Setting ownership of /home/$NEWUSER\n"
|
||||
chrun "chown -Rf $NEWUSER:users /home/$NEWUSER"
|
||||
sleep 3
|
||||
sleep 1
|
||||
edit_configs
|
||||
}
|
||||
|
||||
@ -1677,10 +1661,7 @@ package_operations()
|
||||
inpkg+=" linux-hardened"; rmpkg+=" linux"
|
||||
fi
|
||||
|
||||
if [[ $MYSHELL == '/usr/bin/zsh' ]]; then
|
||||
inpkg+=" zsh-completions zsh-history-substring-search"
|
||||
fi
|
||||
|
||||
[[ $MYSHELL == '/usr/bin/zsh' ]] && inpkg+=" zsh-completions zsh-history-substring-search"
|
||||
[[ $INSTALL_WMS =~ (openbox|bspwm|i3-gaps|dwm) ]] && inpkg+=" $WM_BASE_PKGS"
|
||||
[[ $INSTALL_WMS =~ ^(plasma|gnome|cinnamon)$ ]] || inpkg+=" archlabs-ksuperkey"
|
||||
|
||||
@ -1703,14 +1684,14 @@ suckless_install()
|
||||
if chrun "git clone https://bitbucket.org/natemaia/$i /home/$NEWUSER/suckless/$i"; then
|
||||
chrun "cd /home/$NEWUSER/suckless/$i; rm -f config.h; make clean install; make clean"
|
||||
else
|
||||
printf "Failed to clone $i repo\n"
|
||||
printf "failed to clone $i repo\n"
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -d $MNT/home/$NEWUSER/suckless/dwm && -x $MNT/usr/bin/dwm ]]; then
|
||||
printf "To configure dwm edit /home/$NEWUSER/suckless/dwm/config.h\n"
|
||||
printf "You can then recompile it with 'sudo make clean install'\n"
|
||||
sleep 3
|
||||
sleep 2
|
||||
fi
|
||||
}
|
||||
|
||||
@ -1733,12 +1714,10 @@ setup_boot()
|
||||
fi
|
||||
|
||||
[[ $BOOTLDR ]] || return 1
|
||||
|
||||
if [[ $BOOT_PART != "" ]]; then
|
||||
mount_partition "$BOOT_PART" "/boot" && SEP_BOOT=true || return 1
|
||||
setup_boot_device
|
||||
fi
|
||||
|
||||
setup_${BOOTLDR} || return 1
|
||||
}
|
||||
|
||||
@ -1784,19 +1763,15 @@ setup_systemd-boot()
|
||||
|
||||
prerun_grub()
|
||||
{
|
||||
local cfg="$MNT/etc/default/grub"
|
||||
sed -i "s/GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"${DIST}\"/g;
|
||||
s/GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"\"/g" $cfg
|
||||
s/GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"\"/g" $MNT/etc/default/grub
|
||||
if [[ $LUKS_DEV ]]; then
|
||||
sed -i "s~#GRUB_ENABLE_CRYPTODISK~GRUB_ENABLE_CRYPTODISK~g;
|
||||
s~GRUB_CMDLINE_LINUX=.*~GRUB_CMDLINE_LINUX=\"${LUKS_DEV}\"~g" $cfg
|
||||
s~GRUB_CMDLINE_LINUX=.*~GRUB_CMDLINE_LINUX=\"${LUKS_DEV}\"~g" $MNT/etc/default/grub
|
||||
fi
|
||||
if [[ $SYS == 'BIOS' && $LVM && $SEP_BOOT == false ]]; then
|
||||
sed -i "s/GRUB_PRELOAD_MODULES=.*/GRUB_PRELOAD_MODULES=\"lvm\"/g" $cfg
|
||||
sed -i "s/GRUB_PRELOAD_MODULES=.*/GRUB_PRELOAD_MODULES=\"lvm\"/g" $MNT/etc/default/grub
|
||||
fi
|
||||
|
||||
# needed for grub-probe module to work properly in the chroot
|
||||
# once the grub install is done these will be umounted and removed
|
||||
mkdir -p /run/lvm
|
||||
mkdir -p /run/udev
|
||||
mkdir -p $MNT/hostrun/lvm
|
||||
@ -1809,7 +1784,6 @@ prerun_grub()
|
||||
|
||||
prerun_systemd-boot()
|
||||
{
|
||||
# create the boot entry configs
|
||||
mkdir -p ${MNT}/boot/loader/entries
|
||||
cat > ${MNT}/boot/loader/loader.conf << EOF
|
||||
default $DIST
|
||||
@ -1828,7 +1802,6 @@ linux /vmlinuz-${KERNEL}$([[ $UCODE ]] && printf "\ninitrd %s" "/${UCODE}.img
|
||||
initrd /initramfs-$KERNEL-fallback.img
|
||||
options root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && printf "%s " "$LUKS_DEV")rw
|
||||
EOF
|
||||
# add pacman hook to update the bootloader when systemd receives an update
|
||||
mkdir -p $MNT/etc/pacman.d/hooks
|
||||
cat > $MNT/etc/pacman.d/hooks/systemd-boot.hook << EOF
|
||||
[Trigger]
|
||||
@ -1841,7 +1814,6 @@ Description = Updating systemd-boot
|
||||
When = PostTransaction
|
||||
Exec = /usr/bin/bootctl update
|
||||
EOF
|
||||
# systemd-boot requires this before running bootctl
|
||||
systemd-machine-id-setup --root="$MNT"
|
||||
return 0
|
||||
}
|
||||
@ -1858,17 +1830,16 @@ MENU BACKGROUND splash.png
|
||||
TIMEOUT 50
|
||||
DEFAULT $DIST
|
||||
|
||||
# Refer to https://www.syslinux.org/wiki/index.php/Comboot/menu.c32
|
||||
MENU WIDTH 78
|
||||
MENU MARGIN 4
|
||||
MENU ROWS 5
|
||||
MENU ROWS 4
|
||||
MENU VSHIFT 10
|
||||
MENU TIMEOUTROW 13
|
||||
MENU TABMSGROW 14
|
||||
MENU CMDLINEROW 14
|
||||
MENU HELPMSGROW 16
|
||||
MENU HELPMSGENDROW 29
|
||||
|
||||
# Refer to https://www.syslinux.org/wiki/index.php/Comboot/menu.c32
|
||||
MENU COLOR border 30;44 #40ffffff #a0000000 std
|
||||
MENU COLOR title 1;36;44 #9033ccff #a0000000 std
|
||||
MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all
|
||||
@ -1879,7 +1850,6 @@ MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std
|
||||
MENU COLOR msg07 37;40 #90ffffff #a0000000 std
|
||||
MENU COLOR tabmsg 31;40 #30ffffff #00000000 std
|
||||
|
||||
|
||||
LABEL $DIST
|
||||
MENU LABEL $DIST Linux
|
||||
LINUX ../vmlinuz-$KERNEL
|
||||
@ -1892,7 +1862,6 @@ LINUX ../vmlinuz-$KERNEL
|
||||
APPEND root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && printf "%s " "$LUKS_DEV")rw
|
||||
INITRD $([[ $UCODE ]] && printf "%s" "../${UCODE}.img,")../initramfs-$KERNEL-fallback.img
|
||||
|
||||
|
||||
# some examples for chainloading other bootloaders
|
||||
|
||||
#LABEL grub2
|
||||
@ -2049,55 +2018,56 @@ get_lv_size()
|
||||
|
||||
lvm_volume_name()
|
||||
{
|
||||
local msg="$1"
|
||||
|
||||
local default="volmain"
|
||||
(( VOL_COUNT > 1 )) && default="volextra"
|
||||
local msg="$1" default="mainvolume" name="" err=0
|
||||
(( VOL_COUNT > 1 )) && default="extravolume$VOL_COUNT"
|
||||
|
||||
while true; do
|
||||
tput cnorm
|
||||
local name
|
||||
if ! name="$(getinput "$_LvmCreateVG (LV:$VOL_COUNT)" "\n$msg" "$default" nolimit)"; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
name="$(getinput "$_LvmCreateVG (LV:$VOL_COUNT)" "\n$msg" "$default" nolimit)"
|
||||
[[ $name ]] || { err=1; break; }
|
||||
if [[ ${name:0:1} == "/" || ${#name} -eq 0 || $name =~ \ |\' ]] || grep -q "$name" <<< "$(lsblk)"; then
|
||||
msgbox "$_ErrTitle" "$_LvmLvNameErrBody"
|
||||
lvm_volume_name "$msg" || return 1
|
||||
fi
|
||||
|
||||
else
|
||||
VOLUME_NAME="$name"
|
||||
return 0
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
return $err
|
||||
}
|
||||
|
||||
lvm_group_name()
|
||||
{
|
||||
tput cnorm
|
||||
local group
|
||||
if ! group="$(getinput "$_LvmCreateVG" "$_LvmNameVgBody" "VolGroup" nolimit)"; then
|
||||
return 1
|
||||
fi
|
||||
local group="" err=0
|
||||
|
||||
while true; do
|
||||
tput cnorm
|
||||
group="$(getinput "$_LvmCreateVG" "$_LvmNameVgBody" "VolGroup" nolimit)"
|
||||
[[ $group ]] || { err=1; break; }
|
||||
if [[ ${group:0:1} == "/" || ${#group} -eq 0 || $group =~ \ |\' ]] || grep -q "$group" <<< "$(lsblk)"; then
|
||||
msgbox "$_ErrTitle" "$_LvmNameVgErr"
|
||||
lvm_group_name || return 1
|
||||
fi
|
||||
|
||||
else
|
||||
VOLUME_GROUP="$group"
|
||||
return 0
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
return $err
|
||||
}
|
||||
|
||||
lvm_extra_lvs()
|
||||
{
|
||||
local err=0
|
||||
|
||||
while (( VOL_COUNT > 1 )); do
|
||||
lvm_volume_name "$_LvmLvNameBody1" || { break; return 1; }
|
||||
get_lv_size || { break; return 1; }
|
||||
lvm_volume_name "$_LvmLvNameBody1" && get_lv_size || { err=1; break; }
|
||||
lvcreate -L "$VOLUME_SIZE" "$VOLUME_GROUP" -n "$VOLUME_NAME" >/dev/null 2>$ERR
|
||||
errshow "lvcreate -L $VOLUME_SIZE $VOLUME_GROUP -n $VOLUME_NAME"
|
||||
errshow "lvcreate -L $VOLUME_SIZE $VOLUME_GROUP -n $VOLUME_NAME" || { err=1; break; }
|
||||
msgbox "$_LvmCreateVG (LV:$VOL_COUNT)" "\n$_Done Logical Volume (LV) $VOLUME_NAME ($VOLUME_SIZE) $_LvmPvDoneBody2.\n"
|
||||
(( VOL_COUNT-- ))
|
||||
done
|
||||
|
||||
return 0
|
||||
return $err
|
||||
}
|
||||
|
||||
lvm_volumes()
|
||||
@ -2134,7 +2104,7 @@ lvm_mkgroup()
|
||||
done
|
||||
|
||||
vgcreate -f "$VOLUME_GROUP" "${LVM_PARTS[@]}" >/dev/null 2>$ERR
|
||||
errshow "vgcreate -f $VOLUME_GROUP ${LVM_PARTS[*]}"
|
||||
errshow "vgcreate -f $VOLUME_GROUP ${LVM_PARTS[*]}" || return 1
|
||||
|
||||
GROUP_SIZE=$(vgdisplay "$VOLUME_GROUP" | awk '/VG Size/ {
|
||||
gsub(/[^0-9.]/, "")
|
||||
@ -2165,7 +2135,7 @@ lvm_create()
|
||||
lvm_extra_lvs || return 1
|
||||
lvm_volume_name "$_LvmLvNameBody1 $_LvmLvNameBody2 (${VGROUP_MB}MB)" || return 1
|
||||
lvcreate -l +100%FREE "$VOLUME_GROUP" -n "$VOLUME_NAME" >/dev/null 2>$ERR
|
||||
errshow "lvcreate -l +100%FREE $VOLUME_GROUP -n $VOLUME_NAME"
|
||||
errshow "lvcreate -l +100%FREE $VOLUME_GROUP -n $VOLUME_NAME" || return 1
|
||||
LVM='logical volume'; tput civis; sleep 0.5
|
||||
local msg="\n$_Done $_LvmPvDoneBody1 $VOLUME_GROUP-$VOLUME_NAME (${VOLUME_SIZE:-${VGROUP_MB}MB}) $_LvmPvDoneBody2.\n"
|
||||
msgbox "$_LvmCreateVG (LV:$VOL_COUNT)" "$msg\n$(lsblk -o NAME,MODEL,TYPE,FSTYPE,SIZE "${LVM_PARTS[@]}")\n"
|
||||
@ -2176,7 +2146,6 @@ lvm_del_vg()
|
||||
if lvm_show_vg && yesno "$_LvmDelVG" "$_LvmDelQ"; then
|
||||
vgremove -f "$DEL_VG" >/dev/null 2>&1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
lvm_del_all()
|
||||
@ -2197,7 +2166,6 @@ lvm_del_all()
|
||||
done
|
||||
LVM=''
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
@ -2215,9 +2183,9 @@ luks_menu()
|
||||
"$_Back" "Return to the main menu")"
|
||||
|
||||
case $choice in
|
||||
"$_LuksEncrypt") luks_default || return 1 ;;
|
||||
"$_LuksEncrypt") luks_basic || return 1 ;;
|
||||
"$_LuksOpen") luks_open || return 1 ;;
|
||||
"$_LuksEncryptAdv") luks_keycmd || return 1 ;;
|
||||
"$_LuksEncryptAdv") luks_advanced || return 1 ;;
|
||||
esac
|
||||
|
||||
return 0
|
||||
@ -2225,7 +2193,6 @@ luks_menu()
|
||||
|
||||
luks_open()
|
||||
{
|
||||
LUKS_PART=""
|
||||
modprobe -a dm-mod dm_crypt
|
||||
umount_dir $MNT
|
||||
find_partitions 'part|crypt|lvm' || return 1
|
||||
@ -2233,18 +2200,16 @@ luks_open()
|
||||
|
||||
if (( COUNT == 1 )); then
|
||||
LUKS_PART="$(awk 'NF > 0 {print $1}' <<< "$PARTS")"
|
||||
infobox "$_LuksOpen" "${_OnlyOne}: $LUKS_PART\n" 1
|
||||
elif ! LUKS_PART="$(menubox "$_LuksOpen" "$_LuksMenuBody" $PARTS)" || ! [[ $LUKS_PART ]]; then
|
||||
return 1
|
||||
else
|
||||
LUKS_PART="$(menubox "$_LuksOpen" "$_LuksMenuBody" $PARTS)"
|
||||
fi
|
||||
[[ $LUKS_PART ]] || return 1
|
||||
|
||||
luks_pass "$_LuksOpen" || return 1
|
||||
infobox "$_LuksOpen" "$_LuksOpenWaitBody $LUKS_NAME $_LuksWaitBody2 $LUKS_PART\n" 0
|
||||
cryptsetup open --type luks $LUKS_PART "$LUKS_NAME" <<< "$LUKS_PASS" 2>$ERR
|
||||
errshow "cryptsetup open --type luks $LUKS_PART $LUKS_NAME"
|
||||
|
||||
LUKS='encrypted'
|
||||
luks_show
|
||||
errshow "cryptsetup open --type luks $LUKS_PART $LUKS_NAME" || return 1
|
||||
LUKS='encrypted'; luks_show
|
||||
return 0
|
||||
}
|
||||
|
||||
@ -2300,7 +2265,6 @@ luks_pass()
|
||||
|
||||
luks_setup()
|
||||
{
|
||||
LUKS_PART=""
|
||||
modprobe -a dm-mod dm_crypt
|
||||
umount_dir $MNT
|
||||
find_partitions 'part|lvm' || return 1
|
||||
@ -2308,42 +2272,38 @@ luks_setup()
|
||||
|
||||
if (( COUNT == 1 )); then
|
||||
LUKS_PART="$(awk 'NF > 0 {print $1}' <<< "$PARTS")"
|
||||
infobox "$_LuksEncrypt" "${_OnlyOne}: $LUKS_PART\n" 1
|
||||
elif ! LUKS_PART="$(menubox "$_LuksEncrypt" "$_LuksEncryptBody" $PARTS)"; then
|
||||
return 1
|
||||
elif ! luks_pass "$_LuksEncrypt"; then
|
||||
return 1
|
||||
else
|
||||
LUKS_PART="$(menubox "$_LuksEncrypt" "$_LuksEncryptBody" $PARTS)"
|
||||
fi
|
||||
|
||||
return 0
|
||||
[[ $LUKS_PART ]] || return 1
|
||||
luks_pass "$_LuksEncrypt"
|
||||
}
|
||||
|
||||
luks_default()
|
||||
luks_basic()
|
||||
{
|
||||
luks_setup || return 1
|
||||
infobox "$_LuksEncrypt" "$_LuksCreateWaitBody $LUKS_NAME $_LuksWaitBody2 $LUKS_PART\n" 0
|
||||
cryptsetup -q luksFormat $LUKS_PART <<< "$LUKS_PASS" 2>$ERR
|
||||
errshow "cryptsetup -q luksFormat $LUKS_PART"
|
||||
errshow "cryptsetup -q luksFormat $LUKS_PART" || return 1
|
||||
cryptsetup open $LUKS_PART "$LUKS_NAME" <<< "$LUKS_PASS" 2>$ERR
|
||||
errshow "cryptsetup open $LUKS_PART $LUKS_NAME"
|
||||
LUKS='encrypted'
|
||||
luks_show
|
||||
errshow "cryptsetup open $LUKS_PART $LUKS_NAME" || return 1
|
||||
LUKS='encrypted'; luks_show
|
||||
return 0
|
||||
}
|
||||
|
||||
luks_keycmd()
|
||||
luks_advanced()
|
||||
{
|
||||
if luks_setup; then
|
||||
tput cnorm
|
||||
local cipher
|
||||
if ! cipher="$(getinput "$_PrepLUKS" "$_LuksCipherKey" "-s 512 -c aes-xts-plain64" nolimit)"; then
|
||||
return 1
|
||||
fi
|
||||
cipher="$(getinput "$_PrepLUKS" "$_LuksCipherKey" "-s 512 -c aes-xts-plain64" nolimit)"
|
||||
[[ $cipher ]] || return 1
|
||||
infobox "$_LuksEncryptAdv" "$_LuksCreateWaitBody $LUKS_NAME $_LuksWaitBody2 $LUKS_PART\n" 0
|
||||
cryptsetup -q $cipher luksFormat $LUKS_PART <<< "$LUKS_PASS" 2>$ERR
|
||||
errshow "cryptsetup -q $cipher luksFormat $LUKS_PART"
|
||||
errshow "cryptsetup -q $cipher luksFormat $LUKS_PART" || return 1
|
||||
cryptsetup open $LUKS_PART "$LUKS_NAME" <<< "$LUKS_PASS" 2>$ERR
|
||||
errshow "cryptsetup open $LUKS_PART $LUKS_NAME"
|
||||
errshow "cryptsetup open $LUKS_PART $LUKS_NAME" || return 1
|
||||
luks_show
|
||||
return 0
|
||||
fi
|
||||
@ -2378,7 +2338,7 @@ luks_keyfile()
|
||||
|
||||
ofn()
|
||||
{
|
||||
[[ $USER_PKGS == *$1* ]] && printf "on" || printf "off"
|
||||
[[ $USER_PKGS == *"$1"* ]] && printf "on" || printf "off"
|
||||
}
|
||||
|
||||
chrun()
|
||||
@ -2410,16 +2370,15 @@ is_ssd()
|
||||
|
||||
die()
|
||||
{
|
||||
(( $# >= 1 )) && local exitcode=$1 || local exitcode=0
|
||||
(( $# >= 1 )) && exitcode=$1 || exitcode=0
|
||||
|
||||
trap - INT
|
||||
tput cnorm
|
||||
|
||||
if [[ -d $MNT ]] && command cd /; then
|
||||
umount_dir $MNT
|
||||
if (( exitcode == 127 )); then
|
||||
umount -l /run/archiso/bootmnt
|
||||
sleep 0.5
|
||||
systemctl -i reboot
|
||||
umount -l /run/archiso/bootmnt; sleep 0.5; systemctl -i reboot
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -2521,7 +2480,7 @@ load_bcm()
|
||||
chk_connect()
|
||||
{
|
||||
if [[ $CHECKED_NET == true ]]; then
|
||||
infobox "Network Connect" "\nVerifying connection\n" 1
|
||||
infobox "Network Connect" "\nVerifying network connection\n" 1
|
||||
else
|
||||
infobox "Network Connect" "\nChecking connection to https://www.archlinux.org\n" 1
|
||||
CHECKED_NET=true
|
||||
@ -2557,7 +2516,7 @@ system_checks()
|
||||
die 1
|
||||
fi
|
||||
grep -q 'BCM4352' <<< "$(lspci -vnn -d 14e4:)" && load_bcm
|
||||
net_connect || { infobox "$_ErrTitle" "$_NoNetwork\n$_Exit" 3; die 1; }
|
||||
net_connect || { infobox "$_ErrTitle" "$_NoNetwork\n$_Exit"; die 1; }
|
||||
}
|
||||
|
||||
prechecks()
|
||||
@ -2569,15 +2528,15 @@ prechecks()
|
||||
elif [[ $1 -ge 2 && $CONFIG_DONE != true ]]; then
|
||||
infobox "$_ErrTitle" "$_ErrNoConfig"; SEL=6; return 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
errshow()
|
||||
{
|
||||
local last_exit_code=$?
|
||||
last_exit_code=$?
|
||||
(( last_exit_code == 0 )) && return 0
|
||||
local err
|
||||
err="$(sed 's/[^[:print:]]//g; s/\[[0-9\;:]*\?m//g; s/==> //g; s/] ERROR:/]\nERROR:/g' "$ERR")"
|
||||
local err="$(sed 's/[^[:print:]]//g; s/\[[0-9\;:]*\?m//g; s/==> //g; s/] ERROR:/]\nERROR:/g' "$ERR")"
|
||||
|
||||
if [[ $err ]]; then
|
||||
msgbox "$_ErrTitle" "\nThe command exited abnormally: $1\n\nWith the following message: $err"
|
||||
@ -2589,6 +2548,8 @@ errshow()
|
||||
[[ -e $DBG && $TERM == 'linux' ]] && less $DBG
|
||||
die 1
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
debug()
|
||||
|
Reference in New Issue
Block a user