summaryrefslogtreecommitdiffstats
path: root/mltk
diff options
context:
space:
mode:
authorSimon Rettberg2013-02-21 22:24:35 +0100
committerSimon Rettberg2013-02-21 22:24:35 +0100
commit9804c991491e7f2ea9da3b4c9210595a3d336dfd (patch)
treea060a1f8bc2b7bb953b4182181caceb1f928f0c7 /mltk
parentMerge branch 'master' of ssh://openslx/openslx-ng/tm-scripts (diff)
downloadtm-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-xmltk15
1 files changed, 11 insertions, 4 deletions
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