Browse Source
This patch adds support for user mode suspend to disk. It is installed in parallel to kernel mode suspend module; either will fail if system was not suspended using correct tool so next one can be tried. Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>master


5 changed files with 40 additions and 0 deletions
@ -0,0 +1,2 @@
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh |
||||
[ -x /usr/sbin/resume ] |
@ -0,0 +1,6 @@
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash |
||||
inst /usr/sbin/resume |
||||
[ -f /etc/suspend.conf ] && inst /etc/suspend.conf |
||||
|
||||
inst_hook cmdline 10 "$moddir/parse-uswsusp.sh" |
||||
inst_hook mount 10 "$moddir/resume-uswsusp.sh" |
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh |
||||
if resume=$(getarg resume=) && ! getarg noresume; then |
||||
export resume |
||||
else |
||||
unset resume |
||||
fi |
||||
|
||||
case "$resume" in |
||||
LABEL=*) |
||||
resume="$(echo $resume | sed 's,/,\\x2f,g')" |
||||
resume="/dev/disk/by-label/${resume#LABEL=}" ;; |
||||
UUID=*) |
||||
resume="/dev/disk/by-uuid/${resume#UUID=}" ;; |
||||
esac |
||||
|
||||
if splash=$(getarg splash=); then |
||||
export splash |
||||
else |
||||
unset splash |
||||
fi |
Loading…
Reference in new issue