summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--configure.ac1
-rw-r--r--src/daemon/abrt.conf2
-rw-r--r--src/hooks/Makefile.am2
-rwxr-xr-xsrc/hooks/abrt-install-ccpp-hook.in (renamed from src/hooks/abrt-install-ccpp-hook)14
5 files changed, 17 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index a0c88d8f..dd996566 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,6 +36,7 @@ src/cli/abrt-cli
src/hooks/abrt_exception_handler.py
src/hooks/abrt-hook-ccpp
+src/hooks/abrt-install-ccpp-hook
src/applet/abrt-applet.desktop
src/gui-gtk/abrt.desktop
diff --git a/configure.ac b/configure.ac
index f2cde328..7c42f474 100644
--- a/configure.ac
+++ b/configure.ac
@@ -140,6 +140,7 @@ AC_CONFIG_FILES([
src/Makefile
src/daemon/Makefile
src/hooks/Makefile
+ src/hooks/abrt-install-ccpp-hook
src/applet/Makefile
src/gui-gtk/Makefile
src/cli/Makefile
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