From 301019fe9ebe8a2dfb2f59eb8b5572810aee86b7 Mon Sep 17 00:00:00 2001 From: Mihail Konev Date: Sun, 18 Sep 2016 11:47:05 +0000 Subject: [PATCH] Fix for non-Bash echo Neither /bin/echo, nor /bin/dash could perform an "echo ... > /sys/power/state" with "-n" passed. Do not pass the parameter. --- pm/pm-functions.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pm/pm-functions.in b/pm/pm-functions.in index c82be3085e15..a68f955a7b74 100644 --- a/pm/pm-functions.in +++ b/pm/pm-functions.in @@ -294,13 +294,13 @@ done if [ -z "$SUSPEND_MODULE" ]; then if grep -q mem /sys/power/state; then SUSPEND_MODULE="kernel" - do_suspend() { echo -n "mem" >/sys/power/state; } + do_suspend() { echo "mem" >/sys/power/state; } elif [ -c /dev/pmu ] && pm-pmu --check; then SUSPEND_MODULE="kernel" do_suspend() { pm-pmu --suspend; } elif grep -q standby /sys/power/state; then SUSPEND_MODULE="kernel" - do_suspend() { echo -n "standby" >/sys/power/state; } + do_suspend() { echo "standby" >/sys/power/state; } fi fi @@ -312,8 +312,8 @@ if [ -z "$HIBERNATE_MODULE" ] && \ { [ -n "${HIBERNATE_MODE}" ] && \ grep -qw "${HIBERNATE_MODE}" /sys/power/disk && \ - echo -n "${HIBERNATE_MODE}" > /sys/power/disk - echo -n "disk" > /sys/power/state + echo "${HIBERNATE_MODE}" > /sys/power/disk + echo "disk" > /sys/power/state } fi -- 2.9.2