Date: Mon, 9 Nov 2009 12:32:49 -0500 (EST) From: "J.R. Oldroyd" <fbsd@opal.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: conf/140440: allow local command files in rc.{suspend,resume} Message-ID: <200911091732.nA9HWnoN002995@shibato.opal.com> Resent-Message-ID: <200911100500.nAA509sf006815@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911091732.nA9HWnoN002995>