summaryrefslogtreecommitdiffstats
path: root/src/daemon
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2011-01-13 12:52:30 +0100
committerDenys Vlasenko <dvlasenk@redhat.com>2011-01-13 12:52:30 +0100
commitec3b070b67438b8aa14557bac490650ac27306b0 (patch)
tree57e6a2c989b895db95696d829a2c370f512ddf8b /src/daemon
parentc984716d50131991d844166771d05bd07d16117e (diff)
downloadabrt-ec3b070b67438b8aa14557bac490650ac27306b0.tar.gz
abrt-ec3b070b67438b8aa14557bac490650ac27306b0.tar.xz
abrt-ec3b070b67438b8aa14557bac490650ac27306b0.zip
abrt_event.conf parser is updated to handle
"include GLOB_PATTERN" line which expands GLOB_PATTERN and recurses into every matching file. Another small change makes it possible to have one rule to span lines: our current default abrt_event.conf has sosreport invocation which looks very ugly. Sosreport invocation is rewritten in a much more readable multi-line form now. The comment in src/daemon/abrt_event.conf is modified to explain the recognized syntax. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/abrt_event.conf44
1 files changed, 36 insertions, 8 deletions
diff --git a/src/daemon/abrt_event.conf b/src/daemon/abrt_event.conf
index bee79647..8c040c9c 100644
--- a/src/daemon/abrt_event.conf
+++ b/src/daemon/abrt_event.conf
@@ -1,17 +1,31 @@
-# This table specifies which programs should be run
+# This configuration file specifies which programs should be run
# when the specified event occurs in crash dump lifetime.
#
# Example:
# EVENT=post-create { pwd; date; }>/tmp/dt; echo $HOSTNAME `uname -r`
#
-# Each line may have conditions to be checked
-# before the program is run.
+# Rule starts with a line with non-space leading character.
+# All subsequent lines which start with space or tab form one rule.
+# Note that separating newline is *retained*. Example:
+# EVENT=post-create date >/tmp/dt # semicolon is not needed here!
+# echo $HOSTNAME `uname -r`
+#
+# Rules may be commented out with #. One # is sufficient to comment out
+# even a multi-line rule (no need to comment out every line).
+#
+# Rule of the form "include GLOB_PATTERN" recurses to each file which matches
+# GLOB_PATTERN. Example: "include post-create.d/*.conf"
+#
+# Any other rules specify which programs to run on the crash dump.
+#
+# Each rule may have conditions to be checked before the program is run.
#
# Conditions have form VAR=VAL, where VAR is either word "EVENT"
# or a name of crash dump element to be checked (for example,
# "executable", "package", hostname" etc).
#
-# If all conditions match, the program is run in the shell.
+# If all conditions match, the remaining part of the rule
+# (the "program" part) is run in the shell.
# All shell language constructs are valid.
# All stdout and stderr output is captured and passed to abrt
# and possibly to abrt's frontends and shown to the user.
@@ -22,7 +36,7 @@
# the error message indicating the reason of the failure,
# and may be used by abrt as such.
#
-# If the program terminates successfully, next line is read
+# If the program terminates successfully, next rule is read
# and processed. This process is repeated until the end of this file.
# abrt-action-analyze-c needs package name, save package data first
@@ -38,7 +52,19 @@ EVENT=post-create analyzer=Kerneloops abrt-action-analyze-oops
# user interaction, uncomment this line:
#EVENT=post-create analyzer=Kerneloops abrt-action-kerneloops
# Example: if you want to save sosreport immediately at the moment of a crash:
-#EVENT=post-create nice sosreport --tmp-dir "$DUMP_DIR" --batch --only=anaconda --only=bootloader --only=devicemapper --only=filesys --only=hardware --only=kernel --only=libraries --only=memory --only=networking --only=nfsserver --only=pam --only=process --only=rpm -k rpm.rpmva=off --only=ssh --only=startup --only=yum --only=general --only=x11 && { rm sosreport*.md5; mv sosreport*.tar.bz2 sosreport.tar.bz2; mv sosreport*.tar.xz sosreport.tar.xz; true; } 2>/dev/null
+#EVENT=post-create
+ nice sosreport --tmp-dir "$DUMP_DIR" --batch \
+ --only=anaconda --only=bootloader --only=devicemapper \
+ --only=filesys --only=hardware --only=kernel --only=libraries \
+ --only=memory --only=networking --only=nfsserver --only=pam \
+ --only=process --only=rpm -k rpm.rpmva=off --only=ssh \
+ --only=startup --only=yum --only=general --only=x11 \
+ && {
+ rm sosreport*.md5
+ mv sosreport*.tar.bz2 sosreport.tar.bz2
+ mv sosreport*.tar.xz sosreport.tar.xz
+ true
+ } 2>/dev/null
#TODO: implement this (or add this functionality to abrt-action-install-debuginfo):
#EVENT=analyze analyzer=CCpp backtrace= trim-debuginfo-cache /var/cache/abrt-di 4096m
@@ -46,12 +72,14 @@ EVENT=post-create analyzer=Kerneloops abrt-action-analyze-oops
# in the third argument (its format is CACHEDIR[:DEBUGINFODIR...]).
# For example, you can specify a network-mounted shared store
# of all debuginfos this way.
-EVENT=analyze analyzer=CCpp backtrace= abrt-action-install-debuginfo.py "--core=$DUMP_DIR/coredump" "--tmpdir=/var/run/abrt/$$-$RANDOM" --cache=/var/cache/abrt-di
+EVENT=analyze analyzer=CCpp backtrace=
+ abrt-action-install-debuginfo.py --core="$DUMP_DIR/coredump" --tmpdir="/var/run/abrt/$$-$RANDOM" --cache=/var/cache/abrt-di
EVENT=analyze analyzer=CCpp backtrace= abrt-action-generate-backtrace
# Same as "analyze", but executed when user requests "refresh" in GUI
#EVENT=reanalyze analyzer=CCpp trim-debuginfo-cache /var/cache/abrt-di 4096m
-EVENT=reanalyze analyzer=CCpp abrt-action-install-debuginfo.py "--core=$DUMP_DIR/coredump" "--tmpdir=/var/run/abrt/$$-$RANDOM" --cache=/var/cache/abrt-di
+EVENT=reanalyze analyzer=CCpp
+ abrt-action-install-debuginfo.py --core="$DUMP_DIR/coredump" --tmpdir="/var/run/abrt/$$-$RANDOM" --cache=/var/cache/abrt-di
EVENT=reanalyze analyzer=CCpp abrt-action-generate-backtrace
EVENT=report analyzer=Kerneloops abrt-action-kerneloops