Bug 161540

Summary: RFE: Add "sleep" and "wake" arguments to standard.
Product: [Fedora] Fedora Reporter: Paul Dugas <paul>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED WONTFIX QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: rvokal
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-03 21:22:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Paul Dugas 2005-06-24 03:52:51 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

Description of problem:
Consider adding "sleep" and "wake" arguments to the standards for init scripts so we can call them in ACPI actions.  Got the idea after having to enter the 'dbus-send' command to properly notify NetworkManager of the events.

How about something like `service sleep` that would iterate through all the enabled systems at the current run-level and run `service <foo> sleep`?  The stock ACPI action scripts could then call this on sleep and wake events.

May need to define a new comment header (i.e. 'sleepnotify: 1' or a new flag in the 'chkconfig:' entry) until legacy scripts actually added the new "sleep" and "wake" options for the 'service sleep' idea to work.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:

  

Expected Results:  A way for package maintainers to indicate whether their subsystem has additonal requirements before and after a suspend/restore cycle.

A single command to call from ACPI scripts to notify all interseted subsystems of such events.

Additional info:

Comment 1 Bill Nottingham 2005-06-24 04:20:08 UTC
Realistically, it's probably better that they expose those methods via d-bus,
along the ideas of:
http://fedoraproject.org/wiki/FCNewInit

Moreover, I'd think most services that would supposedly need 'sleep' and
'resume' should actually be triggering on something else. For example, they
should be catching changing networks, or changes from AC to battery.

Comment 2 Paul Dugas 2005-06-24 04:32:12 UTC
I'm no init or Dbus guru here so bear with me.  I don't understand the "expose
those methods via d-bus" comment.  My /etc/acpi/actions/sleep script is calling
a rather long dbus-send command to tell NetworkManager that we're going down and
coming back up.  Are you suggesting that someone else needs to be notifying
NetworkManager rather than an ACPI script?

Comment 3 Bill Nottingham 2005-10-03 21:22:58 UTC
See the hooks in /etc/pm/hooks; that's probably the best place to integrate
these sorts of things.