Artix Linux Forum

Init systems => S6 => Topic started by: AlexanderAlex on 30 December 2023, 18:36:56

Title: [SOLVED] A fix for cpupower-s6
Post by: AlexanderAlex on 30 December 2023, 18:36:56
There are 2 issues with the up script as is:
Here's my fixed version:
Code: [Select]
#!/bin/execlineb -P
envfile /etc/default/cpupower
importas -uD "" governor governor
importas -uD "" min_freq min_freq
importas -uD "" max_freq max_freq
importas -uD "" freq freq
importas -uD "" mc_scheduler mc_scheduler
importas -uD "" smp_scheduler smp_scheduler
importas -uD "" perf_bias perf_bias

# frequency options
foreground { if -t { test ${governor} } cpupower frequency-set -g ${governor} }
foreground { if -t { test ${min_freq} } cpupower frequency-set -d ${min_freq} }
foreground { if -t { test ${max_freq} } cpupower frequency-set -u ${max_freq} }
foreground { if -t { test ${freq} } cpupower frequency-set -f ${freq} }

# cpu options
foreground { if -t { test ${mc_scheduler} } cpupower set -m ${mc_scheduler} }
foreground { if -t { test ${smp_scheduler} } cpupower set -s ${smp_scheduler} }
foreground { if -t { test ${perf_bias} } cpupower set -b ${perf_bias} }
Title: Re: A fix for cpupower-s6
Post by: Dudemanguy on 31 December 2023, 16:31:19
Thanks for catching this one. What name and email would you like for me to use to credit you in the commit?
Title: Re: A fix for cpupower-s6
Post by: AlexanderAlex on 31 December 2023, 19:17:13
Alexander and [email protected]
Title: Re: A fix for cpupower-s6
Post by: Dudemanguy on 01 January 2024, 00:57:25
Pushed it here (https://gitea.artixlinux.org/artix/s6-services/commit/09a504e555f361938ec2eac2674fe006b8866035) and just built the updated package. Thanks again!