3 # $NetBSD: savecore,v 1.5 2002/03/22 04:34:00 thorpej Exp $
15 start_cmd="savecore_start"
16 start_precmd="savecore_prestart"
21 # ${DUMPDIR} should be a directory or a symbolic link
22 # to the crash directory if core dumps are to be saved.
24 DUMPDIR="${dumpdir:-/var/crash}"
26 # Quit if we have no dump device
29 debug 'No dump device. Quitting.'
33 dumpdev=`/bin/realpath /dev/dumpdev`
37 # If there is no crash directory set it now
47 if [ ! -c "${dumpdev}" ]; then
48 warn "Dump device does not exist. Savecore not run."
52 if [ ! -d "${dumpdir}" ]; then
53 warn "Dump directory does not exist. Savecore not run."
61 echo "Checking for core dump on ${dumpdev}..."
62 savecore ${savecore_flags} ${DUMPDIR} ${dumpdev}