void-runit icon indicating copy to clipboard operation
void-runit copied to clipboard

Migrate the creation of runit control files from stage 1 script to core-services

Open sbromberger opened this issue 1 year ago • 3 comments

This change allows later customization of the runit control files (/run/runit/stopit, et al.) via core-services instead of having to override in /etc/rc.local. This is an enabler of a solution to https://github.com/lxc/lxc-ci/issues/408, discussed also in https://github.com/void-linux/void-runit/pull/50.

This PR will make the following (nonbreaking) change to the startup process: currently the runit control files are created AFTER the dmesg chmod in 1. Because core services are executed before the dmesg chmod, this means that the runit control files will be created BEFORE the dmesg chmod. Since runit and dmesg are independent, this should not cause any issues. (A separate question is whether we should move the dmesg work into core services, thus making 1 just a simple executor of core services.)

After this change, folks using lxd or incus containers will be able to create their own lower-priority core service to modify the permissions on the files to enable proper shutdown/reboot of the containers. These core services will survive upgrades to void-runit, unlike the current approach in the container script.

sbromberger avatar Jan 02 '24 04:01 sbromberger

sounds reasonable, also the dmesg could be moved into a 97-dmesg.sh or so.

leahneukirchen avatar Jan 02 '24 22:01 leahneukirchen

sounds reasonable, also the dmesg could be moved into a 97-dmesg.sh or so.

That would work too, but if we wanted to keep the ordering of the things as-is we'd need the dmesg stuff to come before the runit stuff.

sbromberger avatar Jan 03 '24 00:01 sbromberger

The order of runit and dmesg is irrelevant, but e.g. dmesg should happen after 02-udev.sh

leahneukirchen avatar Jan 03 '24 15:01 leahneukirchen