diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-09 17:32:20 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-09 17:32:20 +0100 |
commit | de7c6d7d956e7ccbbde584a90ba6e55fb2728287 (patch) | |
tree | 2dad9447705cfc684717abfbaab732c5eb6a822f /src/core/libs | |
parent | 250b4df902d678b9e479a9bcaa73082c03c51782 (diff) |
implementation of LOG_TO_FILE 1/0, dont send log/debug to tty1. in some cases use exit instead of stop_installer + 2 small fixes
Diffstat (limited to 'src/core/libs')
-rw-r--r-- | src/core/libs/lib-ui.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/libs/lib-ui.sh b/src/core/libs/lib-ui.sh index f056583..6275540 100644 --- a/src/core/libs/lib-ui.sh +++ b/src/core/libs/lib-ui.sh @@ -14,7 +14,7 @@ DIA_MENU_TEXT="Use the UP and DOWN arrows to navigate menus. Use TAB to switch # display error message and die die_error () { - [ -n "$LOGFILE" ] && debug "die_error: ERROR: $@" > $LOGFILE + debug "die_error: ERROR: $@" notify "ERROR: $@" exit 2 } @@ -38,7 +38,7 @@ show_warning () else echo "WARNING: $1" [ "${type}" = msg ] && echo -e "$2" - [ "${type}" = text ] && cat $2 || die_error "Could not cat $2" + [ "${type}" = text ] && (cat $2 || die_error "Could not cat $2") fi return 0 @@ -79,10 +79,10 @@ log () then echo -e "$str" >$LOG else - echo -e "$str" + echo -e "$str" >$LOG fi - echo -e "$str" >> $LOGFILE + [ "$LOG_TO_FILE" = 1 ] && echo -e "$str" >> $LOGFILE } @@ -95,9 +95,9 @@ debug () then echo -e "$str" > $LOG else - echo -e "$str" + echo -e "$str" > $LOG fi - echo -e "$str" >> $LOGFILE + [ "$LOG_TO_FILE" = 1 ] && echo -e "$str" >> $LOGFILE fi } |