-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
OpenRC support? #62
Comments
I haven't tested it yet but perhaps something like this could be used:
|
I'd be open to add OpenRC support sometime, but I am not familiar with it at all. If you could test the example configuration you posted and update it if necessary, I can add this to the backlog.
Adding OpenRC support would require some code changes in the main script though. My main focus now is how I could rewrite the script to extends its functionality for general thunderbolt devices (not just eGPUs) and I'm working on a prototype in Rust (see discussion #58). Because of that, feature-additions to the bash script aren't my main focus right now, and I can't guarantee any time-frame when this would be implemented. I would welcome a PR though :) |
Understood. I'm afraid i dont know anything about thunderbolt since i use expresscard. However i downloaded and ran the script and it works great as it is. Seems like the only issue is that it cant place and start the systemd service file (since there is no such thing in a openrc system) otherwise it successfully switches my system to the egpu. I'll try to work on a PR when i have some time and hopefully we can add openrc support sometime soon. |
Thanks a lot for pointing that out, I wasn't actually aware that people might use the script with non-Thunderbolt external video devices.
Sounds great! I think the "only" thing to change in the script is the logic where it creates the systemd service. So instead of creating the systemD service directly, it should check whether the init system is systemD or OpenRC, and then apply the according configuration. Most important lines are probably here: https://github.com/hertg/egpu-switcher/blob/master/egpu-switcher#L335-L338 |
With the recent rewrite, I took this issue into consideration and tried to abstract away anything |
I was wondering if it was possible to make a OpenRC compatible version of this. I think people who use distros without systemd would benefit greatly from this.
The text was updated successfully, but these errors were encountered: