Bug 161540 - RFE: Add "sleep" and "wake" arguments to standard.
RFE: Add "sleep" and "wake" arguments to standard.
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2005-06-23 23:52 EDT by Paul Dugas
Modified: 2014-03-16 22:54 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-10-03 17:22:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Paul Dugas 2005-06-23 23:52:51 EDT
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 00:20:08 EDT
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 00:32:12 EDT
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 17:22:58 EDT
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.