Create fallback config for systemd-boot

This commit is contained in:
natemaia 2019-01-12 16:56:00 -08:00
parent b4e5e00147
commit 7efdb466a7
4 changed files with 106 additions and 151 deletions

View File

@ -1,9 +1,9 @@
# ArchLabs Installer
#### Features
- LUKS/LVM
- Basic setup
- Auto partition
- LUKS/LVM setup
- Full device auto partition
- Package selection
- Error detection
- Written in Bash
@ -11,23 +11,23 @@
#### Requirements
- Network connection.
- `coreutils`
- `parted` for partition creation.
- `rsync` for unpacking the squashfs.
- `dialog` for all user input/output.
- `vim` for editing files post install.
- `chpasswd` to set root and user passwords.
- `curl` for network check and mirrorlist download
- `arch-chroot` to perform operations in a chroot.
- `chpasswd` to set root and user passwords.
- `coreutils`
#### Manual Installation
```
sh -c "$(curl -fsSL https://bitbucket.org/archlabslinux/installer/raw/master/install.sh)"
```
- A packaged version can also be found in our repos:
---
A packaged version can also be found in our repos:
[stable](https://bitbucket.org/archlabslinux/archlabs_repo/src/master/x86_64/)
[unstable](https://bitbucket.org/archlabslinux/archlabs_unstable/src/master/x86_64/)

View File

@ -20,12 +20,12 @@ _WelBody="\nThis will unpack and help you setup $DIST on your system.\n\n\nMenu
# Requirements
_NotRoot="\nThis installer must be run as root or using sudo.\n"
_Not64Bit="\nThis installer only supports x86_64 capable hardware or virtual machines.\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"
# Preparation Menu
_PrepTitle="Prepare System for 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 - System settings must be configured\n - A new user must be created and the passwords set.\n\nIf you have already created your partition(s) there is no need to use the edit partition step, simply move on to mounting."
_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 - System settings must be configured\n - A new user must be created and the passwords set.\n\nIf you have already created your partition(s) there is no need to use the edit partition step, simply move on to mounting."
_PrepLayout="Select keyboard layout"
_PrepShowDev="Show device tree (optional)"
_PrepParts="Edit partitions (optional)"
@ -83,9 +83,9 @@ _WMLoginBody="\nSelect which to use as your primary login session.\n\nThis can b
# Set keymap, hwclock, local and timezone
_CMapTitle="Virtual Console Keymap"
_CMapBody="\nSelect virtual console keymap.\n\nVirtual console is the shell prompt before reaching a graphical environment (Xorg).\n\nIts keymap is seperate from the one used by Xorg.\n\nDefault: us"
_CMapBody="\nSelect virtual console keymap, virtual console is the shell before reaching a graphical environment (Xorg).\n\nIts keymap is seperate from the one used by Xorg.\n\nDefault: us"
_XMapBody="\nSelect the system wide keymap, this is the keyboard layout used once a graphical environment (Xorg) is running.\n\nIf a matching virtual console keymap exists it will be used, otherwise you will be asked to pick one.\n\nDefault: us"
_LocaleBody="\nLocale determines the system language and currency formats.\n\nThe format for locale name structure 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"
# Configure
_ConfLocale="System Language and Locale"
@ -107,7 +107,7 @@ _MntSucc="\nMount Succeeded!\n"
_MntFail="\nMount Failed!\n"
_WarnMount="\nIMPORTANT: Please choose carefully during mounting and formatting.\n\nDuring mounting, partitions can be mounted without formatting by selecting '$_Skip'.\nThis can be useful for data partitions or previously formatted partitions.\n\nThe one exception to this is the root (/) partition, it must be formatted before unpacking to ensure the system stability.\n"
_MntBody="\nUse [Space] to de/select the desired mount options.\n\nIf the device is an SSD the 'discard' option provides active TRIM support and will be automatically selected.\n\nChoosing none will result in an automatic mount with system applied options."
_MntConfBody="\nConfirm the following mount options:"
_MntConfBody="\nConfirm mount options:"
# Select Device
_DevSelTitle="Select Device"
@ -150,7 +150,7 @@ _SelBiosBody="\nDo you want to use a separate boot partition? (required for LUKS
_SelSwpFile="Swapfile"
_SelSwpSetup="Swap Setup"
_SelSwpBody="\nSelect whether to use a swap partition, swapfile, or none.\n\nWhen selecting swapfile the size will be filled in to the size of your system memory, however this can be changed to suit your needs."
_SelSwpBody="\nSelect whether to use a swap partition, swapfile, or none."
_SelSwpNone="None"
_SelSwpErr="Swap Setup Error: Must be 1(M|G) or greater, and can only contain whole numbers\n\nSize Entered:"
@ -158,8 +158,9 @@ _SelSwpSize="\nEnter the size to use for swap in MB or GB.\n\nFor ease of use an
_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="IMPORTANT:\n\nThe EFI partition"
_FormBiosBody="IMPORTANT:\n\nThe boot 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."

View File

@ -8,7 +8,7 @@
# Some ideas and code has been taken from other installers
# AIF, Cnichi, Calamares, The Arch Wiki.. Credit where credit is due
VER="1.8.16" # version
VER="1.8.21" # version
DIST="ArchLabs" # distributor
MNT="/mnt" # mountpoint
@ -135,7 +135,7 @@ cfg_menu()
tput civis
if ! LOCALE="$(dialog --cr-wrap --no-cancel --stdout --backtitle "$BT" \
--title " $_ConfLocale " --menu "$_LocaleBody" 0 0 $((LINES - 10)) $LOCALES)"; then
--title " $_ConfLocale " --menu "$_LocaleBody" 0 0 $((LINES - 20)) $LOCALES)"; then
return 1
fi
@ -202,7 +202,7 @@ select_keymap()
{
tput civis
if ! KEYMAP="$(dialog --cr-wrap --no-cancel --stdout --backtitle "$BT" \
--title " $_PrepLayout " --menu "$_XMapBody" 0 0 $((LINES - 10)) \
--title " $_PrepLayout " --menu "$_XMapBody" 0 0 $((LINES - 20)) \
'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' \
@ -230,7 +230,8 @@ select_keymap()
if [[ $CMAPS == *"$KEYMAP"* ]]; then
CMAP="$KEYMAP"
else
if ! CMAP="$(menubox "$_CMapTitle" "$_CMapBody" $CMAPS)"; then
if ! CMAP="$(dialog --cr-wrap --no-cancel --stdout --backtitle "$BT" \
--title " $_CMapTitle " --menu "$_CMapBody" 0 0 $((LINES - 17)) $CMAPS)"; then
return 1
fi
fi
@ -260,7 +261,7 @@ select_timezone()
fi
if ! SUBZONE="$(dialog --cr-wrap --no-cancel --stdout --backtitle "$BT" \
--title " $_TimeZTitle " --menu "$_TimeSubZBody" 0 0 $((LINES - 10)) ${SUBZONES[$ZONE]})"; then
--title " $_TimeZTitle " --menu "$_TimeSubZBody" 0 0 $((LINES - 17)) ${SUBZONES[$ZONE]})"; then
return 1
fi
@ -630,7 +631,8 @@ partition()
"gparted -" \
"cfdisk" "-" \
"parted" "-" \
"$_PartWipe" "-")"; then
"$_PartWipe" "-" \
"$_Done" "-")"; then
return 1
fi
else
@ -639,13 +641,16 @@ partition()
"$_PartAuto" "-" \
"cfdisk" "-" \
"parted" "-" \
"$_PartWipe" "-")"; then
"$_PartWipe" "-" \
"$_Done" "-")"; then
return 1
fi
fi
tput civis
if [[ $choice != "$_PartWipe" && $choice != "$_PartAuto" && $choice != "$_PartShowTree" ]]; then
if [[ $choice == "$_Done" || $choice == "" ]]; then
return 0
elif [[ $choice != "$_PartWipe" && $choice != "$_PartAuto" && $choice != "$_PartShowTree" ]]; then
clear; tput cnorm; $choice $device
elif [[ $choice == "$_PartShowTree" ]]; then
msgbox "$_PrepShowDev" "\n$(lsblk -o NAME,MODEL,TYPE,FSTYPE,SIZE,MOUNTPOINT "$device")\n"
@ -868,10 +873,10 @@ mount_partition()
mkdir -p "$mountp"
if [[ $fs && ${FS_OPTS[$fs]} && $part != "$BOOT_PART" ]] && select_mount_opts "$part" "$fs"; then
mount -o $MNT_OPTS $part "$mountp" 2>$ERR
mount -o $MNT_OPTS "$part" "$mountp" 2>$ERR
errshow "mount -o $MNT_OPTS $part $mountp"
else
mount $part "$mountp" 2>$ERR
mount "$part" "$mountp" 2>$ERR
errshow "mount $part $mountp"
fi
@ -1113,7 +1118,7 @@ select_boot_partition()
BOOT_PART=""
else
if grep -q 'ext[34]' <<< "$(fsck -N "$BOOT_PART")"; then
local msg="$_FormBiosBody $BOOT_PART $_FormUefiBody2"
local msg="$_FormBiosBody $BOOT_PART $_FormBiosBody2"
if [[ $AUTO_BOOT_PART != "$BOOT_PART" ]] && yesno "$_PrepMount" "$msg" "Format $BOOT_PART" "Skip Formatting" "no"; then
format "$BOOT_PART" "ext4"
sleep 1
@ -1173,7 +1178,7 @@ install()
clear
tput cnorm
install_base
printf "\nGenerating system /etc/fstab\n\n"
printf "Generating system /etc/fstab\n"
genfstab -U $MNT >$MNT/etc/fstab 2>$ERR
echeck "genfstab -U $MNT >$MNT/etc/fstab"
[[ -f $MNT/swapfile ]] && sed -i "s~${MNT}~~" $MNT/etc/fstab
@ -1195,20 +1200,21 @@ install_base()
echeck "rsync -ahv /run/archiso/sfs/airootfs/ $MNT/"
else
mirrorlist_sort
pacstrap $MNT base $KERNEL $UCODE $(grep -hv '^#' /usr/share/archlabs/installer/packages.txt)
pacstrap $MNT base $KERNEL $UCODE $(grep -hv '^#' /usr/share/archlabs/installer/packages.txt) 2>$ERR
echeck "pacstrap $MNT base $KERNEL $UCODE $(grep -hv '^#' /usr/share/archlabs/installer/packages.txt)"
fi
printf "\nRemoving archiso remains\n\n"
printf "Removing archiso remains\n"
rm -rf $MNT/etc/mkinitcpio-archiso.conf
find $MNT/usr/lib/initcpio -name 'archiso*' -type f -exec rm -rf '{}' \;
sed -i 's/volatile/auto/g' $MNT/etc/systemd/journald.conf
if [[ $VM ]]; then
printf "\nRemoving xorg configs in /etc/X11/xorg.conf.d/ to avoid conflict in VMs\n\n"
printf "Removing xorg configs in /etc/X11/xorg.conf.d/ to avoid conflict in VMs\n"
rm -rfv $MNT/etc/X11/xorg.conf.d/*?.conf
sleep 1
elif [[ $(lspci | grep ' VGA ' | grep 'Intel') != "" ]]; then
printf "\nCreating intel GPU 'TearFree' config in /etc/X11/xorg.conf.d/20-intel.conf\n\n"
printf "Creating intel GPU 'TearFree' config in /etc/X11/xorg.conf.d/20-intel.conf\n"
cat > $MNT/etc/X11/xorg.conf.d/20-intel.conf <<EOF
Section "Device"
Identifier "Intel Graphics"
@ -1219,18 +1225,18 @@ EOF
fi
if [[ -e /run/archiso/sfs/airootfs ]]; then
printf "\nCopying vmlinuz and ucode to /boot\n\n"
printf "Copying vmlinuz and ucode to /boot\n"
[[ $KERNEL != 'linux-lts' ]] && cp -vf $RUN/x86_64/vmlinuz $MNT/boot/vmlinuz-linux
[[ $UCODE && ! $VM ]] && cp -vf $RUN/${UCODE/-/_}.img $MNT/boot/${UCODE}.img
fi
printf "\nCopying network settings to /etc\n\n"
printf "Copying network settings to /etc\n"
cp -fv /etc/resolv.conf $MNT/etc/
if [[ -e /etc/NetworkManager/system-connections ]]; then
cp -rvf /etc/NetworkManager/system-connections $MNT/etc/NetworkManager/
fi
printf "\nSetting locale to $LOCALE\n\n"
printf "Setting locale to $LOCALE\n"
cat > $MNT/etc/locale.conf << EOF
LANG=$LOCALE
EOF
@ -1238,17 +1244,17 @@ EOF
LANG=$LOCALE
EOF
sed -i "s/#en_US.UTF-8/en_US.UTF-8/g; s/#${LOCALE}/${LOCALE}/g" $MNT/etc/locale.gen
chrun "echo && locale-gen" 2>/dev/null
printf "\nSetting timezone: $ZONE/$SUBZONE\n\n"
chrun "locale-gen" 2>/dev/null
printf "Setting timezone: $ZONE/$SUBZONE\n"
chrun "ln -svf /usr/share/zoneinfo/$ZONE/$SUBZONE /etc/localtime" 2>/dev/null
if [[ $BROADCOM_WL == true ]]; then
printf "\nBlacklisting modules for broadcom wireless: bmca\n\n"
printf "Blacklisting modules for broadcom wireless: bmca\n"
echo 'blacklist bcma' >> $MNT/etc/modprobe.d/blacklist.conf
rm -f $MNT/etc/modprobe/
fi
printf "\nCreating keyboard configurations for keymap: $KEYMAP\n\n"
printf "Creating keyboard configurations for keymap: $KEYMAP\n"
cat > $MNT/etc/X11/xorg.conf.d/00-keyboard.conf <<EOF
# Use localectl(1) to instruct systemd-localed to update it.
Section "InputClass"
@ -1270,7 +1276,7 @@ EOF
KEYMAP=$CMAP
FONT=$FONT
EOF
printf "\nSetting system hostname: $HOSTNAME\n\n"
printf "Setting system hostname: $HOSTNAME\n"
cat > $MNT/etc/hostname << EOF
$HOSTNAME
EOF
@ -1286,11 +1292,10 @@ EOF
create_user()
{
printf "\nCreating user $NEWUSER, setting passwords, and setting shell\n\n"
printf "Creating user $NEWUSER, setting passwords, and setting shell\n"
# set root password, shell if needed
chrun "chpasswd <<< 'root:$ROOT_PASS'"
cp -rf /etc/skel/. $MNT/root/
if [[ $MYSHELL != *zsh ]]; then
chrun "usermod -s $MYSHELL root"
if [[ $MYSHELL == "/usr/bin/mksh" ]]; then
@ -1312,8 +1317,10 @@ create_user()
cp -rfv $MNT/home/$NEWUSER/.vim/colors $MNT/home/$NEWUSER/.config/nvim/colors
fi
[[ $INSTALL_WMS =~ dwm ]] && suckless_install
[[ $INSTALL_WMS == 'plasma' || $LOGIN_WM == 'startkde' || $INSTALL_WMS == 'gnome' || $LOGIN_WM == 'gnome-session' ]] &&
if [[ $INSTALL_WMS == 'plasma' || $LOGIN_WM == 'startkde' || $INSTALL_WMS == 'gnome' || $LOGIN_WM == 'gnome-session' ]]
then
sed -i '/super/d' $HOME/.xprofile /root/.xprofile
fi
return 0
}
@ -1323,7 +1330,7 @@ setup_xinit()
if [[ -e $MNT/home/$NEWUSER/.xinitrc ]]; then
sed -i "s/openbox-session/${LOGIN_WM}/g" $MNT/home/$NEWUSER/.xinitrc
else
printf "%s\n" "exec $LOGIN_WM" > $MNT/home/$NEWUSER/.xinitrc
printf "exec $LOGIN_WM\n" > $MNT/home/$NEWUSER/.xinitrc
fi
# automatic startx for login shells
@ -1402,7 +1409,7 @@ EOF
login_manager()
{
printf "\nSetting up $LOGIN_TYPE\n\n"
printf "Setting up $LOGIN_TYPE\n"
SERVICE="$MNT/etc/systemd/system/getty@tty1.service.d"
# remove welcome message
@ -1435,13 +1442,13 @@ run_mkinitcpio()
[[ $LUKS ]] && add="encrypt"
[[ $LVM ]] && { [[ $add ]] && add+=" lvm2" || add+="lvm2"; }
sed -i "s/block filesystems/block ${add} filesystems ${HOOKS}/g" $MNT/etc/mkinitcpio.conf
chrun "mkinitcpio -p $KERNEL" 2>$ERR || chrun "mkinitcpio -p $KERNEL" 2>$ERR
chrun "mkinitcpio -p $KERNEL" 2>$ERR
echeck "mkinitcpio -p $KERNEL"
}
mirrorlist_sort()
{
printf "\n%s\n\n" "Sorting the mirrorlist"
printf "Sorting the mirrorlist\n"
if hash reflector >/dev/null 2>&1; then
$MIRROR_CMD --save $MNT/etc/pacman.d/mirrorlist --verbose ||
reflector --score 100 -l 50 -f 10 --sort rate --verbose --save $MNT/etc/pacman.d/mirrorlist
@ -1465,22 +1472,22 @@ package_operations()
# update first to avoid database access errors
chrun "pacman -Syyu --noconfirm"
if ! [[ $INSTALL_WMS == 'plasma' || $INSTALL_WMS == 'gnome' || $INSTALL_WMS == 'cinnamon' ]]; then
chrun "pacman -S archlabs-ksuperkey --noconfirm --needed"
if [[ $BOOTLDR == 'grub' ]]; then
chrun "pacman -Rns $rmpkg grub --noconfirm"
else
chrun "pacman -Rns $rmpkg --noconfirm"
fi
if [[ $BOOTLDR != 'grub' ]]; then
chrun "pacman -Rns grub --noconfirm"
fi
chrun "pacman -Rns $rmpkg --noconfirm"
chrun "pacman -S iputils --noconfirm"
chrun "pacman -S $inpkg archlabs-common archlabs-dARK archlabs-icons archlabs-scripts archlabs-skel-base archlabs-wallpapers gtk-engine-murrine gtk3 pavucontrol tumbler base base-devel sudo git udisks2 mesa xorg-server xorg-apps xorg-drivers playerctl ffmpeg gstreamer libmad libmatroska gst-libav gst-plugins-base gst-plugins-good --needed --noconfirm"
if [[ $LOGIN_TYPE == 'xinit' ]]; then
chrun "pacman -S xorg-xinit --needed --noconfirm"
fi
chrun "pacman -S $inpkg archlabs-common archlabs-dARK archlabs-icons archlabs-scripts archlabs-skel-base archlabs-wallpapers gtk-engine-murrine gtk3 pavucontrol tumbler xorg-xinit base base-devel sudo git udisks2 mesa xorg-server xorg-apps xorg-drivers playerctl ffmpeg gstreamer libmad libmatroska gst-libav gst-plugins-base gst-plugins-good --needed --noconfirm"
if [[ $inpkg =~ (openbox|dwm|bspwm|i3) ]]; then
chrun "pacman -S arandr archlabs-networkmanager-dmenu xdg-user-dirs nitrogen polkit-gnome volumeicon xclip xdotool compton gnome-keyring dunst feh gsimplecal xfce4-power-manager xfce4-settings laptop-detect --needed --noconfirm"
fi
if ! [[ $INSTALL_WMS == 'plasma' || $INSTALL_WMS == 'gnome' || $INSTALL_WMS == 'cinnamon' ]]; then
chrun "pacman -S archlabs-ksuperkey --noconfirm --needed"
fi
sed -i "s/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/g" $MNT/etc/sudoers
return 0
}
@ -1488,7 +1495,7 @@ package_operations()
suckless_install()
{
# install and setup dwm
printf "\n%s\n\n" "Installing and setting up dwm."
printf "Installing and setting up dwm\n"
mkdir -pv $MNT/home/$NEWUSER/suckless
for i in dwm dmenu st; do
@ -1498,13 +1505,12 @@ suckless_install()
if (( e == 0 )); then
chrun "cd $p; rm -f config.h; make clean install; make clean"
else
printf "\n\nFailed to clone $i repo\n\n"
printf "Failed to clone $i repo\n"
fi
done
if [[ -d /home/$NEWUSER/suckless/dwm ]]; then
printf "\n\n%s" "To configure dwm edit /home/$NEWUSER/suckless/dwm/config.h"
printf "\n%s\n\n" "You can then recompile it with 'sudo make clean install'"
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 2
fi
}
@ -1607,6 +1613,12 @@ title $DIST Linux
linux /vmlinuz-${KERNEL}$([[ $UCODE ]] && printf "\ninitrd %s" "/${UCODE}.img")
initrd /initramfs-$KERNEL.img
options root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && printf "%s " "$LUKS_DEV")rw
EOF
cat > ${MNT}${BMNTS[$SYS-systemd-boot]}/loader/entries/${DIST}-fallback.conf << EOF
title $DIST Linux Fallback
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
@ -1679,8 +1691,8 @@ install_bootloader()
fi
prerun_$BOOTLDR
printf "\nInstalling and setting up $BOOTLDR in ${BMNTS[$SYS-$BOOTLDR]}\n\n"
chrun "${BCMDS[$BOOTLDR]}"
printf "Installing and setting up $BOOTLDR in ${BMNTS[$SYS-$BOOTLDR]}\n"
chrun "${BCMDS[$BOOTLDR]}" 2>$ERR
echeck "${BCMDS[$BOOTLDR]}"
if [[ -d $MNT/hostrun ]]; then
@ -2018,10 +2030,7 @@ luks_open()
return 1
fi
if ! luks_pass "$_LuksOpen" "${LUKS_NAME:-cryptroot}"; then
return 1
fi
luks_pass "$_LuksOpen" "${LUKS_NAME:-cryptroot}" || 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"
@ -2169,7 +2178,7 @@ src()
{
# source file ($1), if it fails we die with an error message
if ! . "$1" 2>/dev/null; then
printf "\nFailed to source file %s\n" "$1"
printf "Failed to source file %s\n" "$1"
die 1
fi
return 0
@ -2219,7 +2228,7 @@ die()
sigint()
{
# used to trap SIGINT and cleanly exit the program
printf "\nCTRL-C caught\nCleaning up...\n"
printf "CTRL-C caught\nCleaning up...\n"
die 1
}
@ -2227,29 +2236,21 @@ print4()
{
# takes an arbitrary number of input fields and prints them out in fourths on separate lines
local str="$*"
if [[ ${#str} -gt $((COLUMNS / 2)) ]]; then
str="$(awk -v q="$(awk '{print int(NF / 4)}' <<< "$str")" '{
pkgs1=pkgs2=pkgs3=pkgs4=""
for (i=1; i<q; i++) {
if (i == 1) {
pkgs1=$i
} else {
pkgs1=pkgs1" "$i
}
}
for (i=q; i<q * 2; i++) {
pkgs2=pkgs2" "$i
}
for (i=q * 2; i<q * 3; i++) {
pkgs3=pkgs3" "$i
}
for (i=q * 3; i<NF; i++) {
pkgs4=pkgs4" "$i
}
printf "%s\n %s\n %s\n %s", pkgs1, pkgs2, pkgs3, pkgs4
if [[ ${#str} -gt $((COLUMNS - 5)) ]]; then
str="$(awk '{
p1=p2=p3=p4=""
p1=$1
q=int(NF / 4)
for (i=2; i<=q; i++) { p1=p1" "$i }
for (i=q; i<=q*2; i++) { p2=p2" "$i }
for (i=q*2; i<=q*3; i++) { p3=p3" "$i }
for (i=q*3; i<=NF; i++) { p4=p4" "$i }
printf "%s\n\t%s\n\t%s\n\t%s", p1, p2, p3, p4
}' <<< "$str")"
printf "%s\n" "$str"
elif [[ $str ]]; then
printf "%s\n" "$str"
fi
printf "%s\n" "$str"
}
system_devices()
@ -2389,7 +2390,7 @@ echeck()
err="$(sed 's/[^[:print:]]//g; s/\[[0-9\;:]*\?m//g; s/==> //g; s/] ERROR:/]\nERROR:/g' "$ERR")"
if [[ $err ]]; then
msgbox "$_ErrTitle" "\nERROR: $err"
msgbox "$_ErrTitle" "\nThe command exited abnormally: $1\n\nWith the following message: $err"
else
msgbox "$_ErrTitle" "\nThe command exited abnormally: $1\n\nWith the no error message.\n"
fi
@ -2484,7 +2485,8 @@ select_language()
{
tput civis
local lang
lang=$(menubox "Select Language" "\nLanguage - sprache - taal - språk - lingua - idioma - nyelv - língua\n" \
lang=$(menubox "Select Language" \
"\nLanguage - sprache - taal - språk - lingua - idioma - nyelv - língua\n" \
"1" "English (en_**)" \
"2" "Español (es_ES)" \
"3" "Português [Brasil] (pt_BR)" \
@ -2597,8 +2599,8 @@ CMAPS="$(find /usr/share/kbd/keymaps -name '*.map.gz' | awk '{
}' | sort)"
# make sure these are defined for some dialog size calculation
: "${LINES=$(tput lines)}"
: "${COLUMNS=$(tput cols)}"
[[ $LINES ]] || LINES=$(tput lines)
[[ $COLUMNS ]] || COLUMNS=$(tput cols)
# various associative arrays
# {
@ -2641,7 +2643,7 @@ declare -A WM_EXT=(
[gnome]=""
[plasma]="kdebase-meta"
[bspwm]="sxhkd archlabs-skel-bspwm rofi archlabs-polybar"
[xfce4]="xfce4-goodies xfce4-pulseaudio-plugin archlabs-skel-xfce4"
[xfce4]="xfce4-goodies xfce4-pulseaudio-plugin network-manager-applet volumeicon rofi archlabs-skel-xfce4 xdg-user-dirs"
[i3-gaps]="i3status perl-anyevent-i3 archlabs-skel-i3-gaps rofi archlabs-polybar"
[openbox]="obconf archlabs-skel-openbox jgmenu archlabs-polybar tint2 conky rofi"
)

View File

@ -1,4 +1,3 @@
# base
arch-install-scripts
b43-firmware
b43-fwcutter
@ -6,17 +5,16 @@ broadcom-wl
clonezilla
dhclient
dhcpcd
efibootmgr
ethtool
exfat-utils
f2fs-tools
fakeroot
gptfdisk
grub
vim
hdparm
ipw2100-fw
ipw2200-fw
laptop-detect
nfs-utils
nilfs-utils
ntfs-3g
@ -26,82 +24,36 @@ refind-efi
rsync
sdparm
smartmontools
sudo
wget
wireless_tools
wpa_actiond
xl2tpd
# xorg
mesa
xorg-apps
xorg-drivers
xorg-server
xorg-xinit
# install
dialog
parted
os-prober
# codecs
wipe
alsa-firmware
alsa-lib
alsa-plugins
ffmpeg
gst-libav
gst-plugins-base
gst-plugins-good
gstreamer
libmad
libmatroska
pulseaudio
pulseaudio-alsa
# xfce
xfce4-settings
xfce4-power-manager
gtk-engine-murrine
# network
networkmanager
wireless-regdb
wpa_supplicant
# filesystem
gvfs
gvfs-afc
gvfs-mtp
gvfs-nfs
tumbler
# utilities
gnome-keyring
lm_sensors
lsb-release
numlockx
p7zip
pamixer
playerctl
polkit-gnome
reflector
scrot
unrar
volumeicon
wmctrl
xclip
xdotool
# applications
arandr
compton
dunst
feh
gsimplecal
htop
nitrogen
pavucontrol
ranger
w3m
# fonts
terminus-font
ttf-dejavu
archlabs-common
archlabs-keyring
archlabs-scripts
archlabs-installer