summaryrefslogtreecommitdiff
path: root/pm
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2008-06-06 20:35:27 -0500
committerVictor Lowther <victor.lowther@gmail.com>2008-06-06 20:35:27 -0500
commit7a2e5093d110de02039ee3eca1f5ee290ef72c49 (patch)
tree225e325404c341224d1c932d8f2429c9075379c7 /pm
parent9187f1c652c40bbc9e1e8c7a1b72c18424a99afb (diff)
Documentation updates describing the sleep hook ordering convention.
Diffstat (limited to 'pm')
-rw-r--r--pm/HOWTO.hooks22
1 files changed, 22 insertions, 0 deletions
diff --git a/pm/HOWTO.hooks b/pm/HOWTO.hooks
index 7beb1f2..4f412eb 100644
--- a/pm/HOWTO.hooks
+++ b/pm/HOWTO.hooks
@@ -36,6 +36,28 @@ For any given sleep/wakeup cycle, the hooks in sleep.d are run twice:
* Once in C lexical sort order before the system goes to sleep, and
* Once in reverse C lexical sort order when the system wakes up.
+SLEEP HOOK ORDERING CONVENTION
+
+00 - 49: user and (most) package supplied hooks.
+If your hook assumes that all of the usual services and userspace
+infrastructure is still running, it should be here.
+
+50 - 74: service-handling hooks.
+If you need to stop or start a service, you should have a hook in this range.
+
+75 - 89: module and non-core hardware handling.
+If you need to load/unload a module, or mess with some non-video related
+hardware that would otherwise break suspend or hibernate, the hook that
+does that should be in this range.
+
+90 - 99: reserved for critical suspend hooks.
+The hooks in this range should not be messed with unless you know what
+you are doing. They start with 90chvt and end with 99video
+
+At or before 50, you can assume that all services are still enabled.
+
+At or before 75, you can assume that all modules are still loaded.
+
CONVENIENCE FUNCTIONS
If your hook is a shell script that supports POSIX/SuS compatible syntax, you