alexhaydock / install-gentoo

Crazy project to automate a full desktop Gentoo install from Stage3 tarball. Uses Packer + Ansible.
BSD 3-Clause "New" or "Revised" License
9 stars 4 forks source link

Switching to OpenRC #1

Open samip5 opened 4 years ago

samip5 commented 4 years ago

Uses systemd. There is no simple way to switch this to OpenRC.

Could you elaborate more on that?

alexhaydock commented 4 years ago

So it's quite easy in general to switch between the systemd and OpenRC Gentoo base systems using eselect during install, but what I mean here is that there's no simple way (e.g. with a variable or command-line switch) to switch this playbook to OpenRC.

The reason for that is that I'd have to implement a whole bunch of extra conditional logic that would run differently depending on whether the user picked systemd or OpenRC. So, for example, systemd-timesyncd would need swapping out, and the network config would need rewriting as it currently uses systemd-networkd formatting. Similarly, anything that invokes systemctl would need replacing and some of the package-specific USE flags might need some work.

Basically, keeping a playbook that could comfortably flip between systemd and OpenRC easily would mean implementing most of the tasks twice.

If you can think of a smart way of managing it though, it's definitely possible. And this is a random hobby project after all...

samip5 commented 4 years ago

Okey, so then, could you please list all systemd related things that I need to swap out with OpenRC variants?

EDIT: Other option would be to have a branch per init system, so master could be systemd and have another for OpenRC.