diff options
author | Victor Lowther <victor.lowther@gmail.com> | 2008-03-15 17:18:17 -0500 |
---|---|---|
committer | Victor Lowther <victor.lowther@gmail.com> | 2008-03-15 17:18:17 -0500 |
commit | 40cf5324abdfa5eac08cba836ca84097849ad188 (patch) | |
tree | 5839fd6dec99c6faa49a88de31b1722654344852 | |
parent | de8659ed4bb5d42251ee8695fc54642dbcce0604 (diff) |
Implemented sleep_method_help support.
This intergrates sleep modules into the help system.
-rw-r--r-- | pm/HOWTO.modules | 10 | ||||
-rw-r--r-- | src/pm-action.in | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/pm/HOWTO.modules b/pm/HOWTO.modules index 0237d0e..09c3d78 100644 --- a/pm/HOWTO.modules +++ b/pm/HOWTO.modules @@ -57,4 +57,12 @@ OTHER STUFF: If you define a function named "before_hook", that function will be executed just before the sleep/resume hooks are executed. If you need to disable a hook, -this is the place to do it. +this is the place to do it. + +If you define a function named "sleep_method_help", that function will be +executed whenever any of the pm-utils scripts is called with the "--help" +option. If the behaviour of your sleep method can be changes by command-line +parameters passed to pm-action or by a configuration file setting, you +SHOULD define a sleep_method_help function and that function SHOULD explain +how the command-line paramaters and configuration file settings can change its +behaviour. diff --git a/src/pm-action.in b/src/pm-action.in index 204c0e5..c1a0b35 100644 --- a/src/pm-action.in +++ b/src/pm-action.in @@ -35,6 +35,7 @@ help() echo echo "Options can change how suspend or hibernate is done." run_hooks sleep help + command_exists sleep_method_help && sleep_method_help exit 0 } |