No empty .Rs/.Re
[netbsd-mini2440.git] / etc / rc.d / savecore
blob2c837ae97a07fe5895bd35f7f5c8d62dec33d03b
1 #!/bin/sh
3 # $NetBSD: savecore,v 1.7 2004/08/13 18:08:03 mycroft Exp $
6 # PROVIDE: savecore
7 # REQUIRE: syslogd
8 # BEFORE: SERVERS
10 $_rc_subr_loaded . /etc/rc.subr
12 name="savecore"
13 rcvar=$name
14 start_cmd="savecore_start"
15 stop_cmd=":"
17 savecore_start()
19 # /var/crash should be a directory or a symbolic link
20 # to the crash directory if core dumps are to be saved.
22 if [ -d "${savecore_dir}/." ]; then
23 echo "Checking for core dump..."
24 if savecore -n; then
25 savecore $rc_flags "${savecore_dir}"
27 else
28 warn "No crash dump directory; savecore not run."
32 load_rc_config $name
33 run_rc_command "$1"