Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Sep 2001 19:39:01 +0200 (CEST)
From:      Maxime Henrion <mux@qualys.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   conf/30596: Patch to specify a different directory to savecore
Message-ID:  <200109151739.f8FHd1g02281@nebula.cybercable.fr>

next in thread | raw e-mail | index | archive | help

>Number:         30596
>Category:       conf
>Synopsis:       Patch to specify a different directory to savecore
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 15 11:10:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Maxime Henrion
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
None.
>Environment:
System: FreeBSD nebula.cybercable.fr 5.0-CURRENT FreeBSD 5.0-CURRENT #103: Sat Sep 15 18:03:06 CEST 2001 mux@nebula.cybercable.fr:/usr/src/sys/i386/compile/NEBULA i386

>Description:

	This patchs adds a savecore_dir know in rc.conf so that it's
possible to specify another directory than /var/crash.  The default
is unchanged.

>How-To-Repeat:
>Fix:


--- savecore.patch begins here ---
--- /etc/rc	Tue Sep 11 20:44:22 2001
+++ rc	Tue Sep 11 20:45:47 2001
@@ -485,17 +485,17 @@
 fi
 
 # Enable dumpdev so that savecore can see it.
-# /var/crash should be a directory or a symbolic link
+# ${savecore_dir} should be a directory or a symbolic link
 # to the crash directory if core dumps are to be saved.
 #
 case ${dumpdev} in
 [Nn][Oo] | '')
 	;;
 *)
-	if [ -e "${dumpdev}" -a -d /var/crash ]; then
+	if [ -e "${dumpdev}" -a -d "${savecore_dir}" ]; then
 		/sbin/dumpon -v ${dumpdev}
 		echo -n 'Checking for core dump: '
-		/sbin/savecore ${savecore_flags} /var/crash
+		/sbin/savecore ${savecore_flags} ${savecore_dir}
 	fi
 	;;
 esac
--- /etc/defaults/rc.conf	Tue Sep 11 20:43:40 2001
+++ rc.conf	Tue Sep 11 20:43:30 2001
@@ -326,6 +326,7 @@
 diskcheckd_flags=""	# Flags to diskcheckd(8).
 dumpdev="NO"		# Device name to crashdump to (or NO).
 savecore_flags="" 	# Used if dumpdev is enabled above, and present.
+savecore_dir="/var/crash" # Where to put the kernel core dumps.
 enable_quotas="NO"      # turn on quotas on startup (or NO).
 check_quotas="YES"	# Check quotas on startup (or NO).
 accounting_enable="NO"	# Turn on process accounting (or NO).
--- savecore.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109151739.f8FHd1g02281>