aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2008-02-13 20:25:17 +0000
committerMatthias Schwarzott <zzam@gentoo.org>2008-02-13 20:25:17 +0000
commit2d824bfd5ce41ed14c122ffbf23ea11740696d80 (patch)
tree2d577a8105b09041534c49348114bc127a7701a2 /README.shutdown
parentNow always install wakeup-nvram helper. (diff)
downloadgentoo-vdr-scripts-2d824bfd5ce41ed14c122ffbf23ea11740696d80.tar.gz
gentoo-vdr-scripts-2d824bfd5ce41ed14c122ffbf23ea11740696d80.tar.bz2
gentoo-vdr-scripts-2d824bfd5ce41ed14c122ffbf23ea11740696d80.zip
More wakeup simplifications. Now try more than 1 wakeup-method until one successes.
svn path=/gentoo-vdr-scripts/trunk/; revision=575
Diffstat (limited to 'README.shutdown')
-rw-r--r--README.shutdown48
1 files changed, 14 insertions, 34 deletions
diff --git a/README.shutdown b/README.shutdown
index 73d7960..d237424 100644
--- a/README.shutdown
+++ b/README.shutdown
@@ -19,55 +19,35 @@ The module is sourced by the shell. The wakeup-module is executed as user root.
The Main part of the wakeup-module:
-A wakeup-module should do nothing in its main part.
+A wakeup-module should just set the time provided in the variable VDR_WAKEUP_TIME its main part.
-
-Return values of functions:
- = 0 - success
- <> 0 - failure
-
-
-
-
-Functions to be defined:
-
-set_wakeup:
- Do the real work. It gets the time to wakeup as
- first parameter in Unix-Format (Seconds since 1970-01-01 UTC)
+ It gets the time in Unix-Format (Seconds since 1970-01-01 UTC)
and should do whatever necessary
to let the system be up at that time.
+Return values:
+ = 0 - success
+ != 0 - failure
+
Usable functions:
void error_mesg(string message)
Sets an error message
+void set_reboot_needed(void)
+ Call in wakeup_set when you need to reboot
+ for setting the time.
Example:
-wakeup_check() {
- if [ ! -x needed_program ]; then
- error_mesg "no acpi-driver installed"
- return 1
- fi
-
- return 0
-}
-
-wakeup_set() {
- pass_wakeup_time_to_hardware "${1}"
-}
+if [ ! -x needed_program ]; then
+ error_mesg "no wakeup-driver installed"
+ return 1
+fi
-Usable functions:
-
-void error_mesg(string message)
- Sets an error message
-
-void set_reboot_needed(void)
- Call in wakeup_set when you need to reboot
- for setting the time.
+pass_wakeup_time_to_hardware "${1}"