summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hooks/resume4
1 files changed, 2 insertions, 2 deletions
diff --git a/hooks/resume b/hooks/resume
index c0fa0e1..e216f42 100644
--- a/hooks/resume
+++ b/hooks/resume
@@ -2,7 +2,7 @@
run_hook ()
{
if [ -n "${resume}" ]; then
- if echo ${resume} | grep -q ':'; then
+ if [ "${resume}" != "${resume/:}" ]; then
# Tux-on-ice syntax: swap:/dev/sda2 or file:/dev/sda2:0xdeadbeef
resumedev="$(echo ${resume} | cut -d: -f2)"
else
@@ -10,7 +10,7 @@ run_hook ()
resumedev="${resume}"
fi
if poll_device "${resumedev}" ${rootdelay}; then
- if echo ${resume} | grep -q ':'; then
+ if [ "${resume}" != "${resume/:}" ]; then
# Try resuming with tuxonice
tuxoniceroot="/sys/power/tuxonice"
if [ -d "${tuxoniceroot}" ]; then