Is there a good reason for all service files to be in /etc/init.d? I personally like how systemd has services for installed packages in /usr/lib/systemd/system, and it would be nice if openrc had something similar. Checking code i found out it actually does seem to support /usr/etc/init.d which is undocumented (man page for rc-update only has /etc/init.d and /usr/local/etc/init.d). I see no reason for system packages to clutter /etc/init.d with files you shouldn't modify anyway, if it is needed to patch a packages service it should just be copied over to /etc, /etc/init.d should have services actually managed by the sysadmin and not a dump for every package that provides a service. Reproducible: Always
Honestly... since I started using Gentoo back in 2003 init scripts have _always_ been installed into /etc/init.d Why should we now start to change this?
Well OpenRC isn't just Gentoo's base layout anymore; it's a competing init solution, and this would make it more neater. And it wouldn't be that difficult (i think), just document that "/usr/etc/init.d" is preferred for package installed service scripts, move all the default scripts OpenRC installs to there, and add a simple migrate function for all current "/etc/runlevels" to the ebuild. It shouldn't break anything and all other packages can migrate at their own whim. I can do it and send the patches if it's something you guys are willing to accept.
I'm with polynomial-c on this. OpenRC installs scripts in /etc/init.d, then you use rc-update to manage the scripts by adding them to runlevels if you want them to start. The /usr/local/etc/init.d path is from the *BSD world, where packages are installed in /usr/local.
/usr/etc/init.d not /usr/local/etc/init.d... and it seems rc-update already supports /usr/etc/init.d too
Reopening this since it was closed on an irrelevant assertion about BSD and /usr/local when this is about /usr where package files are supposed to be installed.
This is being closed again because I don't see a valid reason to move service files out of /etc.
only package installed service files*, since they are not for system administrators to configure...
Except they are. System administrators are free to customize package-provided initscripts however they wish. Portage will not overwrite their customizations unless they've explicitly disabled config-protect, either globally or for /etc/init.d.
Yes you're free to customize the package provided init scripts, but this should be a last resort, to configure the init script behavior there is conf.d. The init scripts them selves are not config files and do not need to be modified for the system to function, instead /etc/init.d should be filled with init scripts that are actually maintained by the system administrator, if a package init script has to be customized it can be copied over...
I'll say I'm not totally against this. I can see the appeal of having these in /usr. I believe Intel has suggested before that / be a light weight initramfs and a "golden master" OS image be mounted at /usr and then only local system configuration changes live in /etc