Fix: trying to remove things that don't exist

This commit is contained in:
natemaia 2020-05-17 15:25:37 -07:00
parent 118789e63c
commit cf4531b09f

View File

@ -297,7 +297,7 @@ declare -A PKG_EXT=(
# Basics (somewhat in order) # Basics (somewhat in order)
_keymap="\nSelect which keymap to use from the list below.\n\nThis will determine the installed system keymap, NOT locale which is chosen later.\n\nSystem default: us" _keymap="\nSelect which keymap to use from the list below.\n\nThis will determine the installed system keymap, NOT locale which is chosen later.\n\nSystem default: us"
_vconsole="\nSelect the console keymap, the console is the tty shell you reach before starting a graphical environment (Xorg).\n\nIts keymap is separate from the one used by the graphical environments, though many do use the same such as 'us' English.\n\nSystem default: us" _vconsole="\nSelect the console keymap, the console is the tty shell you reach before starting a graphical environment (Xorg).\n\nIts keymap is separate from the one used by the graphical environments, though many do use the same such as 'us' English.\n\nSystem default: us"
_prep="\nThis is the installer main menu, once a step is complete you will return here.\n\nOn successful completion of a step the cursor will advance to the next step\nOn failure the cursor will be placed on the step required to advance (when possible).\n\nSteps beginning with an asterisk (*) are required.\n\nOnce mounting is complete a background process will install the base system while you continue.\nOnce all required steps are complete, selecting the last step will finalize the install." _prep="\nThis is the installer main menu, once a step is complete you will return here.\n\nOn successful completion of a step the cursor will advance to the next step.\nOn failure the cursor will be placed on the step required to advance (when possible).\n\nSteps beginning with an asterisk (*) are required.\n\nOnce all required steps are complete, selecting the last step will finalize the install."
_device="\nSelect a device to use from the list below.\n\nDevices (/dev) are the available drives on the system. /sda, /sdb, /sdc ..." _device="\nSelect a device to use from the list below.\n\nDevices (/dev) are the available drives on the system. /sda, /sdb, /sdc ..."
_mount="\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." _mount="\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."
_warn="\nIMPORTANT: Choose carefully when editing, formatting, and mounting partitions or your DATA MAY BE LOST.\n\nTo mount a partition without formatting it, select 'skip' when prompted to choose a file system during the mounting stage.\nThis can only be used for partitions that already contain a file system and cannot be the root (/) partition, it needs to be formatted before install.\n" _warn="\nIMPORTANT: Choose carefully when editing, formatting, and mounting partitions or your DATA MAY BE LOST.\n\nTo mount a partition without formatting it, select 'skip' when prompted to choose a file system during the mounting stage.\nThis can only be used for partitions that already contain a file system and cannot be the root (/) partition, it needs to be formatted before install.\n"
@ -310,7 +310,7 @@ _format="is already formatted correctly.\n\nFor a clean install, existing partit
_swapsize="\nEnter the size of the swapfile in megabytes (M) or gigabytes (G).\n\ne.g. 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." _swapsize="\nEnter the size of the swapfile in megabytes (M) or gigabytes (G).\n\ne.g. 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."
_expart="\nYou can now choose any additional partitions you want mounted, you'll be asked for a mountpoint after.\n\nSelect 'done' to finish the mounting step and begin unpacking the base system in the background." _expart="\nYou can now choose any additional partitions you want mounted, you'll be asked for a mountpoint after.\n\nSelect 'done' to finish the mounting step and begin unpacking the base system in the background."
_exmnt="\nWhere do you want the partition mounted?\n\nEnsure the name begins with a slash (/).\nExamples include: /usr, /home, /var, etc." _exmnt="\nWhere do you want the partition mounted?\n\nEnsure the name begins with a slash (/).\nExamples include: /usr, /home, /var, etc."
_bginstall="\nThe background install will now start, select which base install method to use\n\nPacstrap - guarantees the latest packages and avoids issues but is slower and network dependant\nCopy ISO - is faster and not network dependant but can result in installation issues\n" _bginstall="\nThe background base install will now start, select which base to use\n\nPacstrap - downloads all packages, avoids issues but can be slower depending on your network.\n\nCopy ISO - faster and not network dependant but can result in installation issues when using an older ISO.\n"
_user="\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 [Up], [Down], or [Tab] to switch between fields, and [Enter] to accept." _user="\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 [Up], [Down], or [Tab] to switch between fields, and [Enter] to accept."
_hostname="\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 beginning or end." _hostname="\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 beginning or end."
_locale="\nLocale determines the system language and currency formats.\n\nThe format for locale names is languagecode_COUNTRYCODE\n\ne.g. en_US is: English United States\n en_GB is: English Great Britain" _locale="\nLocale determines the system language and currency formats.\n\nThe format for locale names is languagecode_COUNTRYCODE\n\ne.g. en_US is: English United States\n en_GB is: English Great Britain"
@ -1325,6 +1325,7 @@ select_boot()
local fs local fs
fs="$(fsck -N "$BOOT")" fs="$(fsck -N "$BOOT")"
BOOTFS="$fs"
if ([[ $SYS == 'BIOS' ]] && grep -q 'ext[34]' <<< "$fs") || ([[ $SYS == 'UEFI' ]] && grep -q 'fat' <<< "$fs"); then if ([[ $SYS == 'BIOS' ]] && grep -q 'ext[34]' <<< "$fs") || ([[ $SYS == 'UEFI' ]] && grep -q 'fat' <<< "$fs"); then
yesno "Format Boot Partition" "\nIMPORTANT: $BOOT $_format" "Format" "Do Not Format" 1 || return 0 yesno "Format Boot Partition" "\nIMPORTANT: $BOOT $_format" "Format" "Do Not Format" 1 || return 0
fi fi
@ -1885,12 +1886,13 @@ install_packages()
if [[ $BTRFS_MNT ]] || grep -qi 'btrfs' <<< "$blk"; then if [[ $BTRFS_MNT ]] || grep -qi 'btrfs' <<< "$blk"; then
inpkg+=('btrfs-progs') inpkg+=('btrfs-progs')
fi fi
else
[[ $NEWSHELL == 'zsh' ]] || rmpkg+=('zsh')
if pacman -Qq archlabs-installer >/dev/null 2>&1; then if pacman -Qq archlabs-installer >/dev/null 2>&1; then
rmpkg+=('archlabs-installer') rmpkg+=('archlabs-installer')
else else
rm -fv "$MNT/usr/bin/installer" rm -fv "$MNT/usr/bin/installer"
fi fi
[[ $NEWSHELL == 'zsh' ]] || rmpkg+=('zsh')
fi fi
[[ $INSTALL_WMS =~ dwm ]] && inpkg+=('git') [[ $INSTALL_WMS =~ dwm ]] && inpkg+=('git')
@ -2072,7 +2074,7 @@ install_background()
[[ ! -d /etc/NetworkManager/system-connections ]] && net="netctl" [[ ! -d /etc/NetworkManager/system-connections ]] && net="netctl"
[[ $LUKS ]] && luks="cryptsetup" [[ $LUKS ]] && luks="cryptsetup"
local txt="\nUse an automatically generated mirrorlist?\n\nNo will require selecting which countries to use" local txt="\nAutomatic mirror selection using reflector is preferred and should yield fast mirrors, however\nyou may want to select which countries mirrors to use for faster sorting and more control\n\nUse automatic mirrors?\n"
if hash reflector > /dev/null 2>&1 && yesno "Mirrorlist" "$txt"; then if hash reflector > /dev/null 2>&1 && yesno "Mirrorlist" "$txt"; then
AUTO_MIR=true AUTO_MIR=true
else else
@ -2486,7 +2488,7 @@ btrfs_subvols()
msg "Mount Complete" "\nMounted $part subvol=$mvol at $mntp\n" 1 msg "Mount Complete" "\nMounted $part subvol=$mvol at $mntp\n" 1
btrfs_extsubvols "$mntp" "$mvol" || return 1 btrfs_extsubvols "$mntp" "$mvol" || return 1
msg "Btrfs Setup Complete" "\nCreated subvolumes:\n\n$(ls -R "$mntp/$mvol")" msg "Btrfs Setup" "\nSubvolume(s) created successfully.\n\nSubvolume root '$mvol' mounted at $mntp\n$([[ $SUBVOL_COUNT -gt 0 ]] && ls -R "$mntp")"
} }
btrfs_extsubvols() btrfs_extsubvols()
@ -3145,8 +3147,14 @@ errshow()
local fatal=$1 local fatal=$1
shift 1 # always shift off the fatal level arg shift 1 # always shift off the fatal level arg
if [[ $1 == *chrun* ]]; then
local cmd="arch-chroot $MNT bash -c ${1##chrun }"
else
local cmd="$1"
fi
local txt local txt
txt="\nCommand: $1\n\n$(errmsg)\n\n" txt="\nCommand: $cmd\n\n$(errmsg)\n\n"
tput cnorm tput cnorm
if (( fatal )); then if (( fatal )); then
dialog --backtitle "$DIST Installer - $SYS - v$VER" --title " Install Error " --yes-label "Abort" --no-label "Continue" \ dialog --backtitle "$DIST Installer - $SYS - v$VER" --title " Install Error " --yes-label "Abort" --no-label "Continue" \