summaryrefslogtreecommitdiffstats
path: root/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'hooks')
-rw-r--r--hooks/resume3
1 files changed, 2 insertions, 1 deletions
diff --git a/hooks/resume b/hooks/resume
index e216f42..2079e05 100644
--- a/hooks/resume
+++ b/hooks/resume
@@ -4,7 +4,8 @@ run_hook ()
if [ -n "${resume}" ]; then
if [ "${resume}" != "${resume/:}" ]; then
# Tux-on-ice syntax: swap:/dev/sda2 or file:/dev/sda2:0xdeadbeef
- resumedev="$(echo ${resume} | cut -d: -f2)"
+ resumedev=${resume#*:}
+ resumedev=${resumedev%%:*}
else
# Classical syntax: just a device
resumedev="${resume}"