Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 161540 - RFE: Add "sleep" and "wake" arguments to standard.
Summary: RFE: Add "sleep" and "wake" arguments to standard.
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 4
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2005-06-24 03:52 UTC by Paul Dugas
Modified: 2014-03-17 02:54 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Last Closed: 2005-10-03 21:22:58 UTC

Attachments (Terms of Use)

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:

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:

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.

Note You need to log in before you can comment on or make changes to this bug.