diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/daemon/abrt.conf | 2 | ||||
-rw-r--r-- | src/hooks/Makefile.am | 2 | ||||
-rwxr-xr-x | src/hooks/abrt-install-ccpp-hook.in (renamed from src/hooks/abrt-install-ccpp-hook) | 14 |
3 files changed, 15 insertions, 3 deletions
diff --git a/src/daemon/abrt.conf b/src/daemon/abrt.conf index cb0dbbbe..0946d7cd 100644 --- a/src/daemon/abrt.conf +++ b/src/daemon/abrt.conf @@ -27,3 +27,5 @@ BlackListedPaths = /usr/share/doc/*,*/example* # Max size for crash storage [MiB] or 0 for unlimited # MaxCrashReportsSize = 1000 + +DumpLocation = /var/spool/abrt diff --git a/src/hooks/Makefile.am b/src/hooks/Makefile.am index 95cd3634..962e3265 100644 --- a/src/hooks/Makefile.am +++ b/src/hooks/Makefile.am @@ -27,7 +27,7 @@ abrt_hook_ccpp_LDADD = \ $(LIBREPORT_LIBS) python_PYTHON = abrt.pth abrt_exception_handler.py -EXTRA_DIST = abrt_exception_handler.py.in abrt-install-ccpp-hook $(man_MANS) +EXTRA_DIST = abrt_exception_handler.py.in abrt-install-ccpp-hook.in $(man_MANS) CLEANFILES := $(notdir $(wildcard *~)) $(notdir $(wildcard *\#)) $(notdir $(wildcard \.\#*)) $(notdir $(wildcard *.pyc)) diff --git a/src/hooks/abrt-install-ccpp-hook b/src/hooks/abrt-install-ccpp-hook.in index 12a443f0..9c7df750 100755 --- a/src/hooks/abrt-install-ccpp-hook +++ b/src/hooks/abrt-install-ccpp-hook.in @@ -6,14 +6,24 @@ dry_run=false verbose=false +DEFAULT_LOCATION=/var/spool/abrt + +DUMP_LOCATION=`cat @sysconfdir@/abrt/abrt.conf | grep '^[ ]*DumpLocation'` +DUMP_LOCATION=${DUMP_LOCATION#*DumpLocation*=} +DUMP_LOCATION=${DUMP_LOCATION// /} + +if [ "$DUMP_LOCATION" = "" ]; then + DUMP_LOCATION=$DEFAULT_LOCATION +fi + PATTERN_FILE="/proc/sys/kernel/core_pattern" SAVED_PATTERN_DIR="/var/run/abrt" SAVED_PATTERN_FILE="/var/run/abrt/saved_core_pattern" HOOK_BIN="/usr/libexec/abrt-hook-ccpp" # Must match percent_specifiers[] order in abrt-hook-ccpp.c: -PATTERN="|$HOOK_BIN /var/spool/abrt %s %c %p %u %g %t %e" +PATTERN="|$HOOK_BIN $DUMP_LOCATION %s %c %p %u %g %t %e" # Same, but with bogus "executable name" parameter -PATTERN1="|$HOOK_BIN /var/spool/abrt %s %c %p %u %g %t e" +PATTERN1="|$HOOK_BIN $DUMP_LOCATION %s %c %p %u %g %t e" # core_pipe_limit specifies how many dump_helpers can run at the same time # 0 - means unlimited, but it's not guaranteed that /proc/<pid> of crashing |