Commit 7f6bd8e0 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Add result file support in helper

Helper always outputs the result to the second serial port (ttyS1).
parent 2f221381
......@@ -27,8 +27,7 @@
# those of the authors and should not be interpreted as representing official
# policies, either expressed or implied, of GRNET S.A.
OUTPUT=/dev/ttyS0
RESULT=/dev/ttyS2
RESULT=/dev/ttyS1
FLOPPY_DEV=/dev/fd0
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
......@@ -40,7 +39,7 @@ RESIZE2FS=resize2fs
CLEANUP=( )
log_error() {
echo "$@" >&2
echo "ERROR: $@" | tee $RESULT >&2
exit 1
}
......@@ -119,7 +118,4 @@ cleanup() {
trap cleanup EXIT
# Redirect stdout and stderr
exec &> $OUTPUT
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :
......@@ -70,6 +70,8 @@ fi
echo "Execute all snf-image tasks...."
$RUN_PARTS -v --exit-on-error "/usr/lib/snf-image/tasks"
echo "SUCCESS" > $RESULT
cleanup
trap - EXIT
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment