Artix Linux Forum

Init systems => S6 => Topic started by: Borderliner on 01 April 2020, 15:26:52

Title: Migrate from OpenRC to s6 and s6-rc
Post by: Borderliner on 01 April 2020, 15:26:52
I have Artix-OpenRC installed, but I would like to try out s6 and s6-rc instead. How do I proceed without breaking the system? Is there a way I can migrate at all?
Title: Re: Migrate from OpenRC to s6 and s6-rc
Post by: Dudemanguy on 01 April 2020, 16:42:10
For migrating from any init system on artix to another the process is basically the same. Install the new init system you want plus the init scripts you want and remove the old init+scripts. It's safer to make sure that you have every package you want in cache somewhere before you remove any services in case something like your internet goes down, so use the pacman -Sw option.

As an aside, s6-linux-init will replace your reboot/shutdown/etc binaries, so you won't be able to do a clean reboot if you install it (I should probably change that so it copies them to /tmp or something tbh).
Title: Re: Migrate from OpenRC to s6 and s6-rc
Post by: nous on 02 April 2020, 10:04:28
What @Dudemanguy said, copy the openrc binaries to /tmp (pacman -Qql openrc | grep /usr/bin, some are just symlinks), install s6 and replace all openrc packages with the respective s6 ones. First -Rdd openrc and netifrc, -S s6 and finally the scripts:
Code: [Select]
for p in $(pacman -Qq | grep \\-openrc); do sudo pacman -Rdd $p; sudo pacman -S $(echo $p | sed s/openrc/s6/); done
.
Once you're satisfied with your setup (see our wiki on s6), you should reboot with /tmp/openrc-shutdown --reboot now into your new init.