From a7bd9ba054db277e95a55f6ee7914d50a6f33a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=C3=A4tzold?= Date: Mon, 16 Mar 2026 12:16:04 +0100 Subject: [PATCH] elog_add_command directly to screen --- system_setup/setup_system.inc.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/system_setup/setup_system.inc.sh b/system_setup/setup_system.inc.sh index a730739..d761bb3 100644 --- a/system_setup/setup_system.inc.sh +++ b/system_setup/setup_system.inc.sh @@ -41,15 +41,15 @@ elog_add() { echo $@ | tee ${LOGFILE} -a } elog_add_command() { - #Run a command, capture output (STD and ERR) to the logfile AND in variable RETTXT AND output to screen + #Run a command, capture output (STD and ERR) to the logfile AND output to screen + # WILL NOT SET RETTXT to make Output directly to screen #Returns the exit value of the command in $? and in RETNO - RETTXT=$( $@ > >(tee -a ${LOGFILE}) 2>&1 ) + $@ | tee -a ${LOGFILE} RETNO=$? - echo "${RETTXT}" return ${RETNO} } elog_add_command_subshell() { - # Special Version of above, where the command will be completely executed in a subshell. This is needed for some commands, that may output to + # Special Version of above, where the command will be completely executed in a subshell and then passed to Variable RETTXT. This is needed for some commands, that may output to # something else than STD or ERR and otherwise cannot be captured completely. # Benefit: Really catch everything that is send to output # Disadvantage: Output wont't display directly, but only after finshed execution