Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 650318 - sys-apps/openrc: system package service files shouldn't be in /etc
Summary: sys-apps/openrc: system package service files shouldn't be in /etc
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-12 18:16 UTC by nnnn20430
Modified: 2018-03-14 16:18 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nnnn20430 2018-03-12 18:16:19 UTC
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
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-03-12 18:50:51 UTC
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?
Comment 2 nnnn20430 2018-03-12 21:37:15 UTC
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.
Comment 3 William Hubbs gentoo-dev 2018-03-12 23:29:40 UTC
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.
Comment 4 nnnn20430 2018-03-12 23:59:20 UTC
/usr/etc/init.d not /usr/local/etc/init.d...
and it seems rc-update already supports /usr/etc/init.d too
Comment 5 nnnn20430 2018-03-13 11:56:57 UTC
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.
Comment 6 William Hubbs gentoo-dev 2018-03-13 13:46:39 UTC
This is being closed again because I don't see a valid reason to move
service files out of /etc.
Comment 7 nnnn20430 2018-03-13 14:22:02 UTC
only package installed service files*, since they are not for system administrators to configure...
Comment 8 dwfreed 2018-03-13 17:20:38 UTC
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.
Comment 9 nnnn20430 2018-03-13 17:44:44 UTC
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...
Comment 10 Doug Goldstein (RETIRED) gentoo-dev 2018-03-14 16:18:34 UTC
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