summaryrefslogtreecommitdiffstats
path: root/hooks
diff options
context:
space:
mode:
authorGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2011-11-15 00:46:24 +0100
committerDave Reisner <dreisner@archlinux.org>2011-11-15 01:11:05 +0100
commit99b4dcfc9b63e9cb1026e4cd2051314697c3924f (patch)
treea5286ebbadb5038ca8e24cc2671d0bf1310aa685 /hooks
parent043ea8064223ebf0540ea1755694a3e905d70ed2 (diff)
downloadmkinitcpio-99b4dcfc9b63e9cb1026e4cd2051314697c3924f.tar.gz
mkinitcpio-99b4dcfc9b63e9cb1026e4cd2051314697c3924f.tar.xz
hooks/resume: Remove grep usage
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Diffstat (limited to 'hooks')
-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