return errcode for up to menu

This commit is contained in:
papajoker 2017-03-02 02:47:02 +01:00
parent b9481d9681
commit 4cd00c2e7a
2 changed files with 6 additions and 4 deletions

View File

@ -253,7 +253,7 @@ install_acc_menu() {
# If something has been selected, install
if [[ $(cat ${PACKAGES}) != "" ]]; then
basestrap ${MOUNTPOINT} ${PACKAGES} 2>$ERR
check_for_error "$FUNCNAME" $?
check_for_error "$FUNCNAME" $? || return $?
fi
}
@ -329,7 +329,7 @@ edit_configs() {
if [[ $FILE == "${MOUNTPOINT}/etc/mkinitcpio.conf" ]]; then
dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --yesno "${_MMRunMkinit}?" 0 0 && {
run_mkinitcpio 2>$ERR
check_for_error "run_mkinitcpio" "$?" edit_configs
check_for_error "run_mkinitcpio" $?
}
fi
else

View File

@ -166,10 +166,12 @@ check_for_error() {
echo -e "$(date +%D\ %T) ERROR ${_msg} ${_fpath}" >> "${LOGFILE}"
if [[ "${_function_menu}" != "SKIP" ]]; then
DIALOG " $_ErrTitle " --msgbox "\n${_msg}\n" 0 0
# ($_function_menu)
# return error for return to parent menu
return $_err
fi
else
echo -e "$(date +%D\ %T) ${_msg}" >> "${LOGFILE}"
# add $FUNCNAME limit to 20 max for control if recursive
echo -e "$(date +%D\ %T) ${_msg} --${FUNCNAME[*]:1:20}" >> "${LOGFILE}"
fi
}