From owner-freebsd-bugs@FreeBSD.ORG Tue Nov 10 05:00:09 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACC8F106566C for ; Tue, 10 Nov 2009 05:00:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 808A28FC0C for ; Tue, 10 Nov 2009 05:00:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nAA509Y4006816 for ; Tue, 10 Nov 2009 05:00:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nAA509sf006815; Tue, 10 Nov 2009 05:00:09 GMT (envelope-from gnats) Resent-Date: Tue, 10 Nov 2009 05:00:09 GMT Resent-Message-Id: <200911100500.nAA509sf006815@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "J.R. Oldroyd" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7535C106566B for ; 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 ; 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 ; 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 ; 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" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: conf/140440: allow local command files in rc.{suspend,resume} X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "J.R. Oldroyd" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2009 05:00:09 -0000 >Number: 140440 >Category: conf >Synopsis: allow local command files in rc.{suspend,resume} >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: Tue Nov 10 05:00:09 UTC 2009 >Closed-Date: >Last-Modified: >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: >Unformatted: