summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pm/HOWTO.hooks18
1 files changed, 11 insertions, 7 deletions
diff --git a/pm/HOWTO.hooks b/pm/HOWTO.hooks
index 816ebba..bf68813 100644
--- a/pm/HOWTO.hooks
+++ b/pm/HOWTO.hooks
@@ -2,24 +2,28 @@ How to write a pm-utils hook:
PARAMETERS
-A pm-utils hook is simply an executable file that accepts a single parameter.
-For hooks in sleep.d, the potential values of that parameter are:
+A pm-utils hook is simply an executable file that accepts at least one
+parameter.
+
+For hooks in sleep.d, the potential values of the first parameter are:
suspend -- The hook MUST perform whatever action is appropriate when the
- system is preparing for S3 sleep (or its equivalent).
-suspend_hybrid -- The hook MUST perform whatever action is appropriate
- when entering suspend mode. The hook SHOULD also save
- any state it may need to bring the system back from
- hibernate mode.
+ system is preparing for memory sleep (or its equivalent).
resume -- The hook MUST perform whatever action is appropriate when the
system is coming out of suspend.
+
hibernate -- The hook MUST perform whatever action is appropriate when
the system is preparing for suspend-to-disk.
thaw -- The hook MUST perform whatever action is appropriate when the system
is coming out of suspend-to-disk.
+
help -- If your hook parses the PM_CMDLINE environment variable for switches,
this function SHOULD output text describing the parameters it parses
in a format easily understandable by an end-user.
+The actual sleep method being used will be passed as the second parameter --
+if your hook needs to handle suspend-hybrid (or any other platform-specific
+sleep method), it should examine the second parameter.
+
For hooks in power.d, the potential values of that parameter are:
true -- the hook MUST perform whatever action is appropriate when the system
transitions TO battery power.