3 # $NetBSD: savecore,v 1.5 2002/03/22 04:34:00 thorpej Exp $
4 # $FreeBSD: src/etc/rc.d/savecore,v 1.3 2002/09/06 16:18:05 gordon Exp $
5 # $DragonFly: src/etc/rc.d/savecore,v 1.6 2005/11/19 21:47:32 swildner Exp $
15 start_cmd
="savecore_start"
16 start_precmd
="savecore_prestart"
27 # ${DUMPDIR} should be a directory or a symbolic link
28 # to the crash directory if core dumps are to be saved.
30 DUMPDIR
="${dumpdir:-/var/crash}"
32 # Quit if we have no dumb device
35 debug
'No dump device. Quitting.'
40 # If there is no crash directory set it now
49 if [ ! -e "${dumpdev}" -o ! -d "${dumpdir}" ]; then
50 warn
"Wrong dump device or directory. Savecore not run."
59 if [ X
$dumpdev != X
]; then
60 echo "Checking for core dump..."
61 savecore
${savecore_flags} ${DUMPDIR}
62 return ${RC_CONFIGURED}