summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2008-08-29 20:30:30 +0000
committerjhb <jhb@FreeBSD.org>2008-08-29 20:30:30 +0000
commitff9581861d753816438c5400850ca305d42886cd (patch)
tree2a49876cb2311f2b4a6da100f89c986788ac0c89
parent7d24618f3dee91af413827ae725bf004108a07b0 (diff)
downloadFreeBSD-src-ff9581861d753816438c5400850ca305d42886cd.zip
FreeBSD-src-ff9581861d753816438c5400850ca305d42886cd.tar.gz
Add the ability to run /usr/sbin/crashinfo on a new core dump automatically
during boot. Right now this is disabled by default, but it can be enabled by setting 'crashinfo_enable=YES' in rc.conf. MFC after: 2 weeks
-rw-r--r--etc/defaults/rc.conf2
-rwxr-xr-xetc/rc.d/savecore3
2 files changed, 5 insertions, 0 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index 4b99048..ec5ec07 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -539,6 +539,8 @@ chkprintcap_flags="-d" # Create missing directories by default.
dumpdev="AUTO" # Device to crashdump to (device name, AUTO, 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="NO" # Automatically generate crash dump summary.
+crashinfo_program="/usr/sbin/crashinfo" # Script to generate crash dump summary.
quota_enable="NO" # turn on quotas on startup (or NO).
check_quotas="YES" # Check quotas on startup (or NO).
quotaon_flags="-a" # Turn quotas on for all file systems (if enabled)
diff --git a/etc/rc.d/savecore b/etc/rc.d/savecore
index 8bfe020..ff8e128 100755
--- a/etc/rc.d/savecore
+++ b/etc/rc.d/savecore
@@ -65,6 +65,9 @@ savecore_start()
if savecore -C "${dumpdir}" "${dev}" >/dev/null; then
savecore ${savecore_flags} ${dumpdir} ${dumpdev}
+ if checkyesno crashinfo_enable; then
+ ${crashinfo_program} -d ${dumpdir}
+ fi
else
[ -z "${rc_quiet}" ] && echo "No core dumps found"
fi
OpenPOWER on IntegriCloud