From mux@qualys.com  Sat Sep 15 11:04:38 2001
Return-Path: <mux@qualys.com>
Received: from noos.fr (e109.dhcp212-198-25.noos.fr [212.198.25.109])
	by hub.freebsd.org (Postfix) with ESMTP id C25A737B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 15 Sep 2001 11:04:37 -0700 (PDT)
Received: (from mux@localhost)
	by nebula.cybercable.fr (8.11.6/8.11.4) id f8FHd1g02281;
	Sat, 15 Sep 2001 19:39:01 +0200 (CEST)
	(envelope-from mux)
Message-Id: <200109151739.f8FHd1g02281@nebula.cybercable.fr>
Date: Sat, 15 Sep 2001 19:39:01 +0200 (CEST)
From: Maxime Henrion <mux@qualys.com>
Reply-To: Maxime Henrion <mux@qualys.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Patch to specify a different directory to savecore
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         30596
>Category:       conf
>Synopsis:       Patch to specify a different directory to savecore
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    des
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 15 11:10:00 PDT 2001
>Closed-Date:    Tue Nov 27 05:54:37 PST 2001
>Last-Modified:  Tue Nov 27 05:54:52 PST 2001
>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:

From: setantae <setantae@submonkey.net>
To: Maxime Henrion <mux@qualys.com>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: conf/30596: Patch to specify a different directory to savecore
Date: Sat, 15 Sep 2001 19:41:03 +0100

 On Sat, Sep 15, 2001 at 07:39:01PM +0200, Maxime Henrion wrote:
 > 
 > 	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.
 
 Do you also have a patch for rc.conf.5 ?
 
 Ceri

From: Dima Dorfman <dima@trit.org>
To: Maxime Henrion <mux@qualys.com>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: conf/30596: Patch to specify a different directory to savecore 
Date: Mon, 01 Oct 2001 05:57:43 -0700

 Maxime Henrion <mux@qualys.com> wrote:
 > >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.
 
 What's the advantage of this over using a symbolic link?

From: Maxime Henrion <mux@qualys.com>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: conf/30596: Patch to specify a different directory to savecore
Date: Tue, 9 Oct 2001 21:09:51 +0200

 Not much, it's just cleaner IMO.
 
 Anyway, des just committed a similar patch, so this PR should be closed,
 I guess.
 
 Thanks,
 Maxime
State-Changed-From-To: open->feedback 
State-Changed-By: des 
State-Changed-When: Tue Oct 9 17:20:54 PDT 2001 
State-Changed-Why:  
Similar patch committed to -CURRENT, awaiting MFC. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30596 
Responsible-Changed-From-To: freebsd-bugs->des 
Responsible-Changed-By: des 
Responsible-Changed-When: Tue Oct 9 17:22:05 PDT 2001 
Responsible-Changed-Why:  
So I remember to MFC. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30596 
State-Changed-From-To: feedback->closed 
State-Changed-By: des 
State-Changed-When: Tue Nov 27 05:54:37 PST 2001 
State-Changed-Why:  
MFCed, thanks! 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30596 
>Unformatted:
