summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2008-06-22 11:40:24 -0500
committerVictor Lowther <victor.lowther@gmail.com>2008-06-22 11:40:24 -0500
commit4256c9dd8f924deecd904f6b0b64817b1e7af74d (patch)
treeeeeb0f5391897581a3d1347fab0b447163044e00
parent494ee04c73d8be70d5d5640e6c710d7073a22a0c (diff)
Added documentation in HOWTO.hooks covering abort on hook failure.
-rw-r--r--pm/HOWTO.hooks13
1 files changed, 13 insertions, 0 deletions
diff --git a/pm/HOWTO.hooks b/pm/HOWTO.hooks
index 368eff5..816ebba 100644
--- a/pm/HOWTO.hooks
+++ b/pm/HOWTO.hooks
@@ -30,6 +30,19 @@ NAMING SCHEME
All hooks are run in lexical sort order according to the C locale.
+HOOK EXIT CODES
+
+In normal operation, hooks should only return either 0 or 254 as exit codes.
+0 indicates that the hook performed its task normally.
+254 indicates that the hook is not applicable to this system.
+
+Any other return code is interpreted by the pm-utils machinery as a signal
+from the hook that it should abort whatever it is doing. When running sleep.d
+hooks, that means that pm-utils stops running hooks, aborts the suspend/resume
+process, calls any hooks that ran sucessfully prior to this one with the
+appropriate wakeup options, and exits with a non-zero exit code. When running
+power.d hooks, any hooks after this one will be skipped.
+
SLEEP.D SPECIFIC NOTES
For any given sleep/wakeup cycle, the hooks in sleep.d are run twice: