diff options
author | David Runge <dave@sleepmap.de> | 2016-05-01 18:30:32 +0200 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2016-05-01 18:30:32 +0200 |
commit | d5fc7321be9366823502e89a16bcaebb54c004f2 (patch) | |
tree | 2fd10c6dfc60a4a60ad1196806f3ce7bd820e665 | |
parent | 78c68b8edd9bc3b9011f35d42b6f9300fe9c6144 (diff) | |
download | uenv-0.4.tar.gz uenv-0.4.tar.bz2 uenv-0.4.tar.xz uenv-0.4.zip |
system/cpupower-rt.service: Making the service use the default script from the cpupower package. Proper EnvironmentFile settings have been added to the Arch Linux cpupower package.0.4
-rwxr-xr-x | scripts/cpupower-rt | 32 | ||||
-rw-r--r-- | system/cpupower-rt.service | 3 |
2 files changed, 2 insertions, 33 deletions
diff --git a/scripts/cpupower-rt b/scripts/cpupower-rt deleted file mode 100755 index d775d68..0000000 --- a/scripts/cpupower-rt +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -. /etc/default/cpupower-rt - -declare -i fail=0 - -# parse frequency options -declare -a params=() -params+=(${governor:+-g $governor}) -params+=(${min_freq:+-d $min_freq}) -params+=(${max_freq:+-u $max_freq}) -params+=(${freq:+-f $freq}) - -# apply frequency options -if ((${#params[@]} > 0)); then - cpupower frequency-set "${params[@]}" >/dev/null || fail=1 -fi - -# parse cpu options -declare -a params=() -params+=(${mc_scheduler:+-m $mc_scheduler}) -params+=(${smp_scheduler:+-s $smp_scheduler}) -params+=(${perf_bias:+-b $perf_bias}) - -# apply cpu options -if ((${#params[@]} > 0)); then - cpupower set "${params[@]}" >/dev/null || fail=1 -fi - -exit $fail - -# vim:set ts=2 sw=2 ft=sh et: diff --git a/system/cpupower-rt.service b/system/cpupower-rt.service index aa7eda4..2838078 100644 --- a/system/cpupower-rt.service +++ b/system/cpupower-rt.service @@ -5,7 +5,8 @@ After=cpupower.service [Service] Type=oneshot -ExecStart=/usr/lib/systemd/scripts/cpupower-rt +EnvironmentFile=/etc/default/cpupower-rt +ExecStart=/usr/lib/systemd/scripts/cpupower RemainAfterExit=yes [Install] |