Skip to main content
Topic: [bug report] cpupower-dinit missing true at the end (Read 648 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[bug report] cpupower-dinit missing true at the end

> cat /usr/lib/dinit/cpupower
#!/bin/sh
[ -r /etc/default/cpupower ] && . /etc/default/cpupower

# CPU speed
[ "$governor" ] && cpupower frequency-set -g "$governor"
[ "$max_freq" ] && cpupower frequency-set -u "$max_freq"
[ "$min_freq" ] && cpupower frequency-set -d "$min_freq"
[ "$freq" ]     && cpupower frequency-set -f "$freq"

# CPU options
[ "$perf_bias" ]     && cpupower set -b "$perf_bias"
[ "$mc_scheduler" ]  && cpupower set -m "$mc_scheduler"
[ "$smp_scheduler" ] && cpupower set -s "$smp_scheduler"

true

Re: [bug report] cpupower-dinit missing true at the end

Reply #1
the patch

Code: [Select]
13a14,15
>
> true

why isn't there a way to send PR on gitea (or even register)?

Re: [bug report] cpupower-dinit missing true at the end

Reply #2
Since cpupower is scripted, I don't think true is necessary. Or you encountered an error while trying to run the script?
now only the dinit guy in artix

 

Re: [bug report] cpupower-dinit missing true at the end

Reply #3
Starting the service makes dinit believe that it failed even if everything went fine. The following is printed:

Code: [Select]
# dinitctl start cpupower
Service 'cpupower' failed to start.
Reason: service process terminated before ready: exited - status 1

And dinitctl list shows this line, indicating that something went wrong:

Code: [Select]
[     {X}] cpupower

This is misleading. Simply adding true on the last line solves the problem.

Re: [bug report] cpupower-dinit missing true at the end

Reply #4
Starting the service makes dinit believe that it failed even if everything went fine. The following is printed:

Code: [Select]
# dinitctl start cpupower
Service 'cpupower' failed to start.
Reason: service process terminated before ready: exited - status 1

And dinitctl list shows this line, indicating that something went wrong:

Code: [Select]
[     {X}] cpupower

This is misleading. Simply adding true on the last line solves the problem.

Please don't necropost in every single cpupower-dinit-related post. After seeing what happened here I decided to add exit 0.
now only the dinit guy in artix

Re: [bug report] cpupower-dinit missing true at the end

Reply #5
Sorry, you're right. Is there a way to delete my other replies, if it's okay? I didn't find the option.

Also thank you for the fix!