From e1de078009d65ae23e31f86cf6affca499f6b879 Mon Sep 17 00:00:00 2001 From: Michel Jouvin Date: Mon, 31 Oct 2016 19:49:29 +0100 Subject: [PATCH] aii-ks: fix logging of pre and post script actions for EL7 - Fixes #120 --- aii-ks/src/main/perl/ks.pm | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/aii-ks/src/main/perl/ks.pm b/aii-ks/src/main/perl/ks.pm index a855d631..5f46b7f1 100755 --- a/aii-ks/src/main/perl/ks.pm +++ b/aii-ks/src/main/perl/ks.pm @@ -647,7 +647,7 @@ sub log_action { my @logactions; my $drainsleep = 0; - push(@logactions, "exec >$logfile 2>&1"); + push(@logactions, "2>&1"); # when changing any of the behaviour my $consolelogging = 1; # default behaviour @@ -692,13 +692,12 @@ sub log_action { } if ($consolelogging) { - push(@logactions, '# Make sure messages show up on the serial console', - "tail -f $logfile > /dev/console &"); + push(@logactions, "tee $logfile", "tee /dev/pts/0"); } - push(@logactions,"drainsleep=$drainsleep"); # add trailing newline - push(@logactions,''); # add trailing newline - return join("\n", @logactions) +# push(@logactions,"drainsleep=$drainsleep"); # add trailing newline +# push(@logactions,''); # add trailing newline + return join(" | ", @logactions) } # Takes care of the pre-install script, in which the @@ -712,6 +711,7 @@ sub pre_install_script print <getElement(END_SCRIPT_FIELD)->getValue(); print <