summaryrefslogtreecommitdiff
path: root/scripts/local-premount/resume
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/local-premount/resume')
-rwxr-xr-xscripts/local-premount/resume12
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/local-premount/resume b/scripts/local-premount/resume
index d997f81..6bf95e5 100755
--- a/scripts/local-premount/resume
+++ b/scripts/local-premount/resume
@@ -28,11 +28,13 @@ case $resume in
;;
esac
-if [ ! -e "${resume}" ]; then
- exit 0
-fi
+[ ! -e "${resume}" ] && exit 0
+
+[ ! -e /sys/power/resume ] && exit 0
-if [ -e /sys/power/resume ]; then
- # hardcode path, uswsusp ships an resume binary too
+# hardcode path, uswsusp ships an resume binary too
+if [ -n "${resume_offset}" ]; then
+ /bin/resume ${resume} ${resume_offset}
+else
/bin/resume ${resume}
fi