Make the directory into which crash dumps are saved into something
that can be controlled via rc.conf. The default is, of course, /var/crash.
This commit is contained in:
parent
ec3d29dac4
commit
5f89bdd921
@ -1,4 +1,4 @@
|
|||||||
# $NetBSD: rc.conf,v 1.60 2004/07/04 13:59:34 martin Exp $
|
# $NetBSD: rc.conf,v 1.61 2004/07/15 03:29:55 atatat Exp $
|
||||||
#
|
#
|
||||||
# /etc/defaults/rc.conf --
|
# /etc/defaults/rc.conf --
|
||||||
# default configuration of /etc/rc.conf
|
# default configuration of /etc/rc.conf
|
||||||
@ -99,6 +99,7 @@ lkm=NO # Run /etc/rc.lkm. /usr needs to be part of /, or
|
|||||||
# part of critical_filesystems_local.
|
# part of critical_filesystems_local.
|
||||||
|
|
||||||
savecore=YES savecore_flags="-z"
|
savecore=YES savecore_flags="-z"
|
||||||
|
savecore_dir="/var/crash"
|
||||||
clear_tmp=YES # clear /tmp after reboot
|
clear_tmp=YES # clear /tmp after reboot
|
||||||
update_motd=YES # updates /etc/motd
|
update_motd=YES # updates /etc/motd
|
||||||
dmesg=YES dmesg_flags="" # write /var/run/dmesg.boot
|
dmesg=YES dmesg_flags="" # write /var/run/dmesg.boot
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# $NetBSD: savecore,v 1.5 2002/03/22 04:34:00 thorpej Exp $
|
# $NetBSD: savecore,v 1.6 2004/07/15 03:29:55 atatat Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
# PROVIDE: savecore
|
# PROVIDE: savecore
|
||||||
@ -19,11 +19,11 @@ savecore_start()
|
|||||||
# /var/crash should be a directory or a symbolic link
|
# /var/crash should be a directory or a symbolic link
|
||||||
# to the crash directory if core dumps are to be saved.
|
# to the crash directory if core dumps are to be saved.
|
||||||
#
|
#
|
||||||
if [ -d /var/crash/. ]; then
|
if [ -d "${savecore_dir}/." ]; then
|
||||||
echo "Checking for core dump..."
|
echo "Checking for core dump..."
|
||||||
savecore $rc_flags /var/crash
|
savecore $rc_flags "${savecore_dir}"
|
||||||
else
|
else
|
||||||
warn "No /var/crash directory; savecore not run."
|
warn "No crash dump directory; savecore not run."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.\" $NetBSD: rc.conf.5,v 1.88 2004/01/15 09:14:54 jmmv Exp $
|
.\" $NetBSD: rc.conf.5,v 1.89 2004/07/15 03:29:55 atatat Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 1996 Matthew R. Green
|
.\" Copyright (c) 1996 Matthew R. Green
|
||||||
.\" Copyright (c) 1997 Curt J. Sampson
|
.\" Copyright (c) 1997 Curt J. Sampson
|
||||||
@ -316,6 +316,10 @@ Runs the
|
|||||||
utility.
|
utility.
|
||||||
Passes
|
Passes
|
||||||
.Sy savecore_flags .
|
.Sy savecore_flags .
|
||||||
|
The directory where crash dumps are stored is specified by
|
||||||
|
.Sy savecore_dir .
|
||||||
|
The default setting is
|
||||||
|
.Dq /var/crash .
|
||||||
.It Sy tpctl
|
.It Sy tpctl
|
||||||
.Sq YES
|
.Sq YES
|
||||||
or
|
or
|
||||||
|
Loading…
Reference in New Issue
Block a user