diff options
author | Simon Rettberg | 2013-02-21 22:24:35 +0100 |
---|---|---|
committer | Simon Rettberg | 2013-02-21 22:24:35 +0100 |
commit | 9804c991491e7f2ea9da3b4c9210595a3d336dfd (patch) | |
tree | a060a1f8bc2b7bb953b4182181caceb1f928f0c7 /mltk | |
parent | Merge branch 'master' of ssh://openslx/openslx-ng/tm-scripts (diff) | |
download | tm-scripts-9804c991491e7f2ea9da3b4c9210595a3d336dfd.tar.gz tm-scripts-9804c991491e7f2ea9da3b4c9210595a3d336dfd.tar.xz tm-scripts-9804c991491e7f2ea9da3b4c9210595a3d336dfd.zip |
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)
Diffstat (limited to 'mltk')
-rwxr-xr-x | mltk | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -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 |