More recursion refactoring, update dialog text
This commit is contained in:
parent
8c85cc08af
commit
e6e52af3cb
@ -1,7 +1,6 @@
|
|||||||
# english translation file
|
# english translation file
|
||||||
# written by natemaia10@gmail.com - 2018
|
# written by natemaia10@gmail.com - 2018
|
||||||
|
|
||||||
# Generic
|
|
||||||
_Done="Done"
|
_Done="Done"
|
||||||
_Back="Back"
|
_Back="Back"
|
||||||
_Name="Name:"
|
_Name="Name:"
|
||||||
@ -13,16 +12,13 @@ _Pass2="\nRe-enter the password for"
|
|||||||
_NoFileErr="\nFile does not exist.\n"
|
_NoFileErr="\nFile does not exist.\n"
|
||||||
_OnlyOne="\nOnly one partition available"
|
_OnlyOne="\nOnly one partition available"
|
||||||
|
|
||||||
# Welcome
|
|
||||||
_WelTitle="Welcome to"
|
_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"
|
_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"
|
_NotRoot="\nThis installer must be run as root or using sudo.\n"
|
||||||
_Not64Bit="\nThis installer only supports x86_64 capable machines.\n"
|
_Not64Bit="\nThis installer only supports x86_64 architectures.\n"
|
||||||
_NoNetwork="\nThis installer needs to be run with an active internet connection in order to update and install packages.\n"
|
_NoNetwork="\nThis installer requires an active internet connection.\n"
|
||||||
|
|
||||||
# Preparation Menu
|
|
||||||
_PrepTitle="Prepare Install"
|
_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."
|
_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"
|
_PrepLayout="Keyboard Layout"
|
||||||
@ -38,169 +34,142 @@ _PrepPkg="Select additional packages (optional)"
|
|||||||
_PrepShow="Check configuration choices (optional)"
|
_PrepShow="Check configuration choices (optional)"
|
||||||
_PrepInstall="Start the installation"
|
_PrepInstall="Start the installation"
|
||||||
|
|
||||||
# Select Config Files
|
|
||||||
_EditTitle="Finalization"
|
_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"
|
_CloseInst="Exit"
|
||||||
_CloseInstBody="\nUnmount partitions (if any) and exit the installer?\n"
|
_CloseInstBody="\nUnmount partitions (if any) and exit the installer?\n"
|
||||||
|
|
||||||
# timezone
|
|
||||||
_TimeZTitle="Timezone"
|
_TimeZTitle="Timezone"
|
||||||
_TimeZQ="\nConfirm time zone:"
|
_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"
|
_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."
|
_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."
|
_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"
|
||||||
_MirrorTitle="Mirrorlist Sorting"
|
|
||||||
_MirrorSetup="\nSort the mirrorlist automatically?\n\nTakes longer but gets fastest mirrors.\n"
|
_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"
|
_MirrorCmd="\nThe command below will be used to sort the mirrorlist, edit if needed.\n"
|
||||||
|
|
||||||
# window managers and packages
|
|
||||||
_WMChoice="Sessions"
|
_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."
|
_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."
|
_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)."
|
_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"
|
_WMLogin="Login Managment"
|
||||||
_LoginTypeBody="\nSelect which login managment to use."
|
_LoginTypeBody="\nSelect which login managment to use."
|
||||||
_AutoLoginBody="\nDo you want auto login+startx enabled?"
|
_AutoLoginBody="\nDo you want autologin enabled?\n"
|
||||||
_WMLoginBody="\nSelect which to use as your primary login session.\n\nThis can be changed by editing your ~/.xinitrc."
|
_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"
|
_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"
|
_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"
|
_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"
|
_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"
|
_ConfHost="Hostname"
|
||||||
_ConfLocale="Language and Locale"
|
_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."
|
_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"
|
_UserTitle="User Creation"
|
||||||
_Username="Username:"
|
_Username="Username:"
|
||||||
_Password="Password:"
|
_Password="Password:"
|
||||||
_Password2="Password2:"
|
_Password2="Password2:"
|
||||||
_RootBody="--- Enter root password (empty uses the password entered above) ---"
|
_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"
|
_MntTitle="Mount Status"
|
||||||
_MntFail="\nMount Failed!\n"
|
_MntFail="\nMount Failed!\n"
|
||||||
_MntSucc="\nMount Succeeded!\n"
|
_MntSucc="\nMount Succeeded!\n"
|
||||||
_MntConfBody="\nConfirm mount options:"
|
_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."
|
_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"
|
_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 ..."
|
_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."
|
_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"
|
_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"
|
_ShellTitle="Login Shell"
|
||||||
_ShellBody="\nChoose a shell for the new user and root."
|
_ShellBody="\nChoose a shell for the new user and root."
|
||||||
|
|
||||||
# Partitioning Menu
|
|
||||||
_PartTitle="Partitioning"
|
_PartTitle="Partitioning"
|
||||||
_PartWipe="Secure wipe"
|
_PartWipe="Secure wipe"
|
||||||
_PartAuto="Automatic partitioning"
|
_PartAuto="Auto partitioning"
|
||||||
_PartShowTree="Show partition Table"
|
_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"
|
_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"
|
_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"
|
_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"
|
_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
|
_FSTitle="Filesystem"
|
||||||
_InstSysTitle="Install Syslinux"
|
_SelRootBody="\nSelect the root (/) partition, this is where $DIST will be installed."
|
||||||
_InstSysBody="\nInstall syslinux to the master boot record (MBR) or to root (/)?"
|
_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."
|
||||||
# File System
|
_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."
|
||||||
_FSTitle="Choose Filesystem"
|
_FormUefiBody="\nIMPORTANT: The EFI partition"
|
||||||
_SelRootBody="\nSelect the system root (/) partition.\n\nThis is where $DIST will be installed."
|
_FormBiosBody="\nIMPORTANT: The boot partition"
|
||||||
_SelBiosBody="\nDo you want to use a separate boot partition?\n\nThis partition is where the bootloader and init will be installed.\n"
|
_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"
|
_SelSwpNone="None"
|
||||||
_SelSwpFile="Swapfile"
|
_SelSwpFile="Swapfile"
|
||||||
_SelSwpSetup="Swap Setup"
|
_SelSwpSetup="Swap Setup"
|
||||||
_SelSwpBody="\nSelect whether to use a swap partition, swapfile, or none."
|
_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."
|
_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
|
# LUKS / DM-Crypt / Encryption
|
||||||
_LuksMenuBody="\nDevices and volumes encrypted using dm_crypt cannot be accessed or seen without being first unlocked."
|
_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 - unless using BIOS Grub) is required."
|
_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."
|
_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="\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."
|
||||||
_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="Basic LUKS Encryption"
|
||||||
_LuksEncrypt="Automatic LUKS Encryption"
|
_LuksEncryptAdv="Advanced LUKS Encryption"
|
||||||
_LuksEncryptAdv="Define Key-Size and Cypher"
|
_LuksOpen="Open Previous Encryption"
|
||||||
_LuksEncryptBody="\nSelect the partition you want to encrypt."
|
_LuksEncryptBody="\nSelect the partition you want to encrypt."
|
||||||
_LuksEncryptSucc="\nDone! encrypted partition opened and ready for mounting.\n"
|
_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:"
|
_LuksCreateWaitBody="\nCreating encrypted partition:"
|
||||||
_LuksOpenWaitBody="\nOpening encrypted partition:"
|
_LuksOpenWaitBody="\nOpening encrypted partition:"
|
||||||
_LuksWaitBody2="\n\nDevice or volume used:"
|
_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)."
|
_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="\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."
|
||||||
_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 New VG and LV(s)"
|
||||||
_LvmCreateVG="Create Volume Group and Logical Volume(s)"
|
_LvmDelVG="Delete Existing VG(s)"
|
||||||
_LvmDelVG="Delete Volume Groups"
|
_LvMDelAll="\nDelete *ALL* volume groups, logical volumes, and physical volumes"
|
||||||
_LvMDelAll="Delete *ALL* volume groups, logical volumes, and physical volumes"
|
_LvmDetBody="\nExisting logical volume management (LVM) detected.\n\nActivating...\n"
|
||||||
_LvmDetBody="\nExisting logical volume management (LVM) detected.\n\nActivating, please wait...\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."
|
||||||
_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="\nSelect the partition(s) to use for the physical volume (PV)."
|
||||||
_LvmPvSelBody="Select the partition(s) to use for the physical volume (PV)."
|
|
||||||
_LvmPvConfBody1="\nConfirm creation of volume group:"
|
_LvmPvConfBody1="\nConfirm creation of volume group:"
|
||||||
_LvmPvConfBody2="With the following partition(s):"
|
_LvmPvConfBody2="with the following partition(s):"
|
||||||
_LvmPvActBody1="\nCreating and activating volume group:"
|
_LvmPvActBody1="\nCreating and activating volume group:"
|
||||||
_LvmPvDoneBody1="Volume group:"
|
_LvmPvDoneBody1="volume group:"
|
||||||
_LvmPvDoneBody2="has been created"
|
_LvmPvDoneBody2="has been created"
|
||||||
_LvmLvNumBody1="\nUse [Spacebar] to select the number of logical volumes (LVs) to create in:"
|
_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."
|
_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"
|
_LvmLvNameBody2="\nNOTE: This LV will use up all remaining space in the volume group"
|
||||||
_LvmLvSizeBody1="remaining"
|
_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"
|
_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."
|
_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="Select volume group to delete.\n\nAll logical volumes within will also be deleted."
|
_LvmSelVGBody="\nSelect volume group to delete.\n\nAll logical volumes within will also be deleted."
|
||||||
|
|
||||||
# LVM Errors
|
|
||||||
_LvmVGErr="\nNo volume groups found."
|
_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"
|
_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="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."
|
_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="Invalid name entered.\n\nThe logical volume (LV) name may be alpha-numeric, but may not contain spaces or be preceded with a '/'\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"
|
_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"
|
_UserErrTitle="User Name Error"
|
||||||
_PassErr="\nThe passwords entered do not match.\n"
|
_PassErr="\nThe passwords entered do not match.\n"
|
||||||
_UserErrBody="\nIncorrect user name.\n\nPlease try again.\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"
|
_RootPassErr="\nThe root passwords entered do not match.\n"
|
||||||
_UserPassEmpty="\nThe user password cannot be left empty.\n"
|
_UserPassEmpty="\nThe user password cannot be left empty.\n"
|
||||||
_ErrNoMount="\nPartition(s) must be mounted first.\n"
|
_ErrNoMount="\nPartition(s) must be mounted first.\n"
|
||||||
_ErrNoConfig="\nYou need to configure the system first.\n"
|
_ErrNoConfig="\nSystem configuration must be done 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"
|
_ErrNoUser="\nA new user account must be created first.\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"
|
_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
|
# 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
|
INSTALL_WMS="" # space separated list of chosen wm/de
|
||||||
KERNEL="linux" # can be linux, linux-lts, linux-zen, or linux-hardened
|
KERNEL="linux" # can be linux, linux-lts, linux-zen, or linux-hardened
|
||||||
MYSHELL="" # login shell for root and the primary user
|
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
|
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
|
HOOKS="shutdown" # list of additional HOOKS to add in /etc/mkinitcpio.conf
|
||||||
FONT="ter-i16n" # font used in the linux console
|
FONT="ter-i16n" # font used in the linux console
|
||||||
UCODE="" # cpu manufacturer microcode filename (if any)
|
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
|
BROADCOM_WL=false # fixes for broadcom cards eg. BCM4352
|
||||||
CHECKED_NET=false # have we checked the network connection already
|
CHECKED_NET=false # have we checked the network connection already
|
||||||
|
|
||||||
AUTO_ROOT_PART="" # values from auto partition
|
AUTO_ROOT_PART="" # root value from auto partition
|
||||||
AUTO_BOOT_PART=""
|
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="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+="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"
|
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="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"
|
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
|
# make sure these are defined for some dialog size calculation
|
||||||
[[ $LINES ]] || LINES=$(tput lines)
|
[[ $LINES ]] || LINES=$(tput lines)
|
||||||
[[ $COLUMNS ]] || COLUMNS=$(tput cols)
|
[[ $COLUMNS ]] || COLUMNS=$(tput cols)
|
||||||
|
SHL=$((LINES - 20))
|
||||||
|
|
||||||
# various associative arrays
|
# various associative arrays
|
||||||
# {
|
# {
|
||||||
@ -225,10 +227,10 @@ main()
|
|||||||
|
|
||||||
case $SEL in
|
case $SEL in
|
||||||
1) device_tree ;;
|
1) device_tree ;;
|
||||||
2) partition_menu || (( SEL-- )) ;;
|
2) part_menu || (( SEL-- )) ;;
|
||||||
3) luks_menu || (( SEL-- )) ;;
|
3) luks_menu || (( SEL-- )) ;;
|
||||||
4) lvm_menu || (( SEL-- )) ;;
|
4) lvm_menu || (( SEL-- )) ;;
|
||||||
5) mounting_menu || (( SEL-- )) ;;
|
5) mount_menu || (( SEL-- )) ;;
|
||||||
6) prechecks 0 && { mkuser || (( SEL-- )); } ;;
|
6) prechecks 0 && { mkuser || (( SEL-- )); } ;;
|
||||||
7) prechecks 1 && { cfg_menu || (( SEL-- )); } ;;
|
7) prechecks 1 && { cfg_menu || (( SEL-- )); } ;;
|
||||||
8) prechecks 2 && { select_sessions || (( SEL-- )); } ;;
|
8) prechecks 2 && { select_sessions || (( SEL-- )); } ;;
|
||||||
@ -245,7 +247,7 @@ main()
|
|||||||
show_cfg()
|
show_cfg()
|
||||||
{
|
{
|
||||||
local cmd="${BCMDS[$BOOTLDR]}"
|
local cmd="${BCMDS[$BOOTLDR]}"
|
||||||
local mnt="/boot"
|
[[ $BOOT_PART ]] && local mnt="/boot" || local mnt="none"
|
||||||
local pkgs="${USER_PKGS# }"
|
local pkgs="${USER_PKGS# }"
|
||||||
pkgs="${pkgs% }"
|
pkgs="${pkgs% }"
|
||||||
pkgs="${pkgs% } ${PACKAGES# }"
|
pkgs="${pkgs% } ${PACKAGES# }"
|
||||||
@ -268,8 +270,8 @@ show_cfg()
|
|||||||
LVM: ${LVM:-none}
|
LVM: ${LVM:-none}
|
||||||
LUKS: ${LUKS:-none}
|
LUKS: ${LUKS:-none}
|
||||||
|
|
||||||
Extra Mounts: ${EXMNTS:-${EXMNT:-none}}
|
Extra: ${EXMNTS:-${EXMNT:-none}}
|
||||||
Mkinit Hooks: ${HOOKS:-none}
|
Hooks: ${HOOKS:-none}
|
||||||
|
|
||||||
|
|
||||||
---------- BOOTLOADER CONFIGURATION -----------
|
---------- BOOTLOADER CONFIGURATION -----------
|
||||||
@ -307,29 +309,23 @@ show_cfg()
|
|||||||
|
|
||||||
cfg_menu()
|
cfg_menu()
|
||||||
{
|
{
|
||||||
local err=0
|
|
||||||
|
|
||||||
tput civis
|
tput civis
|
||||||
if ! MYSHELL="$(menubox "$_ShellTitle" "$_ShellBody" '/usr/bin/zsh' '-' '/bin/bash' '-' '/usr/bin/mksh' '-')"; then
|
MYSHELL="$(menubox "$_ShellTitle" "$_ShellBody" '/usr/bin/zsh' '-' '/bin/bash' '-' '/usr/bin/mksh' '-')"
|
||||||
return 1
|
[[ $MYSHELL ]] || return 1
|
||||||
fi
|
|
||||||
tput cnorm
|
tput cnorm
|
||||||
if ! HOSTNAME="$(getinput "$_ConfHost" "$_HostNameBody" "${DIST,,}")"; then
|
HOSTNAME="$(getinput "$_ConfHost" "$_HostNameBody" "${DIST,,}")"
|
||||||
return 1
|
[[ $HOSTNAME ]] || return 1
|
||||||
fi
|
|
||||||
tput civis
|
tput civis
|
||||||
if ! LOCALE="$(dialog --cr-wrap --stdout --backtitle "$BT" \
|
LOCALE="$(dialog --cr-wrap --stdout --backtitle "$BT" --title " $_ConfLocale " --menu "$_LocaleBody" 0 0 $SHL $LOCALES)"
|
||||||
--title " $_ConfLocale " --menu "$_LocaleBody" 0 0 $((LINES - 20)) $LOCALES)"; then
|
[[ $LOCALE ]] || return 1
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
select_timezone || return 1
|
select_timezone || return 1
|
||||||
KERNEL="$(menubox "$_KernelTitle" "$_KernelBody" \
|
KERNEL="$(menubox "$_KernelTitle" "$_KernelBody" \
|
||||||
'linux' 'Vanilla Linux kernel and modules, with a few patches applied.' \
|
'linux' 'Vanilla Linux kernel and modules, with a few patches applied.' \
|
||||||
'linux-lts' 'Long-term support (LTS) Linux kernel and modules.' \
|
'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-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')"
|
'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
|
select_mirrorcmd || return 1
|
||||||
CONFIG_DONE=true
|
CONFIG_DONE=true
|
||||||
return 0
|
return 0
|
||||||
@ -386,7 +382,7 @@ select_keymap()
|
|||||||
{
|
{
|
||||||
tput civis
|
tput civis
|
||||||
KEYMAP="$(dialog --cr-wrap --stdout --backtitle "$BT" \
|
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' \
|
'us' 'English' 'cm' 'English' 'gb' 'English' 'au' 'English' 'gh' 'English' \
|
||||||
'za' 'English' 'ng' 'English' 'ca' 'French' 'cd' 'French' 'gn' 'French' \
|
'za' 'English' 'ng' 'English' 'ca' 'French' 'cd' 'French' 'gn' 'French' \
|
||||||
'tg' 'French' 'fr' 'French' 'de' 'German' 'at' 'German' 'ch' 'German' \
|
'tg' 'French' 'fr' 'French' 'de' 'German' 'at' 'German' 'ch' 'German' \
|
||||||
@ -409,13 +405,10 @@ select_keymap()
|
|||||||
'me' 'Montenegrin')"
|
'me' 'Montenegrin')"
|
||||||
|
|
||||||
[[ $KEYMAP ]] || return 1
|
[[ $KEYMAP ]] || return 1
|
||||||
|
|
||||||
if [[ $CMAPS == *"$KEYMAP"* ]]; then
|
if [[ $CMAPS == *"$KEYMAP"* ]]; then
|
||||||
CMAP="$KEYMAP"
|
CMAP="$KEYMAP"
|
||||||
else
|
else
|
||||||
CMAP="$(dialog --cr-wrap --stdout --backtitle "$BT" \
|
CMAP="$(dialog --cr-wrap --stdout --backtitle "$BT" --title " $_CMapTitle " --menu "$_CMapBody" 0 0 $SHL $CMAPS)"
|
||||||
--title " $_CMapTitle " --menu "$_CMapBody" 0 0 $((LINES - 17)) $CMAPS)"
|
|
||||||
|
|
||||||
[[ $CMAP ]] || return 1
|
[[ $CMAP ]] || return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -430,27 +423,29 @@ select_keymap()
|
|||||||
|
|
||||||
select_timezone()
|
select_timezone()
|
||||||
{
|
{
|
||||||
# create associative array for SUBZONES[zone]
|
local f="/usr/share/zoneinfo/zone.tab" err=0
|
||||||
local f="/usr/share/zoneinfo/zone.tab"
|
|
||||||
declare -A SUBZONES
|
declare -A subz
|
||||||
for i in America Australia Asia Atlantic Africa Europe Indian Pacific Arctic Antarctica; do
|
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
|
done
|
||||||
|
|
||||||
tput civis
|
while true; do
|
||||||
if ! ZONE="$(menubox "$_TimeZTitle" "$_TimeZBody" \
|
tput civis
|
||||||
'America' '-' 'Australia' '-' 'Asia' '-' 'Atlantic' '-' 'Africa' '-' \
|
ZONE="$(menubox "$_TimeZTitle" "$_TimeZBody" \
|
||||||
'Europe' '-' 'Indian' '-' 'Pacific' '-' 'Arctic' '-' 'Antarctica' '-')"; then
|
'America' '-' 'Australia' '-' 'Asia' '-' 'Atlantic' '-' 'Africa' '-' \
|
||||||
return 1
|
'Europe' '-' 'Indian' '-' 'Pacific' '-' 'Arctic' '-' 'Antarctica' '-')"
|
||||||
fi
|
|
||||||
|
|
||||||
if ! SUBZONE="$(dialog --cr-wrap --stdout --backtitle "$BT" \
|
[[ $ZONE ]] || { err=1; break; }
|
||||||
--title " $_TimeZTitle " --menu "$_TimeSubZBody" 0 0 $((LINES - 17)) ${SUBZONES[$ZONE]})"; then
|
SUBZONE="$(dialog --cr-wrap --stdout --backtitle "$BT" \
|
||||||
return 1
|
--title " $_TimeZTitle " --menu "$_TimeSubZBody" 0 0 $SHL ${subz[$ZONE]})"
|
||||||
fi
|
|
||||||
|
|
||||||
yesno "$_TimeZTitle" "$_TimeZQ $ZONE/$SUBZONE?\n" || select_timezone
|
[[ $SUBZONE ]] || { err=1; break; }
|
||||||
}
|
yesno "$_TimeZTitle" "$_TimeZQ $ZONE/$SUBZONE\n" && break
|
||||||
|
done
|
||||||
|
|
||||||
|
return $err
|
||||||
|
}
|
||||||
|
|
||||||
select_sessions()
|
select_sessions()
|
||||||
{
|
{
|
||||||
@ -472,13 +467,13 @@ select_sessions()
|
|||||||
[[ $INSTALL_WMS ]] || return 1
|
[[ $INSTALL_WMS ]] || return 1
|
||||||
|
|
||||||
WM_NUM=$(awk '{print NF}' <<< "$INSTALL_WMS")
|
WM_NUM=$(awk '{print NF}' <<< "$INSTALL_WMS")
|
||||||
WM_PACKAGES="${INSTALL_WMS/dwm/}" # remove dwm from package list
|
WM_PKGS="${INSTALL_WMS/dwm/}" # remove dwm from package list
|
||||||
WM_PACKAGES="${WM_PACKAGES// / }" # remove double spaces
|
WM_PKGS="${WM_PKGS// / }" # remove double spaces
|
||||||
WM_PACKAGES="${WM_PACKAGES# }" # remove leading space
|
WM_PKGS="${WM_PKGS# }" # remove leading space
|
||||||
|
|
||||||
for wm in $INSTALL_WMS; do
|
for wm in $INSTALL_WMS; do
|
||||||
LOGIN_CHOICES+="$wm - "
|
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
|
done
|
||||||
|
|
||||||
select_login || return 1
|
select_login || return 1
|
||||||
@ -496,8 +491,8 @@ select_sessions()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# add unique wm packages to main package list
|
# add unique wm packages to main package list
|
||||||
for i in $WM_PACKAGES; do
|
for i in $WM_PKGS; do
|
||||||
[[ $PACKAGES == *$i* ]] || PACKAGES+=" ${WM_PACKAGES# }"
|
[[ $PACKAGES == *$i* ]] || PACKAGES+=" ${WM_PKGS# }"
|
||||||
done
|
done
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
@ -512,12 +507,12 @@ select_login()
|
|||||||
if [[ $LOGIN_TYPE == "" ]]; then
|
if [[ $LOGIN_TYPE == "" ]]; then
|
||||||
return 1
|
return 1
|
||||||
elif [[ $LOGIN_TYPE == 'lightdm' ]]; then
|
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"
|
EDIT_FILES[login]="/etc/lightdm/lightdm.conf /etc/lightdm/lightdm-gtk-greeter.conf"
|
||||||
else
|
else
|
||||||
PACKAGES="${PACKAGES// lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings accountsservice/}"
|
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_PKGS="${WM_PKGS// lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings accountsservice/}"
|
||||||
WM_PACKAGES+=" xorg-xinit"
|
WM_PKGS+=" xorg-xinit"
|
||||||
EDIT_FILES[login]="/home/$NEWUSER/.xinitrc /home/$NEWUSER/.xprofile"
|
EDIT_FILES[login]="/home/$NEWUSER/.xinitrc /home/$NEWUSER/.xprofile"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -568,38 +563,40 @@ select_mirrorcmd()
|
|||||||
edit_configs()
|
edit_configs()
|
||||||
{
|
{
|
||||||
tput civis
|
tput civis
|
||||||
local choice
|
local choice i=0
|
||||||
choice=$(dialog --cr-wrap --no-cancel --stdout --backtitle "$BT" \
|
|
||||||
--title " $_EditTitle " --menu "$_EditBody" 0 0 0 \
|
|
||||||
"keyboard" "${EDIT_FILES[keyboard]}" \
|
|
||||||
"console" "${EDIT_FILES[console]}" \
|
|
||||||
"locale" "${EDIT_FILES[locale]}" \
|
|
||||||
"hostname" "${EDIT_FILES[hostname]}" \
|
|
||||||
"sudoers" "${EDIT_FILES[sudoers]}" \
|
|
||||||
"mkinitcpio" "${EDIT_FILES[mkinitcpio]}" \
|
|
||||||
"fstab" "${EDIT_FILES[fstab]}" \
|
|
||||||
"crypttab" "${EDIT_FILES[crypttab]}" \
|
|
||||||
"bootloader" "${EDIT_FILES[bootloader]}" \
|
|
||||||
"pacman" "${EDIT_FILES[pacman]}" \
|
|
||||||
"login" "${EDIT_FILES[login]}" \
|
|
||||||
"Finished" "Unmount partitions, exit the installer, and reboot")
|
|
||||||
|
|
||||||
if [[ $choice == "" || $choice == "Finished" ]]; then
|
while true; do
|
||||||
[[ $DEBUG == true && -r $DBG ]] && vim $DBG
|
choice=$(dialog --cr-wrap --no-cancel --stdout --backtitle "$BT" \
|
||||||
# when die() is passed 127 it will call: systemctl -i reboot
|
--title " $_EditTitle " --menu "$_EditBody" 0 0 0 \
|
||||||
die 127
|
"finished" "exit the installer and reboot" \
|
||||||
else
|
"keyboard" "${EDIT_FILES[keyboard]}" \
|
||||||
local exists=""
|
"console" "${EDIT_FILES[console]}" \
|
||||||
for f in $(printf "%s" "${EDIT_FILES[$choice]}"); do
|
"locale" "${EDIT_FILES[locale]}" \
|
||||||
[[ -e ${MNT}$f ]] && exists+=" ${MNT}$f"
|
"hostname" "${EDIT_FILES[hostname]}" \
|
||||||
done
|
"sudoers" "${EDIT_FILES[sudoers]}" \
|
||||||
if [[ $exists ]]; then
|
"mkinitcpio" "${EDIT_FILES[mkinitcpio]}" \
|
||||||
vim -O $exists
|
"fstab" "${EDIT_FILES[fstab]}" \
|
||||||
|
"crypttab" "${EDIT_FILES[crypttab]}" \
|
||||||
|
"bootloader" "${EDIT_FILES[bootloader]}" \
|
||||||
|
"pacman" "${EDIT_FILES[pacman]}" \
|
||||||
|
"login" "${EDIT_FILES[login]}")
|
||||||
|
|
||||||
|
if [[ $choice == "" || $choice == "finished" ]]; then
|
||||||
|
[[ $DEBUG == true && -r $DBG ]] && vim $DBG
|
||||||
|
# when die() is passed 127 it will call: systemctl -i reboot
|
||||||
|
die 127
|
||||||
else
|
else
|
||||||
msgbox "$_ErrTitle" "$_NoFileErr"
|
local exists=""
|
||||||
|
for f in $(printf "%s" "${EDIT_FILES[$choice]}"); do
|
||||||
|
[[ -e ${MNT}$f ]] && exists+=" ${MNT}$f"
|
||||||
|
done
|
||||||
|
if [[ $exists ]]; then
|
||||||
|
vim -O $exists
|
||||||
|
else
|
||||||
|
msgbox "$_ErrTitle" "$_NoFileErr"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
done
|
||||||
edit_configs
|
|
||||||
}
|
}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@ -831,7 +828,7 @@ pkg_extra()
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# partition menus
|
# partition menus
|
||||||
|
|
||||||
partition_menu()
|
part_menu()
|
||||||
{
|
{
|
||||||
local device choice
|
local device choice
|
||||||
|
|
||||||
@ -843,7 +840,7 @@ partition_menu()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
tput civis
|
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" \
|
choice="$(menubox "$_PartTitle" "$_PartBody" \
|
||||||
"$_PartShowTree" "Shows output from the lsblk command" \
|
"$_PartShowTree" "Shows output from the lsblk command" \
|
||||||
"$_PartAuto" "Full device automatic partitioning" \
|
"$_PartAuto" "Full device automatic partitioning" \
|
||||||
@ -868,13 +865,11 @@ partition_menu()
|
|||||||
if [[ $choice == "$_Done" || $choice == "" ]]; then
|
if [[ $choice == "$_Done" || $choice == "" ]]; then
|
||||||
return 0
|
return 0
|
||||||
elif [[ $choice != "$_PartWipe" && $choice != "$_PartAuto" && $choice != "$_PartShowTree" ]]; then
|
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
|
elif [[ $choice == "$_PartShowTree" ]]; then
|
||||||
msgbox "$_PartTitle" "\n\n$(lsblk -o NAME,MODEL,SIZE,TYPE,FSTYPE,MOUNTPOINT "$device")\n\n"
|
msgbox "$_PartTitle" "\n\n$(lsblk -o NAME,MODEL,SIZE,TYPE,FSTYPE,MOUNTPOINT "$device")\n\n"
|
||||||
partition_menu "$device"
|
|
||||||
elif [[ $choice == "$_PartWipe" ]]; then
|
elif [[ $choice == "$_PartWipe" ]]; then
|
||||||
yesno "$_PartWipe" "$_PartBody1 $device $_PartWipeBody" && wipe -Ifrev $device
|
yesno "$_PartWipe" "$_PartBody1 $device $_PartWipeBody" && wipe -Ifrev $device
|
||||||
partition_menu "$device"
|
|
||||||
else
|
else
|
||||||
local root_size msg ret table boot_fs
|
local root_size msg ret table boot_fs
|
||||||
root_size=$(lsblk -lno SIZE "$device" | awk 'NR == 1 {
|
root_size=$(lsblk -lno SIZE "$device" | awk 'NR == 1 {
|
||||||
@ -892,20 +887,22 @@ partition_menu()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if yesno "$_PrepParts" "$_PartBody1 $device $msg ($root_size)$_PartBody3"; then
|
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
|
||||||
else
|
return 0
|
||||||
partition_menu "$device"
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 0
|
part_menu "$device"
|
||||||
}
|
}
|
||||||
|
|
||||||
format_as()
|
format_as()
|
||||||
{
|
{
|
||||||
infobox "$_FSTitle" "\nRunning: ${FS_CMDS[$2]} $1\n" 1
|
infobox "$_FSTitle" "\nRunning: ${FS_CMDS[$2]} $1\n" 1
|
||||||
${FS_CMDS[$2]} "$1" >/dev/null 2>$ERR
|
${FS_CMDS[$2]} "$1" >/dev/null 2>$ERR
|
||||||
errshow "${FS_CMDS[$2]} $1"
|
errshow "${FS_CMDS[$2]} $1" && FORMATTED+=" $part"
|
||||||
}
|
}
|
||||||
|
|
||||||
enable_swap()
|
enable_swap()
|
||||||
@ -940,7 +937,6 @@ device_tree()
|
|||||||
select_device()
|
select_device()
|
||||||
{
|
{
|
||||||
local dev msg
|
local dev msg
|
||||||
|
|
||||||
[[ $1 == 'boot' ]] && msg="$_DevSelTitle for bootloader\n" || umount_dir $MNT
|
[[ $1 == 'boot' ]] && msg="$_DevSelTitle for bootloader\n" || umount_dir $MNT
|
||||||
|
|
||||||
if [[ $DEV_COUNT -eq 1 && $SYS_DEVS ]]; then
|
if [[ $DEV_COUNT -eq 1 && $SYS_DEVS ]]; then
|
||||||
@ -962,7 +958,6 @@ select_device()
|
|||||||
confirm_mount()
|
confirm_mount()
|
||||||
{
|
{
|
||||||
local part="$1" mount="$2"
|
local part="$1" mount="$2"
|
||||||
|
|
||||||
[[ $mount == "$MNT" ]] && local m="/ (root)" || local m="${mount#$MNT}"
|
[[ $mount == "$MNT" ]] && local m="/ (root)" || local m="${mount#$MNT}"
|
||||||
if [[ $(mount) == *"$mount"* ]]; then
|
if [[ $(mount) == *"$mount"* ]]; then
|
||||||
infobox "$_MntTitle" "$_MntSucc\nPartition: $part\nMountpoint: $m\n" 1
|
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
|
infobox "$_PrepParts" "\nCreating a $size ext4 root partition.\n" 0
|
||||||
parted -s $device mkpart primary ext4 513MiB 100% >/dev/null 2>&1
|
parted -s $device mkpart primary ext4 513MiB 100% >/dev/null 2>&1
|
||||||
|
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
AUTO_ROOT_PART="$(lsblk -lno NAME,TYPE $device | awk 'NR == 3 {print "/dev/"$1}')"
|
AUTO_ROOT_PART="$(lsblk -lno NAME,TYPE $device | awk 'NR == 3 {print "/dev/"$1}')"
|
||||||
mkfs.ext4 -q $AUTO_ROOT_PART >/dev/null 2>&1
|
mkfs.ext4 -q $AUTO_ROOT_PART >/dev/null 2>&1
|
||||||
|
|
||||||
tput civis
|
tput civis
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
msgbox "$_PrepParts" "\nAuto partitioning complete.\n\n$(lsblk -o NAME,MODEL,SIZE,TYPE,FSTYPE $device)\n"
|
msgbox "$_PrepParts" "\nAuto partitioning complete.\n\n$(lsblk -o NAME,MODEL,SIZE,TYPE,FSTYPE $device)\n"
|
||||||
@ -1079,7 +1072,6 @@ mount_partition()
|
|||||||
else
|
else
|
||||||
mount "$part" "$mountp" 2>$ERR
|
mount "$part" "$mountp" 2>$ERR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
confirm_mount $part "$mountp" || return 1
|
confirm_mount $part "$mountp" || return 1
|
||||||
check_cryptlvm "$part"
|
check_cryptlvm "$part"
|
||||||
|
|
||||||
@ -1088,8 +1080,7 @@ mount_partition()
|
|||||||
|
|
||||||
find_partitions()
|
find_partitions()
|
||||||
{
|
{
|
||||||
local str="$1"
|
local str="$1" err=''
|
||||||
local err=''
|
|
||||||
|
|
||||||
# string of partitions as /TYPE/PART SIZE
|
# string of partitions as /TYPE/PART SIZE
|
||||||
if [[ $IGNORE_DEV != "" ]]; then
|
if [[ $IGNORE_DEV != "" ]]; then
|
||||||
@ -1144,9 +1135,8 @@ setup_boot_device()
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# mounting menus
|
# mounting menus
|
||||||
|
|
||||||
mounting_menu()
|
mount_menu()
|
||||||
{
|
{
|
||||||
# prepare partition list PARTS for dialog
|
|
||||||
lvm_detect
|
lvm_detect
|
||||||
umount_dir $MNT
|
umount_dir $MNT
|
||||||
find_partitions 'part|lvm|crypt' || { SEL=2; return 1; }
|
find_partitions 'part|lvm|crypt' || { SEL=2; return 1; }
|
||||||
@ -1224,6 +1214,7 @@ select_mount_opts()
|
|||||||
while true; do
|
while true; do
|
||||||
MNT_OPTS="$(dialog --cr-wrap --stdout --backtitle "$BT" \
|
MNT_OPTS="$(dialog --cr-wrap --stdout --backtitle "$BT" \
|
||||||
--title " $title " --checklist "$_MntBody" 0 0 0 $opts)"
|
--title " $title " --checklist "$_MntBody" 0 0 0 $opts)"
|
||||||
|
|
||||||
if [[ $MNT_OPTS ]]; then
|
if [[ $MNT_OPTS ]]; then
|
||||||
MNT_OPTS="$(sed 's/ /,/g; $s/,$//' <<< "$MNT_OPTS" )"
|
MNT_OPTS="$(sed 's/ /,/g; $s/,$//' <<< "$MNT_OPTS" )"
|
||||||
yesno "$title" "$_MntConfBody $MNT_OPTS\n" && break
|
yesno "$title" "$_MntConfBody $MNT_OPTS\n" && break
|
||||||
@ -1239,15 +1230,14 @@ select_filesystem()
|
|||||||
{
|
{
|
||||||
local part="$1" fs="" cur_fs="" err=0
|
local part="$1" fs="" cur_fs="" err=0
|
||||||
cur_fs="$(lsblk -lno FSTYPE "$part" 2>/dev/null)"
|
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
|
while true; do
|
||||||
|
local msg="\nSelect which filesystem to use for: $part\n\nCurrent: ${cur_fs:-none}\nDefault: ext4"
|
||||||
tput civis
|
tput civis
|
||||||
if [[ $cur_fs && $part != "$ROOT_PART" ]]; then
|
if [[ $cur_fs && ( $part != "$ROOT_PART" || $FORMATTED == *"$part"* ) ]]; then
|
||||||
fs="$(menubox "$_FSTitle: $part" "$msg" \
|
fs="$(menubox "$_FSTitle: $part" "$msg" \
|
||||||
"$_Skip" "-" \
|
"$_Skip" "Do not format this partition" \
|
||||||
"ext4" "${FS_CMDS[ext4]}" \
|
"ext4" "${FS_CMDS[ext4]}" \
|
||||||
"ext3" "${FS_CMDS[ext3]}" \
|
"ext3" "${FS_CMDS[ext3]}" \
|
||||||
"ext2" "${FS_CMDS[ext2]}" \
|
"ext2" "${FS_CMDS[ext2]}" \
|
||||||
@ -1261,6 +1251,7 @@ select_filesystem()
|
|||||||
|
|
||||||
[[ $fs == "$_Skip" ]] && break
|
[[ $fs == "$_Skip" ]] && break
|
||||||
else
|
else
|
||||||
|
local msg="\nSelect which filesystem to use for: $part\n\nDefault: ext4"
|
||||||
fs="$(menubox "$_FSTitle: $part" "$msg" \
|
fs="$(menubox "$_FSTitle: $part" "$msg" \
|
||||||
"ext4" "${FS_CMDS[ext4]}" \
|
"ext4" "${FS_CMDS[ext4]}" \
|
||||||
"ext3" "${FS_CMDS[ext3]}" \
|
"ext3" "${FS_CMDS[ext3]}" \
|
||||||
@ -1273,12 +1264,9 @@ select_filesystem()
|
|||||||
"reiserfs" "${FS_CMDS[reiserfs]}")"
|
"reiserfs" "${FS_CMDS[reiserfs]}")"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ $fs ]] || { err=1; break; }
|
[[ $fs ]] || { err=1; break; }
|
||||||
|
|
||||||
yesno "$_FSTitle" "\nFormat $part as $fs?\n" && break
|
yesno "$_FSTitle" "\nFormat $part as $fs?\n" && break
|
||||||
done
|
done
|
||||||
|
|
||||||
(( err == 0 )) || return $err
|
(( err == 0 )) || return $err
|
||||||
[[ $fs == "$_Skip" ]] || format_as "$part" "$fs"
|
[[ $fs == "$_Skip" ]] || format_as "$part" "$fs"
|
||||||
}
|
}
|
||||||
@ -1288,18 +1276,16 @@ select_efi_partition()
|
|||||||
tput civis
|
tput civis
|
||||||
if (( COUNT == 1 )); then
|
if (( COUNT == 1 )); then
|
||||||
BOOT_PART="$(awk 'NF > 0 {print $1}' <<< "$PARTS")"
|
BOOT_PART="$(awk 'NF > 0 {print $1}' <<< "$PARTS")"
|
||||||
infobox "$_PrepMount" "$_OnlyOne for EFI: $BOOT_PART\n" 1
|
elif [[ $AUTO_BOOT_PART ]]; then
|
||||||
elif [[ $BOOT_PART == "$AUTO_BOOT_PART" ]]; then
|
|
||||||
BOOT_PART="$AUTO_BOOT_PART"
|
BOOT_PART="$AUTO_BOOT_PART"
|
||||||
return 0 # were done here
|
return 0 # were done here
|
||||||
else
|
else
|
||||||
BOOT_PART="$(menubox "$_PrepMount" "$_SelUefiBody" $PARTS)"
|
BOOT_PART="$(menubox "$_PrepMount" "$_SelUefiBody" $PARTS)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ $BOOT_PART ]] || return 1
|
[[ $BOOT_PART ]] || return 1
|
||||||
|
|
||||||
if grep -q 'fat' <<< "$(fsck -N "$BOOT_PART")"; then
|
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
|
if yesno "$_PrepMount" "$msg" "Format $BOOT_PART" "Skip Formatting" "no"; then
|
||||||
format_as "$BOOT_PART" "vfat"
|
format_as "$BOOT_PART" "vfat"
|
||||||
sleep 1
|
sleep 1
|
||||||
@ -1315,11 +1301,11 @@ select_efi_partition()
|
|||||||
select_boot_partition()
|
select_boot_partition()
|
||||||
{
|
{
|
||||||
tput civis
|
tput civis
|
||||||
if [[ $AUTO_BOOT_PART && $AUTO_BOOT_PART == "$BOOT_PART" ]]; then
|
if [[ $AUTO_BOOT_PART && ! $LVM ]]; then
|
||||||
BOOT_PART="$AUTO_BOOT_PART"
|
BOOT_PART="$AUTO_BOOT_PART"
|
||||||
return 0 # were done here
|
return 0 # were done here
|
||||||
elif [[ $LUKS && ! $LVM ]]; then
|
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
|
[[ $BOOT_PART ]] || return 1
|
||||||
else
|
else
|
||||||
BOOT_PART="$(menubox "$_PrepMount" "$_SelBiosBody" "$_Skip" "-" $PARTS)"
|
BOOT_PART="$(menubox "$_PrepMount" "$_SelBiosBody" "$_Skip" "-" $PARTS)"
|
||||||
@ -1327,7 +1313,7 @@ select_boot_partition()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if grep -q 'ext[34]' <<< "$(fsck -N "$BOOT_PART")"; then
|
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
|
if yesno "$_PrepMount" "$msg" "Format $BOOT_PART" "Skip Formatting" "no"; then
|
||||||
format_as "$BOOT_PART" "ext4"
|
format_as "$BOOT_PART" "ext4"
|
||||||
sleep 1
|
sleep 1
|
||||||
@ -1344,7 +1330,6 @@ select_root_partition()
|
|||||||
tput civis
|
tput civis
|
||||||
if (( COUNT == 1 )); then
|
if (( COUNT == 1 )); then
|
||||||
ROOT_PART="$(awk 'NF > 0 {print $1}' <<< "$PARTS")"
|
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
|
elif ! ROOT_PART="$(menubox "$_PrepMount" "$_SelRootBody" $PARTS)"; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
@ -1360,7 +1345,6 @@ select_extra_partitions()
|
|||||||
while (( COUNT > 0 )); do
|
while (( COUNT > 0 )); do
|
||||||
tput civis
|
tput civis
|
||||||
part="$(menubox "$_PrepMount " "$_ExtPartBody" "$_Done" "Return to the main menu" $PARTS)"
|
part="$(menubox "$_PrepMount " "$_ExtPartBody" "$_Done" "Return to the main menu" $PARTS)"
|
||||||
|
|
||||||
if [[ $part == "$_Done" || $part == "" ]]; then
|
if [[ $part == "$_Done" || $part == "" ]]; then
|
||||||
break
|
break
|
||||||
elif select_filesystem "$part" && select_mountpoint && mount_partition "$part" "$EXMNT"; then
|
elif select_filesystem "$part" && select_mountpoint && mount_partition "$part" "$EXMNT"; then
|
||||||
@ -1395,7 +1379,7 @@ install()
|
|||||||
login_manager
|
login_manager
|
||||||
printf "Setting ownership of /home/$NEWUSER\n"
|
printf "Setting ownership of /home/$NEWUSER\n"
|
||||||
chrun "chown -Rf $NEWUSER:users /home/$NEWUSER"
|
chrun "chown -Rf $NEWUSER:users /home/$NEWUSER"
|
||||||
sleep 3
|
sleep 1
|
||||||
edit_configs
|
edit_configs
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1677,10 +1661,7 @@ package_operations()
|
|||||||
inpkg+=" linux-hardened"; rmpkg+=" linux"
|
inpkg+=" linux-hardened"; rmpkg+=" linux"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $MYSHELL == '/usr/bin/zsh' ]]; then
|
[[ $MYSHELL == '/usr/bin/zsh' ]] && inpkg+=" zsh-completions zsh-history-substring-search"
|
||||||
inpkg+=" zsh-completions zsh-history-substring-search"
|
|
||||||
fi
|
|
||||||
|
|
||||||
[[ $INSTALL_WMS =~ (openbox|bspwm|i3-gaps|dwm) ]] && inpkg+=" $WM_BASE_PKGS"
|
[[ $INSTALL_WMS =~ (openbox|bspwm|i3-gaps|dwm) ]] && inpkg+=" $WM_BASE_PKGS"
|
||||||
[[ $INSTALL_WMS =~ ^(plasma|gnome|cinnamon)$ ]] || inpkg+=" archlabs-ksuperkey"
|
[[ $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
|
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"
|
chrun "cd /home/$NEWUSER/suckless/$i; rm -f config.h; make clean install; make clean"
|
||||||
else
|
else
|
||||||
printf "Failed to clone $i repo\n"
|
printf "failed to clone $i repo\n"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ -d $MNT/home/$NEWUSER/suckless/dwm && -x $MNT/usr/bin/dwm ]]; then
|
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 "To configure dwm edit /home/$NEWUSER/suckless/dwm/config.h\n"
|
||||||
printf "You can then recompile it with 'sudo make clean install'\n"
|
printf "You can then recompile it with 'sudo make clean install'\n"
|
||||||
sleep 3
|
sleep 2
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1733,12 +1714,10 @@ setup_boot()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
[[ $BOOTLDR ]] || return 1
|
[[ $BOOTLDR ]] || return 1
|
||||||
|
|
||||||
if [[ $BOOT_PART != "" ]]; then
|
if [[ $BOOT_PART != "" ]]; then
|
||||||
mount_partition "$BOOT_PART" "/boot" && SEP_BOOT=true || return 1
|
mount_partition "$BOOT_PART" "/boot" && SEP_BOOT=true || return 1
|
||||||
setup_boot_device
|
setup_boot_device
|
||||||
fi
|
fi
|
||||||
|
|
||||||
setup_${BOOTLDR} || return 1
|
setup_${BOOTLDR} || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1784,19 +1763,15 @@ setup_systemd-boot()
|
|||||||
|
|
||||||
prerun_grub()
|
prerun_grub()
|
||||||
{
|
{
|
||||||
local cfg="$MNT/etc/default/grub"
|
|
||||||
sed -i "s/GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"${DIST}\"/g;
|
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
|
if [[ $LUKS_DEV ]]; then
|
||||||
sed -i "s~#GRUB_ENABLE_CRYPTODISK~GRUB_ENABLE_CRYPTODISK~g;
|
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
|
fi
|
||||||
if [[ $SYS == 'BIOS' && $LVM && $SEP_BOOT == false ]]; then
|
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
|
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/lvm
|
||||||
mkdir -p /run/udev
|
mkdir -p /run/udev
|
||||||
mkdir -p $MNT/hostrun/lvm
|
mkdir -p $MNT/hostrun/lvm
|
||||||
@ -1809,7 +1784,6 @@ prerun_grub()
|
|||||||
|
|
||||||
prerun_systemd-boot()
|
prerun_systemd-boot()
|
||||||
{
|
{
|
||||||
# create the boot entry configs
|
|
||||||
mkdir -p ${MNT}/boot/loader/entries
|
mkdir -p ${MNT}/boot/loader/entries
|
||||||
cat > ${MNT}/boot/loader/loader.conf << EOF
|
cat > ${MNT}/boot/loader/loader.conf << EOF
|
||||||
default $DIST
|
default $DIST
|
||||||
@ -1828,7 +1802,6 @@ linux /vmlinuz-${KERNEL}$([[ $UCODE ]] && printf "\ninitrd %s" "/${UCODE}.img
|
|||||||
initrd /initramfs-$KERNEL-fallback.img
|
initrd /initramfs-$KERNEL-fallback.img
|
||||||
options root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && printf "%s " "$LUKS_DEV")rw
|
options root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && printf "%s " "$LUKS_DEV")rw
|
||||||
EOF
|
EOF
|
||||||
# add pacman hook to update the bootloader when systemd receives an update
|
|
||||||
mkdir -p $MNT/etc/pacman.d/hooks
|
mkdir -p $MNT/etc/pacman.d/hooks
|
||||||
cat > $MNT/etc/pacman.d/hooks/systemd-boot.hook << EOF
|
cat > $MNT/etc/pacman.d/hooks/systemd-boot.hook << EOF
|
||||||
[Trigger]
|
[Trigger]
|
||||||
@ -1841,7 +1814,6 @@ Description = Updating systemd-boot
|
|||||||
When = PostTransaction
|
When = PostTransaction
|
||||||
Exec = /usr/bin/bootctl update
|
Exec = /usr/bin/bootctl update
|
||||||
EOF
|
EOF
|
||||||
# systemd-boot requires this before running bootctl
|
|
||||||
systemd-machine-id-setup --root="$MNT"
|
systemd-machine-id-setup --root="$MNT"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@ -1858,17 +1830,16 @@ MENU BACKGROUND splash.png
|
|||||||
TIMEOUT 50
|
TIMEOUT 50
|
||||||
DEFAULT $DIST
|
DEFAULT $DIST
|
||||||
|
|
||||||
|
# Refer to https://www.syslinux.org/wiki/index.php/Comboot/menu.c32
|
||||||
MENU WIDTH 78
|
MENU WIDTH 78
|
||||||
MENU MARGIN 4
|
MENU MARGIN 4
|
||||||
MENU ROWS 5
|
MENU ROWS 4
|
||||||
MENU VSHIFT 10
|
MENU VSHIFT 10
|
||||||
MENU TIMEOUTROW 13
|
MENU TIMEOUTROW 13
|
||||||
MENU TABMSGROW 14
|
MENU TABMSGROW 14
|
||||||
MENU CMDLINEROW 14
|
MENU CMDLINEROW 14
|
||||||
MENU HELPMSGROW 16
|
MENU HELPMSGROW 16
|
||||||
MENU HELPMSGENDROW 29
|
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 border 30;44 #40ffffff #a0000000 std
|
||||||
MENU COLOR title 1;36;44 #9033ccff #a0000000 std
|
MENU COLOR title 1;36;44 #9033ccff #a0000000 std
|
||||||
MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all
|
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 msg07 37;40 #90ffffff #a0000000 std
|
||||||
MENU COLOR tabmsg 31;40 #30ffffff #00000000 std
|
MENU COLOR tabmsg 31;40 #30ffffff #00000000 std
|
||||||
|
|
||||||
|
|
||||||
LABEL $DIST
|
LABEL $DIST
|
||||||
MENU LABEL $DIST Linux
|
MENU LABEL $DIST Linux
|
||||||
LINUX ../vmlinuz-$KERNEL
|
LINUX ../vmlinuz-$KERNEL
|
||||||
@ -1892,7 +1862,6 @@ LINUX ../vmlinuz-$KERNEL
|
|||||||
APPEND root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && printf "%s " "$LUKS_DEV")rw
|
APPEND root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && printf "%s " "$LUKS_DEV")rw
|
||||||
INITRD $([[ $UCODE ]] && printf "%s" "../${UCODE}.img,")../initramfs-$KERNEL-fallback.img
|
INITRD $([[ $UCODE ]] && printf "%s" "../${UCODE}.img,")../initramfs-$KERNEL-fallback.img
|
||||||
|
|
||||||
|
|
||||||
# some examples for chainloading other bootloaders
|
# some examples for chainloading other bootloaders
|
||||||
|
|
||||||
#LABEL grub2
|
#LABEL grub2
|
||||||
@ -2049,55 +2018,56 @@ get_lv_size()
|
|||||||
|
|
||||||
lvm_volume_name()
|
lvm_volume_name()
|
||||||
{
|
{
|
||||||
local msg="$1"
|
local msg="$1" default="mainvolume" name="" err=0
|
||||||
|
(( VOL_COUNT > 1 )) && default="extravolume$VOL_COUNT"
|
||||||
|
|
||||||
local default="volmain"
|
while true; do
|
||||||
(( VOL_COUNT > 1 )) && default="volextra"
|
tput cnorm
|
||||||
|
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"
|
||||||
|
else
|
||||||
|
VOLUME_NAME="$name"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
tput cnorm
|
return $err
|
||||||
local name
|
|
||||||
if ! name="$(getinput "$_LvmCreateVG (LV:$VOL_COUNT)" "\n$msg" "$default" nolimit)"; then
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${name:0:1} == "/" || ${#name} -eq 0 || $name =~ \ |\' ]] || grep -q "$name" <<< "$(lsblk)"; then
|
|
||||||
msgbox "$_ErrTitle" "$_LvmLvNameErrBody"
|
|
||||||
lvm_volume_name "$msg" || return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
VOLUME_NAME="$name"
|
|
||||||
return 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lvm_group_name()
|
lvm_group_name()
|
||||||
{
|
{
|
||||||
tput cnorm
|
local group="" err=0
|
||||||
local group
|
|
||||||
if ! group="$(getinput "$_LvmCreateVG" "$_LvmNameVgBody" "VolGroup" nolimit)"; then
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${group:0:1} == "/" || ${#group} -eq 0 || $group =~ \ |\' ]] || grep -q "$group" <<< "$(lsblk)"; then
|
while true; do
|
||||||
msgbox "$_ErrTitle" "$_LvmNameVgErr"
|
tput cnorm
|
||||||
lvm_group_name || return 1
|
group="$(getinput "$_LvmCreateVG" "$_LvmNameVgBody" "VolGroup" nolimit)"
|
||||||
fi
|
[[ $group ]] || { err=1; break; }
|
||||||
|
if [[ ${group:0:1} == "/" || ${#group} -eq 0 || $group =~ \ |\' ]] || grep -q "$group" <<< "$(lsblk)"; then
|
||||||
|
msgbox "$_ErrTitle" "$_LvmNameVgErr"
|
||||||
|
else
|
||||||
|
VOLUME_GROUP="$group"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
VOLUME_GROUP="$group"
|
return $err
|
||||||
return 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lvm_extra_lvs()
|
lvm_extra_lvs()
|
||||||
{
|
{
|
||||||
|
local err=0
|
||||||
|
|
||||||
while (( VOL_COUNT > 1 )); do
|
while (( VOL_COUNT > 1 )); do
|
||||||
lvm_volume_name "$_LvmLvNameBody1" || { break; return 1; }
|
lvm_volume_name "$_LvmLvNameBody1" && get_lv_size || { err=1; break; }
|
||||||
get_lv_size || { break; return 1; }
|
|
||||||
lvcreate -L "$VOLUME_SIZE" "$VOLUME_GROUP" -n "$VOLUME_NAME" >/dev/null 2>$ERR
|
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"
|
msgbox "$_LvmCreateVG (LV:$VOL_COUNT)" "\n$_Done Logical Volume (LV) $VOLUME_NAME ($VOLUME_SIZE) $_LvmPvDoneBody2.\n"
|
||||||
(( VOL_COUNT-- ))
|
(( VOL_COUNT-- ))
|
||||||
done
|
done
|
||||||
|
|
||||||
return 0
|
return $err
|
||||||
}
|
}
|
||||||
|
|
||||||
lvm_volumes()
|
lvm_volumes()
|
||||||
@ -2134,7 +2104,7 @@ lvm_mkgroup()
|
|||||||
done
|
done
|
||||||
|
|
||||||
vgcreate -f "$VOLUME_GROUP" "${LVM_PARTS[@]}" >/dev/null 2>$ERR
|
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/ {
|
GROUP_SIZE=$(vgdisplay "$VOLUME_GROUP" | awk '/VG Size/ {
|
||||||
gsub(/[^0-9.]/, "")
|
gsub(/[^0-9.]/, "")
|
||||||
@ -2165,7 +2135,7 @@ lvm_create()
|
|||||||
lvm_extra_lvs || return 1
|
lvm_extra_lvs || return 1
|
||||||
lvm_volume_name "$_LvmLvNameBody1 $_LvmLvNameBody2 (${VGROUP_MB}MB)" || 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
|
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
|
LVM='logical volume'; tput civis; sleep 0.5
|
||||||
local msg="\n$_Done $_LvmPvDoneBody1 $VOLUME_GROUP-$VOLUME_NAME (${VOLUME_SIZE:-${VGROUP_MB}MB}) $_LvmPvDoneBody2.\n"
|
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"
|
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
|
if lvm_show_vg && yesno "$_LvmDelVG" "$_LvmDelQ"; then
|
||||||
vgremove -f "$DEL_VG" >/dev/null 2>&1
|
vgremove -f "$DEL_VG" >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
return 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lvm_del_all()
|
lvm_del_all()
|
||||||
@ -2197,7 +2166,6 @@ lvm_del_all()
|
|||||||
done
|
done
|
||||||
LVM=''
|
LVM=''
|
||||||
fi
|
fi
|
||||||
return 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@ -2215,9 +2183,9 @@ luks_menu()
|
|||||||
"$_Back" "Return to the main menu")"
|
"$_Back" "Return to the main menu")"
|
||||||
|
|
||||||
case $choice in
|
case $choice in
|
||||||
"$_LuksEncrypt") luks_default || return 1 ;;
|
"$_LuksEncrypt") luks_basic || return 1 ;;
|
||||||
"$_LuksOpen") luks_open || return 1 ;;
|
"$_LuksOpen") luks_open || return 1 ;;
|
||||||
"$_LuksEncryptAdv") luks_keycmd || return 1 ;;
|
"$_LuksEncryptAdv") luks_advanced || return 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
@ -2225,7 +2193,6 @@ luks_menu()
|
|||||||
|
|
||||||
luks_open()
|
luks_open()
|
||||||
{
|
{
|
||||||
LUKS_PART=""
|
|
||||||
modprobe -a dm-mod dm_crypt
|
modprobe -a dm-mod dm_crypt
|
||||||
umount_dir $MNT
|
umount_dir $MNT
|
||||||
find_partitions 'part|crypt|lvm' || return 1
|
find_partitions 'part|crypt|lvm' || return 1
|
||||||
@ -2233,18 +2200,16 @@ luks_open()
|
|||||||
|
|
||||||
if (( COUNT == 1 )); then
|
if (( COUNT == 1 )); then
|
||||||
LUKS_PART="$(awk 'NF > 0 {print $1}' <<< "$PARTS")"
|
LUKS_PART="$(awk 'NF > 0 {print $1}' <<< "$PARTS")"
|
||||||
infobox "$_LuksOpen" "${_OnlyOne}: $LUKS_PART\n" 1
|
else
|
||||||
elif ! LUKS_PART="$(menubox "$_LuksOpen" "$_LuksMenuBody" $PARTS)" || ! [[ $LUKS_PART ]]; then
|
LUKS_PART="$(menubox "$_LuksOpen" "$_LuksMenuBody" $PARTS)"
|
||||||
return 1
|
|
||||||
fi
|
fi
|
||||||
|
[[ $LUKS_PART ]] || return 1
|
||||||
|
|
||||||
luks_pass "$_LuksOpen" || return 1
|
luks_pass "$_LuksOpen" || return 1
|
||||||
infobox "$_LuksOpen" "$_LuksOpenWaitBody $LUKS_NAME $_LuksWaitBody2 $LUKS_PART\n" 0
|
infobox "$_LuksOpen" "$_LuksOpenWaitBody $LUKS_NAME $_LuksWaitBody2 $LUKS_PART\n" 0
|
||||||
cryptsetup open --type luks $LUKS_PART "$LUKS_NAME" <<< "$LUKS_PASS" 2>$ERR
|
cryptsetup open --type luks $LUKS_PART "$LUKS_NAME" <<< "$LUKS_PASS" 2>$ERR
|
||||||
errshow "cryptsetup open --type luks $LUKS_PART $LUKS_NAME"
|
errshow "cryptsetup open --type luks $LUKS_PART $LUKS_NAME" || return 1
|
||||||
|
LUKS='encrypted'; luks_show
|
||||||
LUKS='encrypted'
|
|
||||||
luks_show
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2300,7 +2265,6 @@ luks_pass()
|
|||||||
|
|
||||||
luks_setup()
|
luks_setup()
|
||||||
{
|
{
|
||||||
LUKS_PART=""
|
|
||||||
modprobe -a dm-mod dm_crypt
|
modprobe -a dm-mod dm_crypt
|
||||||
umount_dir $MNT
|
umount_dir $MNT
|
||||||
find_partitions 'part|lvm' || return 1
|
find_partitions 'part|lvm' || return 1
|
||||||
@ -2308,42 +2272,38 @@ luks_setup()
|
|||||||
|
|
||||||
if (( COUNT == 1 )); then
|
if (( COUNT == 1 )); then
|
||||||
LUKS_PART="$(awk 'NF > 0 {print $1}' <<< "$PARTS")"
|
LUKS_PART="$(awk 'NF > 0 {print $1}' <<< "$PARTS")"
|
||||||
infobox "$_LuksEncrypt" "${_OnlyOne}: $LUKS_PART\n" 1
|
else
|
||||||
elif ! LUKS_PART="$(menubox "$_LuksEncrypt" "$_LuksEncryptBody" $PARTS)"; then
|
LUKS_PART="$(menubox "$_LuksEncrypt" "$_LuksEncryptBody" $PARTS)"
|
||||||
return 1
|
|
||||||
elif ! luks_pass "$_LuksEncrypt"; then
|
|
||||||
return 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 0
|
[[ $LUKS_PART ]] || return 1
|
||||||
|
luks_pass "$_LuksEncrypt"
|
||||||
}
|
}
|
||||||
|
|
||||||
luks_default()
|
luks_basic()
|
||||||
{
|
{
|
||||||
luks_setup || return 1
|
luks_setup || return 1
|
||||||
infobox "$_LuksEncrypt" "$_LuksCreateWaitBody $LUKS_NAME $_LuksWaitBody2 $LUKS_PART\n" 0
|
infobox "$_LuksEncrypt" "$_LuksCreateWaitBody $LUKS_NAME $_LuksWaitBody2 $LUKS_PART\n" 0
|
||||||
cryptsetup -q luksFormat $LUKS_PART <<< "$LUKS_PASS" 2>$ERR
|
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
|
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='encrypted'
|
LUKS='encrypted'; luks_show
|
||||||
luks_show
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
luks_keycmd()
|
luks_advanced()
|
||||||
{
|
{
|
||||||
if luks_setup; then
|
if luks_setup; then
|
||||||
tput cnorm
|
tput cnorm
|
||||||
local cipher
|
local cipher
|
||||||
if ! cipher="$(getinput "$_PrepLUKS" "$_LuksCipherKey" "-s 512 -c aes-xts-plain64" nolimit)"; then
|
cipher="$(getinput "$_PrepLUKS" "$_LuksCipherKey" "-s 512 -c aes-xts-plain64" nolimit)"
|
||||||
return 1
|
[[ $cipher ]] || return 1
|
||||||
fi
|
|
||||||
infobox "$_LuksEncryptAdv" "$_LuksCreateWaitBody $LUKS_NAME $_LuksWaitBody2 $LUKS_PART\n" 0
|
infobox "$_LuksEncryptAdv" "$_LuksCreateWaitBody $LUKS_NAME $_LuksWaitBody2 $LUKS_PART\n" 0
|
||||||
cryptsetup -q $cipher luksFormat $LUKS_PART <<< "$LUKS_PASS" 2>$ERR
|
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
|
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
|
luks_show
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
@ -2378,7 +2338,7 @@ luks_keyfile()
|
|||||||
|
|
||||||
ofn()
|
ofn()
|
||||||
{
|
{
|
||||||
[[ $USER_PKGS == *$1* ]] && printf "on" || printf "off"
|
[[ $USER_PKGS == *"$1"* ]] && printf "on" || printf "off"
|
||||||
}
|
}
|
||||||
|
|
||||||
chrun()
|
chrun()
|
||||||
@ -2410,16 +2370,15 @@ is_ssd()
|
|||||||
|
|
||||||
die()
|
die()
|
||||||
{
|
{
|
||||||
(( $# >= 1 )) && local exitcode=$1 || local exitcode=0
|
(( $# >= 1 )) && exitcode=$1 || exitcode=0
|
||||||
|
|
||||||
trap - INT
|
trap - INT
|
||||||
tput cnorm
|
tput cnorm
|
||||||
|
|
||||||
if [[ -d $MNT ]] && command cd /; then
|
if [[ -d $MNT ]] && command cd /; then
|
||||||
umount_dir $MNT
|
umount_dir $MNT
|
||||||
if (( exitcode == 127 )); then
|
if (( exitcode == 127 )); then
|
||||||
umount -l /run/archiso/bootmnt
|
umount -l /run/archiso/bootmnt; sleep 0.5; systemctl -i reboot
|
||||||
sleep 0.5
|
|
||||||
systemctl -i reboot
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -2521,7 +2480,7 @@ load_bcm()
|
|||||||
chk_connect()
|
chk_connect()
|
||||||
{
|
{
|
||||||
if [[ $CHECKED_NET == true ]]; then
|
if [[ $CHECKED_NET == true ]]; then
|
||||||
infobox "Network Connect" "\nVerifying connection\n" 1
|
infobox "Network Connect" "\nVerifying network connection\n" 1
|
||||||
else
|
else
|
||||||
infobox "Network Connect" "\nChecking connection to https://www.archlinux.org\n" 1
|
infobox "Network Connect" "\nChecking connection to https://www.archlinux.org\n" 1
|
||||||
CHECKED_NET=true
|
CHECKED_NET=true
|
||||||
@ -2557,7 +2516,7 @@ system_checks()
|
|||||||
die 1
|
die 1
|
||||||
fi
|
fi
|
||||||
grep -q 'BCM4352' <<< "$(lspci -vnn -d 14e4:)" && load_bcm
|
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()
|
prechecks()
|
||||||
@ -2569,15 +2528,15 @@ prechecks()
|
|||||||
elif [[ $1 -ge 2 && $CONFIG_DONE != true ]]; then
|
elif [[ $1 -ge 2 && $CONFIG_DONE != true ]]; then
|
||||||
infobox "$_ErrTitle" "$_ErrNoConfig"; SEL=6; return 1
|
infobox "$_ErrTitle" "$_ErrNoConfig"; SEL=6; return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
errshow()
|
errshow()
|
||||||
{
|
{
|
||||||
local last_exit_code=$?
|
last_exit_code=$?
|
||||||
(( last_exit_code == 0 )) && return 0
|
(( last_exit_code == 0 )) && return 0
|
||||||
local err
|
local err="$(sed 's/[^[:print:]]//g; s/\[[0-9\;:]*\?m//g; s/==> //g; s/] ERROR:/]\nERROR:/g' "$ERR")"
|
||||||
err="$(sed 's/[^[:print:]]//g; s/\[[0-9\;:]*\?m//g; s/==> //g; s/] ERROR:/]\nERROR:/g' "$ERR")"
|
|
||||||
|
|
||||||
if [[ $err ]]; then
|
if [[ $err ]]; then
|
||||||
msgbox "$_ErrTitle" "\nThe command exited abnormally: $1\n\nWith the following message: $err"
|
msgbox "$_ErrTitle" "\nThe command exited abnormally: $1\n\nWith the following message: $err"
|
||||||
@ -2589,6 +2548,8 @@ errshow()
|
|||||||
[[ -e $DBG && $TERM == 'linux' ]] && less $DBG
|
[[ -e $DBG && $TERM == 'linux' ]] && less $DBG
|
||||||
die 1
|
die 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
debug()
|
debug()
|
||||||
|
Reference in New Issue
Block a user