diff options
author | Victor Lowther <victor.lowther@gmail.com> | 2008-02-11 16:24:46 -0600 |
---|---|---|
committer | Victor Lowther <victor.lowther@gmail.com> | 2008-02-11 16:24:46 -0600 |
commit | 25c7ae741c74c59361946af749f120787db7caa0 (patch) | |
tree | 531058aec4d6f3ad5edb498b7b25581f8fed563d /pm | |
parent | ad92f817445390525e66b40ac8d9906e58f99810 (diff) |
Added completely untested uswsusp support.
Use at your own risk.
Diffstat (limited to 'pm')
-rw-r--r-- | pm/module.d/Makefile.am | 3 | ||||
-rw-r--r-- | pm/module.d/uswsusp | 28 |
2 files changed, 30 insertions, 1 deletions
diff --git a/pm/module.d/Makefile.am b/pm/module.d/Makefile.am index 6efd24d..0f8add5 100644 --- a/pm/module.d/Makefile.am +++ b/pm/module.d/Makefile.am @@ -2,7 +2,8 @@ moduledir = $(libdir)/pm-utils/module.d dist_module_SCRIPTS = \ kernel \ - tuxonice + tuxonice \ + uswsusp clean-local : rm -f *~ diff --git a/pm/module.d/uswsusp b/pm/module.d/uswsusp new file mode 100644 index 0000000..d2c50c4 --- /dev/null +++ b/pm/module.d/uswsusp @@ -0,0 +1,28 @@ +check_suspend() { + grep -q mem /sys/power/state && command_exists s2ram +} + +do_suspend() +{ + s2ram -f +} + +check_hibernate() { + [ -f /sys/power/disk ] && \ + grep -q disk /sys/power/state && \ + command_exists s2disk +} + +do_hibernate() +{ + s2disk +} + +check_suspend_hybrid() { + grep -q mem /sys/power/state && command_exists s2both +} + +do_suspend_hybrid() +{ + s2both -f +} |