From 9804c991491e7f2ea9da3b4c9210595a3d336dfd Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 21 Feb 2013 22:24:35 +0100 Subject: 1. New logging/output system - use functions provided by helper/logging.inc 2. Update modules to use new logging system - already updated policykit and systemd as an example 3. Stop all processing if a critical error occurs (use perror to notify user) 4. Some minor tweaks and fixes to setup_tools (added more error checking, but still incomplete) --- mltk | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'mltk') diff --git a/mltk b/mltk index ed05a819..85675e93 100755 --- a/mltk +++ b/mltk @@ -18,9 +18,17 @@ SELF=$(readlink -f $0) ROOT_DIR=$(dirname ${SELF}) +MLTK_PID="$$" -. ${ROOT_DIR}/helper/functions.common.sh +qnd_exit() { + unset_quiet + kill "$MLTK_PID" + [ $# -ge 1 ] && kill "$1" +} + +. "${ROOT_DIR}/helper/logging.inc" . "${ROOT_DIR}/helper/useradd.inc" +. "${ROOT_DIR}/helper/downloader.inc" banner () { echo -e "\033[38;5;202m\t __ __ __ " @@ -115,12 +123,14 @@ read_params() { } run() { + [ "x$DEBUG" != "x1" ] && set_quiet if [ $TARGET_TOOLS ]; then . ${SETUP_TOOLS} [ $CLEAN ] && clean_tools $TOOLS [ $BUILD ] && generate_stage32 $TOOLS fi if [ $TARGET_CORE ]; then + unset_quiet # TODO: Make build_core logging.inc aware . ${BUILD_CORE} [ $CLEAN ] && clean_core [ $BUILD ] && generate_stage31 @@ -130,7 +140,4 @@ run() { initial_checks read_params $@ -#exec 6>&1 > stdout.log -#exec 2> stderr.log - run -- cgit v1.2.3-55-g7522