Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for other init systems #568

Open
pibiba opened this issue Oct 9, 2024 · 7 comments
Open

Add support for other init systems #568

pibiba opened this issue Oct 9, 2024 · 7 comments
Labels
documentation Improvements or additions to documentation feature request Request a new feature good first issue Good for newcomers help wanted Extra attention is needed

Comments

@pibiba
Copy link

pibiba commented Oct 9, 2024

Can you add support for other init systems like OpenRC, Runit, s6 and dinit?

@pibiba pibiba added the feature request Request a new feature label Oct 9, 2024
@JakeRoggenbuck
Copy link
Owner

Yea! We can add that. Thanks for the suggestion!

@JakeRoggenbuck JakeRoggenbuck added documentation Improvements or additions to documentation help wanted Extra attention is needed good first issue Good for newcomers labels Oct 10, 2024
@pibiba
Copy link
Author

pibiba commented Oct 10, 2024

Thanks for your response!

@pibiba
Copy link
Author

pibiba commented Oct 14, 2024

I encountered an error when trying to run acs via the dinit service. The service does not start, and these messages appear in the log:

thread 'main' panicked at src/daemon.rs:450:67:
called `Result::unwrap()` on an `Err` value: Os { code: 25, kind: Uncategorized, message: "Inappropriate ioctl for device" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I see that you want to replace the line that is probably causing this error. #569

Just wanted to let you know.

@JakeRoggenbuck
Copy link
Owner

Thanks for letting us know! I'll start by removing the unwrap and changing it to something else.

@JakeRoggenbuck
Copy link
Owner

Putting it under #573

@pibiba
Copy link
Author

pibiba commented Oct 15, 2024

Great. It seems the last fix #575 helped to overcome this error.

Currently the service starts, but only for a while (less than a minute), and then it just displays:

sudo dinitctl start acs  
Service 'acs' failed to start.
Reason: start timed out.

Probably a problem with dependencies during startup, I don't know...

And another thing, after starting the service, I run the command tail -f /var/log/dinit/acs.log and I see the "interface" of acs. That is:

Auto Clock Speed daemon has been initialized in edit mode with a delay of 1000ms normally and 5000ms when on battery

Name	Max	Min	Freq	Temp	Usage	Governor
cpu0:	3100MHz	1200MHz	2806MHz	56C	4.00%	performance
cpu1:	3100MHz	1200MHz	2899MHz	57C	4.04%	performance
cpu2:	3100MHz	1200MHz	2259MHz	56C	6.93%	performance
cpu3:	3100MHz	1200MHz	2743MHz	56C	2.02%	performance

Battery: 79%
Condition: 45%
Turbo: enabled





ctrl+c to stop running

notice: 2024-10-15 09:27:33 -> State changed: Unknown -> Charging
notice: 2024-10-15 09:27:53 -> State changed: Charging -> Normal
notice: 2024-10-15 09:28:01 -> State changed: Normal -> Charging

This is not quite correct, the log should only contain these messages:

notice: 2024-10-15 09:27:33 -> State changed: Unknown -> Charging
notice: 2024-10-15 09:27:53 -> State changed: Charging -> Normal
notice: 2024-10-15 09:28:01 -> State changed: Normal -> Charging

@pibiba
Copy link
Author

pibiba commented Oct 16, 2024

Those who want to test the dinit service should create a file /etc/dinit.d/acs with the following content:

type = process
command = /usr/bin/acs run
#logfile = /var/log/dinit/acs.log
after     = local.target
before    = login.target

Please note that this is my first experience and most likely this service requires more thorough verification and testing!

If in the future acs will be able to output only messages to the log, then the line with logfile should be uncommented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation feature request Request a new feature good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants