commit c3fb9d983fbbcc7f19908c384cd29656e0620ec3
Author: Andrew Beekhof <andrew@beekhof.net>
Date: Wed Sep 4 12:54:37 2013 +1000
Feature: crm_report: Record the output of the collector
(cherry picked from commit 494a01897f07327ec475a86957b8fc7fd3ad362c)
diff --git a/tools/report.common.in b/tools/report.common.in
index c4023a8..9742f1c 100644
--- a/tools/report.common.in
+++ b/tools/report.common.in
@@ -72,15 +72,29 @@ glibc
#
# keep the user posted
#
+record() {
+ if [ x != x"$REPORT_HOME" -a -d "${REPORT_HOME}/$shorthost" ]; then
+ rec="${REPORT_HOME}/$shorthost/report.out"
+
+ elif [ x != x"${l_base}" ]; then
+ rec="${l_base}/report.summary"
+
+ else
+ rec="/dev/null"
+ fi
+ printf "%-10s $*\n" "$shorthost:" 2>&1 >> "${rec}"
+}
log() {
printf "%-10s $*\n" "$shorthost:" 1>&2
+ record "$*"
}
debug() {
if [ $verbose -gt 0 ]; then
log "Debug: $*"
fi
+ record "Debug: $*"
}
info() {