-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* hook/resume: hibernation support * doc/*: added resume to docs * readme: added resume to readme * hook/resume: replaced stat * hook/resume/resume.init: shellcheck fix --------- Co-authored-by: Fred Loader <[email protected]>
- Loading branch information
Showing
5 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# vim: set ft=sh: | ||
# shellcheck shell=sh | ||
# | ||
# https://shellcheck.net/wiki/SC2154 | ||
# shellcheck disable=2154 | ||
|
||
copy_exec readlink | ||
copy_exec cat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# vim: set ft=sh: | ||
# shellcheck shell=sh | ||
# | ||
# https://shellcheck.net/wiki/SC2154 | ||
# shellcheck disable=2154 | ||
|
||
resolve_device "$resume" | ||
|
||
if [ -n "$device" ]; then | ||
dev_link=$(readlink "$device") | ||
|
||
cat /sys/class/block/"${dev_link##*/}"/dev > /sys/power/resume || \ | ||
panic "failed to resume" | ||
fi |