mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Add a dumpdir variable that determines where savecore stores crash dumps.
I've had this on my development box for ages...
This commit is contained in:
parent
8688bb9383
commit
4f18601a76
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=84730
|
@ -338,6 +338,7 @@ sendmail_flags="-bd -q30m" # Flags to sendmail (as a server)
|
|||
sendmail_outbound_enable="YES" # Dequeue stuck mail (YES/NO).
|
||||
sendmail_outbound_flags="-q30m" # Flags to sendmail (outbound only)
|
||||
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.
|
||||
enable_quotas="NO" # turn on quotas on startup (or NO).
|
||||
check_quotas="YES" # Check quotas on startup (or NO).
|
||||
|
|
7
etc/rc
7
etc/rc
|
@ -490,10 +490,13 @@ case ${dumpdev} in
|
|||
[Nn][Oo] | '')
|
||||
;;
|
||||
*)
|
||||
if [ -e "${dumpdev}" -a -d /var/crash ]; then
|
||||
if [ -z "${dumpdir}" ]; then
|
||||
dumpdir="/var/crash"
|
||||
fi
|
||||
if [ -e "${dumpdev}" -a -d "${dumpdir}" ]; then
|
||||
/sbin/dumpon -v ${dumpdev}
|
||||
echo -n 'Checking for core dump: '
|
||||
/sbin/savecore ${savecore_flags} /var/crash
|
||||
/sbin/savecore ${savecore_flags} "${dumpdir}"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue