From: Alex Hornung Date: Fri, 10 Sep 2010 09:49:59 +0000 (+0100) Subject: savecore - Allow automatic text summary generation X-Git-Url: https://gitweb.dragonflybsd.org/~lentferj/dragonfly.git/commitdiff_plain/7fb3111b80f6688f9982e31c93c42ef5a7f4dce4 savecore - Allow automatic text summary generation * Add two rc variables to automatically generate the text summary for a core dump every time savecore does its job. Obtained-From: FreeBSD --- diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index e4fcaad9c3..79b2dcdf69 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -397,6 +397,8 @@ devd_flags="" # Flags to devd(8) (if enabled). dumpdev="NO" # Device name to crashdump to (or NO). dumpdir="/var/crash" # Directory where crash dumps are to be stored savecore_flags="" # Used if dumpdev is enabled above, and present. +crashinfo_enable="YES" # Automatically generate crash dump summary. +crashinfo_program="/usr/sbin/crashinfo" # Script to generate crash dump summary. enable_quotas="NO" # turn on quotas on startup (or NO). check_quotas="YES" # Check quotas on startup (or NO). accounting_enable="NO" # Turn on process accounting (or NO). diff --git a/etc/rc.d/savecore b/etc/rc.d/savecore index f55aff1623..1696cd8c1d 100644 --- a/etc/rc.d/savecore +++ b/etc/rc.d/savecore @@ -59,6 +59,9 @@ savecore_start() if [ X$dumpdev != X ]; then echo "Checking for core dump..." savecore ${savecore_flags} ${DUMPDIR} ${dumpdev} + if checkyesno crashinfo_enable; then + ${crashinfo_program} -d ${DUMPDIR} + fi return ${RC_CONFIGURED} fi } diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index 43d32198f9..23efc7bf65 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -2317,6 +2317,22 @@ is set. If crash dumps are enabled, these are the flags to pass to the .Xr savecore 8 utility. +.It Va crashinfo_enable +.Pq Vt bool +Set to +.Dq Li YES +to turn on automatic crash dump summary generation using the utility +specified by the +.Va crashinfo_program +variable. +.It Va crashinfo_program +.Pq Vt str +Program to run to generate a crash dump summary if the variable +.Va crashinfo_enable +is set to +.Dq Li YES . +The default value is +.Pa /usr/sbin/crashinfo . .It Va enable_quotas .Pq Vt bool Set to