3 # $NetBSD: savecore,v 1.5 2002/03/22 04:34:00 thorpej Exp $
10 # KEYWORD: FreeBSD NetBSD
15 start_cmd="savecore_start"
16 start_precmd="savecore_prestart"
19 case `${CMD_OSTYPE}` in
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 case `${CMD_OSTYPE}` in
34 # Quit if we have no dump device
37 debug 'No dump device. Quitting.'
42 # If there is no crash directory set it now
52 if [ ! -e "${dumpdev}" -o ! -d "${dumpdir}" ]; then
53 warn "Wrong dump device or directory. Savecore not run."
58 if [ ! -d "${dumpdir}" ]; then
59 warn "No /var/crash directory; savecore not run."
69 echo "Checking for core dump..."
70 savecore ${savecore_flags} ${DUMPDIR}