From jr@opal.com  Tue Nov 10 04:54:58 2009
Return-Path: <jr@opal.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7535C106566B
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 10 Nov 2009 04:54:58 +0000 (UTC)
	(envelope-from jr@opal.com)
Received: from smtp.vzavenue.net (smtp.vzavenue.net [66.171.59.140])
	by mx1.freebsd.org (Postfix) with ESMTP id 2F25B8FC13
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 10 Nov 2009 04:54:58 +0000 (UTC)
Received: from 153.78.171.66.subscriber.vzavenue.net (HELO homobox.opal.com) ([66.171.78.153])
  by smtp.vzavenue.net with ESMTP; 09 Nov 2009 23:54:56 -0500
Received: from opal.com (localhost [IPv6:::1])
	(authenticated bits=0)
	by homobox.opal.com (8.14.3/8.14.3) with ESMTP id nAA4stH3030483
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 9 Nov 2009 23:54:55 -0500 (EST)
	(envelope-from jr@opal.com)
Received: from shibato.opal.com ([192.168.3.254] helo=shibato.opal.com)
	with IPv4:587 by opal.com; 9 Nov 2009 23:54:55 -0500
Received: from shibato.opal.com (localhost [127.0.0.1])
	by shibato.opal.com (8.14.3/8.14.3) with ESMTP id nAA4sqO0001136
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 9 Nov 2009 23:54:53 -0500 (EST)
	(envelope-from jr@opal.com)
Received: (from jr@localhost)
	by shibato.opal.com (8.14.3/8.14.3/Submit) id nA9HWnoN002995;
	Mon, 9 Nov 2009 12:32:49 -0500 (EST)
	(envelope-from jr)
Message-Id: <200911091732.nA9HWnoN002995@shibato.opal.com>
Date: Mon, 9 Nov 2009 12:32:49 -0500 (EST)
From: "J.R. Oldroyd" <fbsd@opal.com>
Reply-To: "J.R. Oldroyd" <fbsd@opal.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: allow local command files in rc.{suspend,resume}
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         140440
>Category:       conf
>Synopsis:       [patch] allow local command files in rc.{suspend,resume}
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-rc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 10 05:00:09 UTC 2009
>Closed-Date:    
>Last-Modified:  Tue Nov 10 06:35:10 UTC 2009
>Originator:     J.R. Oldroyd
>Release:        FreeBSD 8.0-RC2 amd64
>Organization:
>Environment:
System: FreeBSD xx.opal.com 8.0-RC2 FreeBSD 8.0-RC2 #1 r198553: Wed Oct 28 16:43:17 EDT 2009 xx@xx.opal.com:/usr/src/sys/amd64/compile/XX amd64
>Description:
Allow local command files in /etc/rc.{suspend,resume}

Patch below will invoke commands in /etc/rc.{suspend,resume}.local if those
files are present.  This allows local commands to be placed in separate files
so that the main /etc/rc.{suspend,resume} can be replaced during a system
upgrade without the hassle of changes during mergemaster.
>How-To-Repeat:
n/a
>Fix:
--- rc.suspend.orig     2009-11-09 12:27:46.000000000 -0500
+++ rc.suspend  2009-11-09 12:23:53.000000000 -0500
@@ -52,6 +52,9 @@
 # suspend and reloading it on resume.  Example:
 # kldunload usb
 
+# run local suspend commands
+[ -f /etc/rc.suspend.local ] && . /etc/rc.suspend.local
+
 logger -t $subsystem suspend at `date +'%Y%m%d %H:%M:%S'`
 sync && sync && sync
 sleep 3
--- rc.resume.orig      2009-11-09 12:27:38.000000000 -0500
+++ rc.resume   2009-11-09 12:24:06.000000000 -0500
@@ -56,6 +56,9 @@
 # the following to signal it to reassociate.
 # /usr/sbin/wpa_cli reassociate
 
+# run local resume commands
+[ -f /etc/rc.resume.local ] && . /etc/rc.resume.local
+
 logger -t $subsystem resumed at `date +'%Y%m%d %H:%M:%S'`
 sync && sync && sync
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-rc 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Nov 10 06:34:56 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=140440 
>Unformatted:
