summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpm/sleep.d/94cpufreq7
-rw-r--r--pm/sleep.d/Makefile.am2
2 files changed, 4 insertions, 5 deletions
diff --git a/pm/sleep.d/94cpufreq b/pm/sleep.d/94cpufreq
index d956aa1..03fa09f 100755
--- a/pm/sleep.d/94cpufreq
+++ b/pm/sleep.d/94cpufreq
@@ -16,7 +16,7 @@ hibernate_cpufreq()
# if our temporary governor is not available, skip.
grep -q "$TEMPORARY_CPUFREQ_GOVERNOR" \
"$x/cpufreq/scaling_available_governors" || continue
- savestate "${x}_governor" $(cat "$gov")
+ savestate "${x}_governor" < "$gov"
echo "$TEMPORARY_CPUFREQ_GOVERNOR" > "$gov"
done )
}
@@ -26,9 +26,8 @@ thaw_cpufreq()
( cd /sys/devices/system/cpu/
for x in cpu[0-9]*/cpufreq/scaling_governor ; do
[ -f "$x" ] || continue
- local gov="$(restorestate "${x%%/*}_governor")"
- [ -z "$gov" ] && continue
- echo "$gov" > "$x"
+ state_exists "${x%%/*}_governor" || continue
+ restorestate "${x%%/*}_governor" > "$x"
done )
}
diff --git a/pm/sleep.d/Makefile.am b/pm/sleep.d/Makefile.am
index 7efbc81..4555fe6 100644
--- a/pm/sleep.d/Makefile.am
+++ b/pm/sleep.d/Makefile.am
@@ -3,7 +3,7 @@ sleepdir = $(libdir)/pm-utils/sleep.d
sleep_SCRIPTS = \
00clear \
01grub \
- 05led \
+ 05led \
10NetworkManager \
49bluetooth \
50modules \