Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 463970 - =sys-apps/openrc-0.11.8: Add support for {/usr,}/lib/sysctl.d in openrc
Summary: =sys-apps/openrc-0.11.8: Add support for {/usr,}/lib/sysctl.d in openrc
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-31 09:36 UTC by Denis Lisov
Modified: 2013-03-31 20:30 UTC (History)
1 user (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 Denis Lisov 2013-03-31 09:36:48 UTC
Currently /etc/init.d/sysctl loads the sysctl assignments from /etc/sysctl.conf and /etc/sysctl.d/*.conf only.

systemd package (systemd-sysctl) introduces the directories /lib/sysctl.d and /usr/lib/sysctl.d for distribution- or package-provided sysctl settings. libvirt already installs /usr/lib/sysctl.d/libvirtd.conf which is not loaded in openrc.

Please add support for these dirs. Ideally the systemd logic could be matched, which has the search order of
  /etc/sysctl.conf
  /etc/sysctl.d/*.conf
  /run/sysctl.d/*.conf
  /usr/local/lib/sysctl.d/*.conf
  /usr/lib/sysctl.d/*.conf
  /lib/sysctl.d/*.conf
with same-name files in earlier dirs shadowing these in later ones (except for /etc/sysctl.conf).

Reproducible: Always

Steps to Reproduce:
1. Install a sysctl config file into /usr/lib/sysctl.d/test.conf
2. /etc/init.d/sysctl restart
Actual Results:  
The settings from the file are not applied

Expected Results:  
The settings are applied
Comment 1 Patrick Lauer gentoo-dev 2013-03-31 11:30:21 UTC
Configuration goes to /etc. I would suggest that these packages be fixed to install configuration to the right place instead.
Comment 2 Denis Lisov 2013-03-31 20:30:22 UTC
The idea of using /usr/lib/some-config-dir.d for package defaults and /etc/some-config-dir.d for administrator overrides only is gaining ground in the systemd-using distributions. Other packages are likely to start using /lib/modprobe.d, /usr/lib/{binfmt.d,modules-load.d,sysctl.d,tmpfiles.d} over time. Are we going to support some of them in a compatible way (/usr/lib/tmpfiles.d seems to be partially supported) and some in an incompatible one?

Are these directories that much different from /lib/udev/rules.d?