Subversion Repositories configs

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
192 - 1
# This configuration file specifies which programs should be run
2
# when the specified event occurs in problem directory lifetime.
3
#
4
# It consists of directives and rules.
5
#
6
# Directives start with a reserved word. Currently, there is only one
7
# directive, "include". Its format is "include FILE".
8
# It causes files which match FILE to be read and
9
# parsed as if they are inserted textually where this directive
10
# occurs. FILE can use shell pattern metacharacters (*,?,etc) to
11
# specify multiple files. Relative paths are interpreted relative
12
# to current file.
13
#
14
# Rule starts with a line with non-space leading character.
15
# All subsequent lines which start with space or tab form one rule.
16
#
17
# EVENT=post-create
18
#
19
#         cp /etc/example.conf .
20
#         uptime > uptime
21
#         echo $HOSTNAME `uname -r`
22
#
23
# This example event will copy `/etc/example.conf` to newly created
24
# problem directory, store current uptime in `uptime` file
25
# and prints current hostname and uname to logs.
26
#
27
# Rules may be commented out with #. One # is sufficient to comment out
28
# even a multi-line rule (no need to comment out every line).
29
#
30
# Rules specify which programs to run on the problem directory.
31
# Each rule may have conditions to be checked before the program is run.
32
#
33
# Conditions have form VAR[!]=VAL or VAL~=REGEX, where VAR is either
34
# word "EVENT" or a name of problem directory element to be checked
35
# (for example, "executable", "package", hostname" etc).
36
#
37
# If all conditions match, the remaining part of the rule
38
# (the "program" part) is run in the shell.
39
# All shell language constructs are valid.
40
# All stdout and stderr output is captured and passed to abrt
41
# and possibly to abrt's frontends and shown to the user.
42
#
43
# If the program terminates with nonzero exit code,
44
# the event processing is considered unsuccessful and is stopped.
45
# Last captured output line, if any, is considered to be
46
# the error message indicating the reason of the failure,
47
# and may be used by abrt as such.
48
#
49
# If the program terminates successfully, next rule is read
50
# and processed. This process is repeated until the end of this file.
51
 
52
 
53
# Determine in which package/component the crash happened (if not yet done):
54
EVENT=post-create container_cmdline= remote!=1 component=
55
        abrt-action-save-package-data
56
 
57
# Store information about the container:
58
EVENT=post-create container_cmdline!= remote!=1
59
      /usr/libexec/abrt-action-save-container-data || :
60
 
61
 
62
# Example: if you want all users (not just root) to be able to see some problems:
63
#EVENT=post-create
64
        rm uid; chmod a+rX .
65
 
66
EVENT=post-create remote!=1
67
        # uid file is missing for problems visible to all users
68
        # (oops scanner is often set up to not create it).
69
        # Record username only if uid element is present:
70
        if [ -f uid ]; then getent passwd "`cat uid`" | cut -d: -f1 >username; fi
71
        # Save cpuinfo because crashes in some components are
72
        # related to HW acceleration. The file must be captured for all crashes
73
        # because of the library vs. executable problem.
74
        if command -v lscpu >/dev/null 2>&1; then
75
            # use lscpu if installed
76
            lscpu > $DUMP_DIR/cpuinfo
77
        else
78
            cp /proc/cpuinfo $DUMP_DIR/cpuinfo
79
        fi
80
 
81
# Record runlevel (if not yet done) and don't return non-0 if it fails:
82
EVENT=post-create runlevel= remote!=1
83
        runlevel >runlevel 2>&1
84
        exit 0
85
 
86
# A dummy EVENT=post-create for uploaded problems.
87
# abrtd would delete uploaded problems without this EVENT.
88
EVENT=post-create remote=1
89
        echo "Processing uploaded problem : $DUMP_DIR"
90
 
91
# Example:
92
# if you want to upload data immediately at the moment of a crash to
93
# a remote directory:
94
# (this example shows how to upload the crash data on
95
#  a ABRT centralized crash collection client; man abrt-upload-watch)
96
#
97
# CAUTION:
98
#   The event 'notify' is used because it will ensure that the uploaded problem
99
#   data will contain results of all post-create events.
100
#
101
#   The event 'notify' might not get executed if any of the post-create events
102
#   decide that the problem should be ignored by ABRT (e.g. unpackaged program,
103
#   unsigned package, ...).
104
#
105
#   For duplicate problems, abrtd executes the event 'notify-dup'. If you want
106
#   to upload also duplicate occurrences of a single problem, copy the lines
107
#   below and change "EVENT=notify" to "EVENT=notify-dup".
108
#
109
#EVENT=notify
110
        reporter-upload -u scp://user:password@server.name/var/spool/abrt-upload/ || :
111
 
112
# Example:
113
# if you want to upload data immediately at the moment of a crash to
114
# a remote file
115
#
116
# CAUTION:
117
#   The event 'notify' is used because it will ensure that the uploaded problem
118
#   data will contain results for all post-create events.
119
#
120
#   The event 'notify' might not get executed if any of the post-create events
121
#   decide that the problem should be ignored by ABRT (e.g. unpackaged program,
122
#   unsigned package, ...).
123
#
124
#   For duplicate problems, abrtd executes the event 'notify-dup'. If you want
125
#   to upload also duplicate occurrences of a single problem, copy the lines
126
#   below and change "EVENT=notify" to "EVENT=notify-dup".
127
#
128
#EVENT=notify
129
        reporter-upload -u scp://user:password@server.name/tmp/crash.tar.gz || :
130
 
131
 
132
#open-gui event is used by abrt-gui's "Edit"->"Open problem data"
133
 
134
EVENT=open-gui
135
        report-gtk -x -- "$DUMP_DIR"
136
 
137
# Notify a new crash
138
EVENT=notify
139
        abrt-action-notify -d $DUMP_DIR
140
        true # ignore failures because we want to run all 'notify' events
141
 
142
# Notify a new occurrence of a single crash
143
EVENT=notify-dup
144
        abrt-action-notify -d $DUMP_DIR
145
        true # ignore failures because we want to run all 'notify' events