move error msgs to functions

- otherwise we see ugly errors also check_base/check_mount
This commit is contained in:
Bernhard Landauer 2017-03-15 00:20:47 +01:00
parent fb43a9e339
commit 8f13fbde78
2 changed files with 5 additions and 5 deletions

View File

@ -283,7 +283,7 @@ install_base() {
check_for_error "packages to install: $(cat /mnt/.base | tr '\n' ' ')"
clear
basestrap ${MOUNTPOINT} $(cat /mnt/.base) 2>$ERR
check_for_error "install basepkgs" $? || return 1
check_for_error "install basepkgs" $? || DIALOG " $_InstBseTitle " --msgbox "\n$_InstFail\n " 0 0
# If root is on btrfs volume, amend mkinitcpio.conf
[[ $(lsblk -lno FSTYPE,MOUNTPOINT | awk '/ \/mnt$/ {print $1}') == btrfs ]] && sed -e '/^HOOKS=/s/\ fsck//g' -i ${MOUNTPOINT}/etc/mkinitcpio.conf && \
@ -329,9 +329,9 @@ install_bootloader() {
check_base
if [[ $? -eq 0 ]]; then
if [[ $SYSTEM == "BIOS" ]]; then
bios_bootloader
bios_bootloader || DIALOG " $_InstBseTitle " --msgbox "\n$_InstFail\n " 0 0
else
uefi_bootloader
uefi_bootloader || DIALOG " $_InstBseTitle " --msgbox "\n$_InstFail\n " 0 0
fi
else
HIGHLIGHT_SUB=2

View File

@ -111,13 +111,13 @@ install_base_menu() {
check_for_error 'refresh pacman-keys'
)
;;
"3") install_base || DIALOG " $_InstBseTitle " --msgbox "\n$_InstFail\n " 0 0
"3") install_base
;;
"4") check_base && {
install_manjaro_de_wm_pkg || DIALOG " $_InstBseTitle " --msgbox "\n$_InstFail\n " 0 0
}
;;
"5") install_bootloader || DIALOG " $_InstBseTitle " --msgbox "\n$_InstFail\n " 0 0
"5") install_bootloader
;;
*) loopmenu=0
return 0