summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikola Pajkovsky <npajkovs@redhat.com>2011-06-15 12:16:23 +0200
committerNikola Pajkovsky <npajkovs@redhat.com>2011-06-15 12:16:23 +0200
commitb4e0ff6fadd6bfcb2915a544747d0b09d53dbada (patch)
tree855fdfb40fa628bbd2a3f90a9a858b4cdd39199a
parentc7197324b1e9e33260a1d9fd7e26528d9d562abc (diff)
parentbee2deb7f01362b5a2521ba7968adff090fa3f2c (diff)
downloadabrt-b4e0ff6fadd6bfcb2915a544747d0b09d53dbada.zip
abrt-b4e0ff6fadd6bfcb2915a544747d0b09d53dbada.tar.gz
abrt-b4e0ff6fadd6bfcb2915a544747d0b09d53dbada.tar.xz
Merge branch 'daemon/dump-location'
* daemon/dump-location: [abrt] dump locatation needs to know where configure puts config file from abrt [abrt] rename abrt-install-ccpp-hook to abrt-install-ccpp-hook.in [abrt] rhbz671354 - [RFE] Configurable core dump location
-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 a0c88d8..dd99656 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 f2cde32..7c42f47 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 cb0dbbb..0946d7c 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 95cd363..962e326 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 12a443f..9c7df75 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