From owner-svn-src-head@freebsd.org Fri Apr 29 12:23:58 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AA2FB1FB26; Fri, 29 Apr 2016 12:23:58 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F8EA1985; Fri, 29 Apr 2016 12:23:57 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3TCNvJT061379; Fri, 29 Apr 2016 12:23:57 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3TCNu6X061376; Fri, 29 Apr 2016 12:23:56 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201604291223.u3TCNu6X061376@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 29 Apr 2016 12:23:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298784 - in head: etc/defaults etc/rc.d share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Apr 2016 12:23:58 -0000 Author: bapt Date: Fri Apr 29 12:23:56 2016 New Revision: 298784 URL: https://svnweb.freebsd.org/changeset/base/298784 Log: Add a savecore_enable variable support for the savecore rc script By default set to 'YES' so it does not change the current behaviour for users, this variable allows to decide to not extract crach dumps from the dump device at boot time by setting it to "NO" in rc.conf. Sponsored by: Gandi.net Modified: head/etc/defaults/rc.conf head/etc/rc.d/savecore head/share/man/man5/rc.conf.5 Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Fri Apr 29 12:00:36 2016 (r298783) +++ head/etc/defaults/rc.conf Fri Apr 29 12:23:56 2016 (r298784) @@ -603,6 +603,7 @@ chkprintcap_enable="NO" # Run chkprintca chkprintcap_flags="-d" # Create missing directories by default. dumpdev="AUTO" # Device to crashdump to (device name, AUTO, or NO). dumpdir="/var/crash" # Directory where crash dumps are to be stored +savecore_enable="YES" # Extract core from dump devices if any savecore_flags="-m 10" # Used if dumpdev is enabled above, and present. # By default, only the 10 most recent kernel dumps # are saved. Modified: head/etc/rc.d/savecore ============================================================================== --- head/etc/rc.d/savecore Fri Apr 29 12:00:36 2016 (r298783) +++ head/etc/rc.d/savecore Fri Apr 29 12:23:56 2016 (r298784) @@ -10,6 +10,7 @@ . /etc/rc.subr name="savecore" +rcvar="savecore_enable" desc="Save a core dump of the operating system" start_cmd="savecore_start" start_precmd="savecore_prestart" Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Fri Apr 29 12:00:36 2016 (r298783) +++ head/share/man/man5/rc.conf.5 Fri Apr 29 12:23:56 2016 (r298784) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 28, 2016 +.Dd April 29, 2016 .Dt RC.CONF 5 .Os .Sh NAME @@ -3511,6 +3511,12 @@ to not run at boot time when .Va dumpdir is set. +.It Va savecore_enable +.Pq Vt bool +If set to +.Dq Li NO , +disable automatic extraction of the crash dump from the +.Va dumpdev . .It Va savecore_flags .Pq Vt str If crash dumps are enabled, these are the flags to pass to the