diff options
author | Victor Lowther <victor.lowther@gmail.com> | 2008-07-01 21:15:23 -0500 |
---|---|---|
committer | Victor Lowther <victor.lowther@gmail.com> | 2008-07-01 21:15:23 -0500 |
commit | d06ab6c9c11c21d98ffbee19047678a1bd60b6a0 (patch) | |
tree | 067dab2762bd155e9719e5ce8732434ba1803fd9 | |
parent | c7e053a05844af2789bb7fab3bf81b0c6d1abcb6 (diff) |
Update documentation to describe the new two-parameter sleep.d regime
-rw-r--r-- | pm/HOWTO.hooks | 18 |
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. |